# HG changeset patch # User cslag # Date 1471685994 -7200 # Node ID 170cde9e2a83dc32109f1286644dbc6e4ffad0b6 # Parent 8d6825e3f064192363e828d74e9f5fff75ecd369 - arm arm/thumb cleanup, sharing more files, directly diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/CMakeLists.txt --- a/dyncallback/CMakeLists.txt Sat Aug 20 09:57:57 2016 +0200 +++ b/dyncallback/CMakeLists.txt Sat Aug 20 11:39:54 2016 +0200 @@ -45,8 +45,7 @@ dyncall_thunk_x86.h dyncall_thunk_ppc32.h dyncall_thunk_x64.h - dyncall_thunk_arm32_arm.h - dyncall_thunk_arm32_thumb.h + dyncall_thunk_arm32.h dyncall_alloc_wx.h dyncall_args.h dyncall_callback.h diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/Makefile.generic --- a/dyncallback/Makefile.generic Sat Aug 20 09:57:57 2016 +0200 +++ b/dyncallback/Makefile.generic Sat Aug 20 11:39:54 2016 +0200 @@ -1,6 +1,6 @@ LIBNAME = dyncallback OBJS = dyncall_alloc_wx.o dyncall_args.o dyncall_callback.o dyncall_callback_arch.o dyncall_thunk.o -HEADERS = ${VPATH}/dyncall_thunk.h ${VPATH}/dyncall_thunk_x86.h ${VPATH}/dyncall_thunk_ppc32.h ${VPATH}/dyncall_thunk_x64.h ${VPATH}/dyncall_thunk_arm32_arm.h ${VPATH}/dyncall_thunk_arm32_thumb.h ${VPATH}/dyncall_thunk_arm64.h ${VPATH}/dyncall_args.h ${VPATH}/dyncall_callback.h +HEADERS = ${VPATH}/dyncall_thunk.h ${VPATH}/dyncall_thunk_x86.h ${VPATH}/dyncall_thunk_ppc32.h ${VPATH}/dyncall_thunk_x64.h ${VPATH}/dyncall_thunk_arm32.h ${VPATH}/dyncall_thunk_arm64.h ${VPATH}/dyncall_args.h ${VPATH}/dyncall_callback.h TOP = ${VPATH}/.. CFLAGS += -I${TOP}/dyncall diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_args.c --- a/dyncallback/dyncall_args.c Sat Aug 20 09:57:57 2016 +0200 +++ b/dyncallback/dyncall_args.c Sat Aug 20 11:39:54 2016 +0200 @@ -37,10 +37,8 @@ # endif #elif defined(DC__Arch_PPC64) # include "dyncall_args_ppc64.c" -#elif defined(DC__Arch_ARM_ARM) -# include "dyncall_args_arm32_arm.c" -#elif defined(DC__Arch_ARM_THUMB) -# include "dyncall_args_arm32_thumb.c" +#elif defined(DC__Arch_ARM) +# include "dyncall_args_arm32.c" #elif defined(DC__Arch_MIPS) # if defined(DC__ABI_MIPS_O32) # include "dyncall_args_mips_o32.c" diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_args_arm32.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dyncallback/dyncall_args_arm32.c Sat Aug 20 11:39:54 2016 +0200 @@ -0,0 +1,143 @@ +/* + + Package: dyncall + Library: dyncallback + File: dyncallback/dyncall_args_arm32.c + Description: Callback's Arguments VM - Implementation for ARM32 (ARM and THUMB mode) + License: + + Copyright (c) 2007-2016 Daniel Adler , + Tassilo Philipp + + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +*/ + + + +#include "dyncall_args_arm32.h" + + +static void arm_align_64(DCArgs* args) +{ + /* Look at signature to see if current calling convention needs alignment */ + /* or not (e.g. EABI has different alignment). If nothing specified, fall */ + /* back to default behaviour for this platform. */ + /* @@@ check signature string */ + + int sig = +#if defined(DC__ABI_ARM_EABI) || defined(DC__ABI_ARM_HF) + 0; /* EABI */ +#else + 1; /* ATPCS */ +#endif + if(sig == 0) { + if(args->reg_count < 4) + args->reg_count = (args->reg_count+1)&~1; + if(args->reg_count >= 4 && (int)args->stack_ptr & 4) + ++args->stack_ptr; + } +} + + +static void* arm_word(DCArgs* args) +{ + if(args->reg_count < 4) + return &args->reg_data[args->reg_count++]; + else + return (void*)args->stack_ptr++; +} + +static DCfloat arm_float(DCArgs* args) +{ +#if defined(DC__ABI_ARM_HF) + DCfloat f; + if(args->freg_count < 16) { + f = args->f[args->freg_count++]; + + /* if freg_count was odd, sync with dreg_count */ + if(!(args->freg_count & 1) && (args->freg_count < args->dreg_count)) + args->freg_count = args->dreg_count; + + return f; + } +#endif + return *(DCfloat*)arm_word(args); +} + +static DCdouble arm_double(DCArgs* args) +{ + union { + DCdouble d; + DClong l[2]; + } d; +#if defined(DC__ABI_ARM_HF) + if(args->dreg_count < args->freg_count) + args->dreg_count = (args->freg_count+1)&0x1e; /* clear last bit, counter won't be higher than 16, anyways */ + + if(args->dreg_count < 16) { + d.d = *(DCdouble*)&args->f[args->dreg_count]; + args->dreg_count += 2; + + /* freg_count is either odd (pointing to a gap), or always the same as dreg_count */ + if(!(args->freg_count & 1)) + args->freg_count = args->dreg_count; + return d.d; + } + args->freg_count = 16; /* fp registers all full - need to use stack now: stop filling gaps for single precision, also */ +#endif + arm_align_64(args); + d.l[0] = *(DClong*)arm_word(args); + d.l[1] = *(DClong*)arm_word(args); + return d.d; +} + +static DClonglong arm_longlong(DCArgs* args) +{ + union { + DClonglong ll; + DClong l[2]; + } ll; + arm_align_64(args); + ll.l[0] = *(DClong*)arm_word(args); + ll.l[1] = *(DClong*)arm_word(args); + return ll.ll; +} + + + +// ---------------------------------------------------------------------------- +// C API implementation: + + +// base operations: + +DClonglong dcbArgLongLong (DCArgs* p) { return arm_longlong(p); } +DClong dcbArgLong (DCArgs* p) { return *(DClong*)arm_word(p); } +DCint dcbArgInt (DCArgs* p) { return (DCint) dcbArgLong(p); } +DCchar dcbArgChar (DCArgs* p) { return (DCchar) dcbArgLong(p); } +DCshort dcbArgShort (DCArgs* p) { return (DCshort) dcbArgLong(p); } +DCbool dcbArgBool (DCArgs* p) { return (dcbArgLong(p) == 0) ? 0 : 1; } + +DCuint dcbArgUInt (DCArgs* p) { return (DCuint) dcbArgInt(p); } +DCuchar dcbArgUChar (DCArgs* p) { return (DCuchar) dcbArgChar(p); } +DCushort dcbArgUShort (DCArgs* p) { return (DCushort) dcbArgShort(p); } +DCulong dcbArgULong (DCArgs* p) { return (DCulong) dcbArgLong(p); } +DCulonglong dcbArgULongLong(DCArgs* p) { return (DCulonglong)dcbArgLongLong(p); } + + +DCpointer dcbArgPointer (DCArgs* p) { return (DCpointer) dcbArgLong(p); } + +DCdouble dcbArgDouble (DCArgs* p) { return arm_double(p); } +DCfloat dcbArgFloat (DCArgs* p) { return arm_float(p); } + diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_args_arm32.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dyncallback/dyncall_args_arm32.h Sat Aug 20 11:39:54 2016 +0200 @@ -0,0 +1,46 @@ +/* + + Package: dyncall + Library: dyncallback + File: dyncallback/dyncall_args_arm32.h + Description: Callback's Arguments VM - Header for ARM32 (ARM and THUMB mode) + License: + + Copyright (c) 2007-2016 Daniel Adler , + Tassilo Philipp + + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +*/ + + +#ifndef DYNCALLBACK_ARGS_ARM32_H +#define DYNCALLBACK_ARGS_ARM32_H + +#include "dyncall_args.h" + +struct DCArgs +{ + /* Don't change order! */ + long reg_data[4]; + int reg_count; + long* stack_ptr; +#if defined(DC__ABI_ARM_HF) + DCfloat f[16]; + int freg_count; + int dreg_count; +#endif +}; + +#endif /* DYNCALLBACK_ARGS_ARM32_H */ + diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_args_arm32_arm.c --- a/dyncallback/dyncall_args_arm32_arm.c Sat Aug 20 09:57:57 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,143 +0,0 @@ -/* - - Package: dyncall - Library: dyncallback - File: dyncallback/dyncall_args_arm32_arm.c - Description: Callback's Arguments VM - Implementation for ARM32 (ARM mode) - License: - - Copyright (c) 2007-2015 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - - - -#include "dyncall_args_arm32_arm.h" - - -static void arm_align_64(DCArgs* args) -{ - /* Look at signature to see if current calling convention needs alignment */ - /* or not (e.g. EABI has different alignment). If nothing specified, fall */ - /* back to default behaviour for this platform. */ - /* @@@ check signature string */ - - int sig = -#if defined(DC__ABI_ARM_EABI) || defined(DC__ABI_ARM_HF) - 0; /* EABI */ -#else - 1; /* ATPCS */ -#endif - if(sig == 0) { - if(args->reg_count < 4) - args->reg_count = (args->reg_count+1)&~1; - if(args->reg_count >= 4 && (int)args->stack_ptr & 4) - ++args->stack_ptr; - } -} - - -static void* arm_word(DCArgs* args) -{ - if(args->reg_count < 4) - return &args->reg_data[args->reg_count++]; - else - return (void*)args->stack_ptr++; -} - -static DCfloat arm_float(DCArgs* args) -{ -#if defined(DC__ABI_ARM_HF) - DCfloat f; - if(args->freg_count < 16) { - f = args->f[args->freg_count++]; - - /* if freg_count was odd, sync with dreg_count */ - if(!(args->freg_count & 1) && (args->freg_count < args->dreg_count)) - args->freg_count = args->dreg_count; - - return f; - } -#endif - return *(DCfloat*)arm_word(args); -} - -static DCdouble arm_double(DCArgs* args) -{ - union { - DCdouble d; - DClong l[2]; - } d; -#if defined(DC__ABI_ARM_HF) - if(args->dreg_count < args->freg_count) - args->dreg_count = (args->freg_count+1)&0x1e; /* clear last bit, counter won't be higher than 16, anyways */ - - if(args->dreg_count < 16) { - d.d = *(DCdouble*)&args->f[args->dreg_count]; - args->dreg_count += 2; - - /* freg_count is either odd (pointing to a gap), or always the same as dreg_count */ - if(!(args->freg_count & 1)) - args->freg_count = args->dreg_count; - return d.d; - } - args->freg_count = 16; /* fp registers all full - need to use stack now: stop filling gaps for single precision, also */ -#endif - arm_align_64(args); - d.l[0] = *(DClong*)arm_word(args); - d.l[1] = *(DClong*)arm_word(args); - return d.d; -} - -static DClonglong arm_longlong(DCArgs* args) -{ - union { - DClonglong ll; - DClong l[2]; - } ll; - arm_align_64(args); - ll.l[0] = *(DClong*)arm_word(args); - ll.l[1] = *(DClong*)arm_word(args); - return ll.ll; -} - - - -// ---------------------------------------------------------------------------- -// C API implementation: - - -// base operations: - -DClonglong dcbArgLongLong (DCArgs* p) { return arm_longlong(p); } -DClong dcbArgLong (DCArgs* p) { return *(DClong*)arm_word(p); } -DCint dcbArgInt (DCArgs* p) { return (DCint) dcbArgLong(p); } -DCchar dcbArgChar (DCArgs* p) { return (DCchar) dcbArgLong(p); } -DCshort dcbArgShort (DCArgs* p) { return (DCshort) dcbArgLong(p); } -DCbool dcbArgBool (DCArgs* p) { return (dcbArgLong(p) == 0) ? 0 : 1; } - -DCuint dcbArgUInt (DCArgs* p) { return (DCuint) dcbArgInt(p); } -DCuchar dcbArgUChar (DCArgs* p) { return (DCuchar) dcbArgChar(p); } -DCushort dcbArgUShort (DCArgs* p) { return (DCushort) dcbArgShort(p); } -DCulong dcbArgULong (DCArgs* p) { return (DCulong) dcbArgLong(p); } -DCulonglong dcbArgULongLong(DCArgs* p) { return (DCulonglong)dcbArgLongLong(p); } - - -DCpointer dcbArgPointer (DCArgs* p) { return (DCpointer) dcbArgLong(p); } - -DCdouble dcbArgDouble (DCArgs* p) { return arm_double(p); } -DCfloat dcbArgFloat (DCArgs* p) { return arm_float(p); } - diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_args_arm32_arm.h --- a/dyncallback/dyncall_args_arm32_arm.h Sat Aug 20 09:57:57 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* - - Package: dyncall - Library: dyncallback - File: dyncallback/dyncall_args_arm32_arm.h - Description: Callback's Arguments VM - Header for ARM32 (ARM mode) - License: - - Copyright (c) 2007-2015 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - - -#ifndef DYNCALLBACK_ARGS_ARM32_ARM_H -#define DYNCALLBACK_ARGS_ARM32_ARM_H - -#include "dyncall_args.h" - -struct DCArgs -{ - /* Don't change order! */ - long reg_data[4]; - int reg_count; - long* stack_ptr; -#if defined(DC__ABI_ARM_HF) - DCfloat f[16]; - int freg_count; - int dreg_count; -#endif -}; - -#endif /* DYNCALLBACK_ARGS_ARM32_ARM_H */ - diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_args_arm32_thumb.c --- a/dyncallback/dyncall_args_arm32_thumb.c Sat Aug 20 09:57:57 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* - - Package: dyncall - Library: dyncallback - File: dyncallback/dyncall_args_arm32_thumb.c - Description: Callback's Arguments VM - Implementation for ARM32 (THUMB mode) - License: - - Copyright (c) 2007-2015 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - - - -#include "dyncall_args_arm32_thumb.h" -#include "dyncall_args_arm32_arm.c" /* Uses same code as ARM mode. */ - diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_args_arm32_thumb.h --- a/dyncallback/dyncall_args_arm32_thumb.h Sat Aug 20 09:57:57 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* - - Package: dyncall - Library: dyncallback - File: dyncallback/dyncall_args_arm32_thumb.h - Description: Callback's Arguments VM - Header for ARM32 (THUMB mode) - License: - - Copyright (c) 2007-2015 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - - -#ifndef DYNCALLBACK_ARGS_ARM32_THUMB_H -#define DYNCALLBACK_ARGS_ARM32_THUMB_H - -#include "dyncall_args_arm32_arm.h" /* Uses same code as ARM mode. */ - -#endif /* DYNCALLBACK_ARGS_ARM32_THUMB_H */ - diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_callback.c --- a/dyncallback/dyncall_callback.c Sat Aug 20 09:57:57 2016 +0200 +++ b/dyncallback/dyncall_callback.c Sat Aug 20 11:39:54 2016 +0200 @@ -34,10 +34,8 @@ #include "dyncall_callback_ppc32.c" #elif defined(DC__Arch_PPC64) #include "dyncall_callback_ppc64.c" -#elif defined(DC__Arch_ARM_ARM) -#include "dyncall_callback_arm32_arm.c" -#elif defined(DC__Arch_ARM_THUMB) -#include "dyncall_callback_arm32_thumb.c" +#elif defined(DC__Arch_ARM) +#include "dyncall_callback_arm32.c" #elif defined(DC__Arch_MIPS) || defined(DC__Arch_MIPS64) #include "dyncall_callback_mips.c" #elif defined(DC__Arch_Sparc) diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_callback_arm32.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dyncallback/dyncall_callback_arm32.c Sat Aug 20 11:39:54 2016 +0200 @@ -0,0 +1,62 @@ +/* + + Package: dyncall + Library: dyncallback + File: dyncallback/dyncall_callback_arm32.c + Description: Callback - Implementation for ARM32 (ARM and THUMB mode) + License: + + Copyright (c) 2007-2016 Daniel Adler , + Tassilo Philipp + + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +*/ + + +#include "dyncall_callback_arm32.h" + +#include "dyncall_alloc_wx.h" + +extern void dcCallbackThunkEntry(); + +void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata) +{ + pcb->handler = handler; + pcb->userdata = userdata; +} + + +DCCallback* dcbNewCallback(const char* signature, DCCallbackHandler* handler, void* userdata) +{ + int err; + DCCallback* pcb; + err = dcAllocWX(sizeof(DCCallback), (void**)&pcb); + if(err || !pcb) + return 0; + dcbInitThunk(&pcb->thunk, dcCallbackThunkEntry); + dcbInitCallback(pcb, signature, handler, userdata); + return pcb; +} + + +void dcbFreeCallback(DCCallback* pcb) +{ + dcFreeWX(pcb, sizeof(DCCallback)); +} + +void* dcbGetUserData(DCCallback* pcb) +{ + return pcb->userdata; +} + diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_callback_arm32.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dyncallback/dyncall_callback_arm32.h Sat Aug 20 11:39:54 2016 +0200 @@ -0,0 +1,46 @@ +/* + + Package: dyncall + Library: dyncallback + File: dyncallback/dyncall_callback_arm32.h + Description: Callback - Header for ARM32 (ARM and THUMB mode) + License: + + Copyright (c) 2007-2015 Daniel Adler , + Tassilo Philipp + + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +*/ + + + +#ifndef DYNCALL_CALLBACK_ARM32_H_ +#define DYNCALL_CALLBACK_ARM32_H_ + +#include "dyncall_callback.h" + +#include "dyncall_thunk.h" +#include "dyncall_args_arm32.h" + + +struct DCCallback +{ + DCThunk thunk; // offset 0 + DCCallbackHandler* handler; // offset 12 + void* userdata; // offset 16 +}; + + +#endif /* DYNCALL_CALLBACK_ARM32_H_ */ + diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_callback_arm32_arm.c --- a/dyncallback/dyncall_callback_arm32_arm.c Sat Aug 20 09:57:57 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* - - Package: dyncall - Library: dyncallback - File: dyncallback/dyncall_callback_arm32_arm.c - Description: Callback - Implementation for ARM32 (ARM mode) - License: - - Copyright (c) 2007-2015 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - - -#include "dyncall_callback_arm32_arm.h" - -#include "dyncall_alloc_wx.h" - -extern void dcCallbackThunkEntry(); - -void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata) -{ - pcb->handler = handler; - pcb->userdata = userdata; -} - - -DCCallback* dcbNewCallback(const char* signature, DCCallbackHandler* handler, void* userdata) -{ - int err; - DCCallback* pcb; - err = dcAllocWX(sizeof(DCCallback), (void**)&pcb); - if(err || !pcb) - return 0; - dcbInitThunk(&pcb->thunk, dcCallbackThunkEntry); - dcbInitCallback(pcb, signature, handler, userdata); - return pcb; -} - - -void dcbFreeCallback(DCCallback* pcb) -{ - dcFreeWX(pcb, sizeof(DCCallback)); -} - -void* dcbGetUserData(DCCallback* pcb) -{ - return pcb->userdata; -} - diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_callback_arm32_arm.h --- a/dyncallback/dyncall_callback_arm32_arm.h Sat Aug 20 09:57:57 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* - - Package: dyncall - Library: dyncallback - File: dyncallback/dyncall_callback_arm32_arm.h - Description: Callback - Header for ARM32 (ARM mode) - License: - - Copyright (c) 2007-2015 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - - - -#ifndef DYNCALL_CALLBACK_ARM32_ARM_H_ -#define DYNCALL_CALLBACK_ARM32_ARM_H_ - -#include "dyncall_callback.h" - -#include "dyncall_thunk.h" -#include "dyncall_args_arm32_arm.h" - - -struct DCCallback -{ - DCThunk thunk; // offset 0 - DCCallbackHandler* handler; // offset 12 - void* userdata; // offset 16 -}; - - -#endif /* DYNCALL_CALLBACK_ARM32_ARM_H_ */ - diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_callback_arm32_thumb.c --- a/dyncallback/dyncall_callback_arm32_thumb.c Sat Aug 20 09:57:57 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* - - Package: dyncall - Library: dyncallback - File: dyncallback/dyncall_callback_arm32_thumb.c - Description: Callback - Implementation for ARM32 (THUMB mode) - License: - - Copyright (c) 2007-2015 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - - - -#include "dyncall_callback_arm32_thumb.h" -#include "dyncall_callback_arm32_arm.c" /* Uses same code as ARM mode. */ - diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_callback_arm32_thumb.h --- a/dyncallback/dyncall_callback_arm32_thumb.h Sat Aug 20 09:57:57 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* - - Package: dyncall - Library: dyncallback - File: dyncallback/dyncall_callback_arm32_thumb.h - Description: Callback - Header for ARM32 (THUMB mode) - License: - - Copyright (c) 2007-2015 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - - - -#ifndef DYNCALL_CALLBACK_ARM32_THUMB_H_ -#define DYNCALL_CALLBACK_ARM32_THUMB_H_ - -#include "dyncall_callback_arm32_arm.h" /* Uses same code as ARM mode. */ - -#endif /* DYNCALL_CALLBACK_ARM32_THUMB_H_ */ - diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_thunk.c --- a/dyncallback/dyncall_thunk.c Sat Aug 20 09:57:57 2016 +0200 +++ b/dyncallback/dyncall_thunk.c Sat Aug 20 11:39:54 2016 +0200 @@ -39,10 +39,8 @@ # endif #elif defined(DC__Arch_PPC64) # include "dyncall_thunk_ppc64.c" -#elif defined(DC__Arch_ARM_ARM) -#include "dyncall_thunk_arm32_arm.c" -#elif defined(DC__Arch_ARM_THUMB) -#include "dyncall_thunk_arm32_thumb.c" +#elif defined(DC__Arch_ARM) +#include "dyncall_thunk_arm32.c" #elif defined(DC__Arch_MIPS) #include "dyncall_thunk_mips.c" #elif defined(DC__Arch_MIPS64) diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_thunk.h --- a/dyncallback/dyncall_thunk.h Sat Aug 20 09:57:57 2016 +0200 +++ b/dyncallback/dyncall_thunk.h Sat Aug 20 11:39:54 2016 +0200 @@ -69,10 +69,8 @@ #include "dyncall_thunk_ppc32.h" #elif defined (DC__Arch_PPC64) #include "dyncall_thunk_ppc64.h" -#elif defined (DC__Arch_ARM_ARM) -#include "dyncall_thunk_arm32_arm.h" -#elif defined (DC__Arch_ARM_THUMB) -#include "dyncall_thunk_arm32_thumb.h" +#elif defined (DC__Arch_ARM) +#include "dyncall_thunk_arm32.h" #elif defined (DC__Arch_MIPS) #include "dyncall_thunk_mips.h" #elif defined (DC__Arch_MIPS64) diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_thunk_arm32.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dyncallback/dyncall_thunk_arm32.c Sat Aug 20 11:39:54 2016 +0200 @@ -0,0 +1,47 @@ +/* + + Package: dyncall + Library: dyncallback + File: dyncallback/dyncall_thunk_arm32.c + Description: Thunk - Implementation for ARM32 (ARM and THUMB mode) + License: + + Copyright (c) 2007-2015 Daniel Adler , + Tassilo Philipp + + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +*/ + + +/* Since we can mix ARM and THUMB assembly, this works for both modes */ + +#include "dyncall_thunk.h" + +void dcbInitThunk(DCThunk* p, void (*entry)()) +{ + /* + # ARM32 (ARM mode) thunk code: + .code 32 + sub %r12, %r15, #8 + ldr %r15, [%r15, #-4] + */ + + /* This code stores a ptr to DCCallback in r12 (equals ptr to thunk, */ + /* which is PC (r15) minus 8, as PC points to current instruction+8. */ + /* Then it loads the callback 'entry' into PC. The -4 is needed, also bc */ + /* of the PC pointing ahead. */ + p->code[0] = 0xe24fc008UL; /* sub %r12, %r15, #8 */ + p->code[1] = 0xe51ff004UL; /* ldr %r15, [%r15, #-4] */ + p->entry = entry; +} diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_thunk_arm32.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dyncallback/dyncall_thunk_arm32.h Sat Aug 20 11:39:54 2016 +0200 @@ -0,0 +1,41 @@ +/* + + Package: dyncall + Library: dyncallback + File: dyncallback/dyncall_thunk_arm32.h + Description: Thunk - Header for ARM32 (ARM and THUMB mode) + License: + + Copyright (c) 2007-2016 Daniel Adler , + Tassilo Philipp + + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +*/ + + +#ifndef DYNCALL_THUNK_ARM32_H +#define DYNCALL_THUNK_ARM32_H + + +struct DCThunk_ +{ + unsigned int code[2]; + void (*entry)(); +}; + +#define DCTHUNK_ARM32_SIZE 12 + + +#endif /* DYNCALL_THUNK_ARM32_H */ + diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_thunk_arm32_arm.c --- a/dyncallback/dyncall_thunk_arm32_arm.c Sat Aug 20 09:57:57 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* - - Package: dyncall - Library: dyncallback - File: dyncallback/dyncall_thunk_arm32_arm.c - Description: Thunk - Implementation for ARM32 (ARM mode) - License: - - Copyright (c) 2007-2015 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - - -#include "dyncall_thunk.h" - -void dcbInitThunk(DCThunk* p, void (*entry)()) -{ - /* - # ARM32 (ARM mode) thunk code: - .code 32 - sub %r12, %r15, #8 - ldr %r15, [%r15, #-4] - */ - - /* This code stores a ptr to DCCallback in r12 (equals ptr to thunk, */ - /* which is PC (r15) minus 8, as PC points to current instruction+8. */ - /* Then it loads the callback 'entry' into PC. The -4 is needed, also bc */ - /* of the PC pointing ahead. */ - p->code[0] = 0xe24fc008UL; /* sub %r12, %r15, #8 */ - p->code[1] = 0xe51ff004UL; /* ldr %r15, [%r15, #-4] */ - p->entry = entry; -} diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_thunk_arm32_arm.h --- a/dyncallback/dyncall_thunk_arm32_arm.h Sat Aug 20 09:57:57 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* - - Package: dyncall - Library: dyncallback - File: dyncallback/dyncall_thunk_arm32_arm.h - Description: Thunk - Header for ARM32 (ARM mode) - License: - - Copyright (c) 2007-2015 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - - -#ifndef DYNCALL_THUNK_ARM32_ARM_H -#define DYNCALL_THUNK_ARM32_ARM_H - - -struct DCThunk_ -{ - unsigned int code[2]; - void (*entry)(); -}; - -#define DCTHUNK_ARM32_ARM_SIZE 12 - - -#endif /* DYNCALL_THUNK_ARM32_ARM_H */ - diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_thunk_arm32_thumb.c --- a/dyncallback/dyncall_thunk_arm32_thumb.c Sat Aug 20 09:57:57 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* - - Package: dyncall - Library: dyncallback - File: dyncallback/dyncall_thunk_arm32_thumb.c - Description: Thunk - Implementation for ARM32 (THUMB mode) - License: - - Copyright (c) 2007-2015 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - - - -#include "dyncall_thunk_arm32_arm.c" /* Since we can mix ARM and THUMB */ - /* assembly, reuse the ARM mode code */ - diff -r 8d6825e3f064 -r 170cde9e2a83 dyncallback/dyncall_thunk_arm32_thumb.h --- a/dyncallback/dyncall_thunk_arm32_thumb.h Sat Aug 20 09:57:57 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* - - Package: dyncall - Library: dyncallback - File: dyncallback/dyncall_thunk_arm32_thumb.h - Description: Thunk - Header for ARM32 (THUMB mode) - License: - - Copyright (c) 2007-2015 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - - -#ifndef DYNCALL_THUNK_ARM32_THUMB_H -#define DYNCALL_THUNK_ARM32_THUMB_H - -#include "dyncall_thunk_arm32_arm.h" /* Uses same code as ARM mode. */ - -#define DCTHUNK_ARM32_THUMB_SIZE 12 - - -#endif /* DYNCALL_THUNK_ARM32_THUMB_H */ -