changeset 144:5fa2d7d5de10

- merge
author cslag
date Sat, 20 Aug 2016 15:57:20 +0200
parents 170cde9e2a83 (diff) 706935b8a4fa (current diff)
children 63892f03e493
files ToDo
diffstat 32 files changed, 469 insertions(+), 735 deletions(-) [+]
line wrap: on
line diff
--- a/ToDo	Mon Aug 08 11:54:50 2016 +0200
+++ b/ToDo	Sat Aug 20 15:57:20 2016 +0200
@@ -58,6 +58,7 @@
 - implement MIPS64 N32 (gcc -mabi=n32); both, little and big-endian (looks like NetNBSD on and
   EdgeRouter lite uses this: https://blog.netbsd.org/tnf/entry/hands_on_experience_with_edgerouter)
 - implement MIPS64 EABI (gcc -mabi=eabi); both, little and big-endian
+- support for Minix/arm
 
 dynload:
 --------
@@ -82,6 +83,7 @@
 - implement MIPS64 N32 (gcc -mabi=n32); both, little and big-endian (looks like NetNBSD on and
   EdgeRouter lite uses this: https://blog.netbsd.org/tnf/entry/hands_on_experience_with_edgerouter)
 - implement MIPS64 EABI (gcc -mabi=eabi); both, little and big-endian
+- support for Minix/arm
 
 bindings:
 ---------
--- a/dyncall/dyncall_macros.h	Mon Aug 08 11:54:50 2016 +0200
+++ b/dyncall/dyncall_macros.h	Sat Aug 20 15:57:20 2016 +0200
@@ -244,6 +244,7 @@
 # else
 #  define DC__ABI_MIPS_EABI
 # endif
+/*@@@implement/support: __mips_hard_float*/
 #endif /* MIPS */
 
 #if defined(DC__Arch_PPC64)
--- a/dyncallback/CMakeLists.txt	Mon Aug 08 11:54:50 2016 +0200
+++ b/dyncallback/CMakeLists.txt	Sat Aug 20 15:57:20 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
--- a/dyncallback/Makefile.generic	Mon Aug 08 11:54:50 2016 +0200
+++ b/dyncallback/Makefile.generic	Sat Aug 20 15:57:20 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 
 
--- a/dyncallback/dyncall_args.c	Mon Aug 08 11:54:50 2016 +0200
+++ b/dyncallback/dyncall_args.c	Sat Aug 20 15:57:20 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"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dyncallback/dyncall_args_arm32.c	Sat Aug 20 15:57:20 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 <dadler@uni-goettingen.de>,
+                           Tassilo Philipp <tphilipp@potion-studios.com>
+
+   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); }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dyncallback/dyncall_args_arm32.h	Sat Aug 20 15:57:20 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 <dadler@uni-goettingen.de>,
+                           Tassilo Philipp <tphilipp@potion-studios.com>
+
+   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 */
+
--- a/dyncallback/dyncall_args_arm32_arm.c	Mon Aug 08 11:54:50 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 <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   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); }
-
--- a/dyncallback/dyncall_args_arm32_arm.h	Mon Aug 08 11:54:50 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 <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   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 */
-
--- a/dyncallback/dyncall_args_arm32_thumb.c	Mon Aug 08 11:54:50 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 <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   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. */
-
--- a/dyncallback/dyncall_args_arm32_thumb.h	Mon Aug 08 11:54:50 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 <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   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 */
-
--- a/dyncallback/dyncall_callback.c	Mon Aug 08 11:54:50 2016 +0200
+++ b/dyncallback/dyncall_callback.c	Sat Aug 20 15:57:20 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)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dyncallback/dyncall_callback_arm32.c	Sat Aug 20 15:57:20 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 <dadler@uni-goettingen.de>,
+                           Tassilo Philipp <tphilipp@potion-studios.com>
+
+   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;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dyncallback/dyncall_callback_arm32.h	Sat Aug 20 15:57:20 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 <dadler@uni-goettingen.de>,
+                           Tassilo Philipp <tphilipp@potion-studios.com>
+
+   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_ */
+
--- a/dyncallback/dyncall_callback_arm32_arm.c	Mon Aug 08 11:54:50 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +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 <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   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_args_arm32_arm.h"
-
-#include "dyncall_alloc_wx.h"
-#include "dyncall_signature.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;
-}
--- a/dyncallback/dyncall_callback_arm32_arm.h	Mon Aug 08 11:54:50 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 <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   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_ */
-
--- a/dyncallback/dyncall_callback_arm32_thumb.c	Mon Aug 08 11:54:50 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 <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   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. */
-
--- a/dyncallback/dyncall_callback_arm32_thumb.h	Mon Aug 08 11:54:50 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 <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   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_ */
-
--- a/dyncallback/dyncall_thunk.c	Mon Aug 08 11:54:50 2016 +0200
+++ b/dyncallback/dyncall_thunk.c	Sat Aug 20 15:57:20 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)
--- a/dyncallback/dyncall_thunk.h	Mon Aug 08 11:54:50 2016 +0200
+++ b/dyncallback/dyncall_thunk.h	Sat Aug 20 15:57:20 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)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dyncallback/dyncall_thunk_arm32.c	Sat Aug 20 15:57:20 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 <dadler@uni-goettingen.de>,
+                           Tassilo Philipp <tphilipp@potion-studios.com>
+
+   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;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dyncallback/dyncall_thunk_arm32.h	Sat Aug 20 15:57:20 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 <dadler@uni-goettingen.de>,
+                           Tassilo Philipp <tphilipp@potion-studios.com>
+
+   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 */
+
--- a/dyncallback/dyncall_thunk_arm32_arm.c	Mon Aug 08 11:54:50 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 <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   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;
-}
--- a/dyncallback/dyncall_thunk_arm32_arm.h	Mon Aug 08 11:54:50 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 <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   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 */
-
--- a/dyncallback/dyncall_thunk_arm32_thumb.c	Mon Aug 08 11:54:50 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 <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   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 */
-
--- a/dyncallback/dyncall_thunk_arm32_thumb.h	Mon Aug 08 11:54:50 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 <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   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 */
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/common/test_framework.h	Sat Aug 20 15:57:20 2016 +0200
@@ -0,0 +1,68 @@
+/*
+
+ Package: dyncall
+ Library: test
+ File: test/plain_c++/test_framework.h
+ Description: 
+ License:
+
+   Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>, 
+                           Tassilo Philipp <tphilipp@potion-studios.com>
+
+   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.
+
+*/
+
+
+
+// 2007-10-11
+
+#ifndef TRUE
+#define TRUE (1)
+#endif
+
+#ifndef FALSE
+#define FALSE (0)
+#endif
+
+// Statement breaking into debugger (for various platforms). @@@add if defined, etc...
+#ifdef _WIN32
+# ifdef _MSC_VER
+#  define DC_TEST_BREAK __debugbreak
+# else
+#  include <windows.h>
+#  define DC_TEST_BREAK DebugBreak
+# endif
+#else
+# define DC_TEST_BREAK
+#endif
+
+// Test state - evaluates to false inside a test function if a test fails.
+#define DC_TEST_STATE				testFramework_state
+
+// Test functions defined by DC_DEFINE_TEST_FUNC_BEGIN and DC_DEFINE_TEST_FUNC_END pairs do come with
+// a default parameter used to pass a path to them specifying where to find external data needed to
+// run the tests (if desired). NULL by default. It can be queried by using DC_TEST_PATH.
+#define DC_TEST_PATH				testFramework_suitePath
+
+// Test a single expression - the expression must evaluate to true in order to succeed.
+// #define DC_TEST(exp)				{ TEST_STATE = TEST_STATE && (exp); if(!TEST_STATE) DC_TEST_BREAK(); }
+
+#include <assert.h>
+
+#define DC_TEST(exp)        assert(exp)
+// { if (! (exp) ) DC_TEST_BREAK(); }
+
+// Macros used to define a test functions.
+#define DC_DEFINE_TEST_FUNC_BEGIN(name)	/*static */int name(/*const char* DC_TEST_PATH=NULL*/) { /*@@@ add logging*/ int TEST_STATE = TRUE;
+#define DC_DEFINE_TEST_FUNC_END			/*@@@ add logging*/ return TEST_STATE; }
--- a/test/plain/test_framework.h	Mon Aug 08 11:54:50 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-
- Package: dyncall
- Library: test
- File: test/plain/test_framework.h
- Description: 
- License:
-
-   Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>, 
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   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 TRUE
-#define TRUE (1)
-#endif
-
-#ifndef FALSE
-#define FALSE (0)
-#endif
-
-// Statement breaking into debugger (for various platforms). @@@add if defined, etc...
-#ifdef _WIN32
-# ifdef _MSC_VER
-#  define DC_TEST_BREAK __debugbreak
-# else
-#  include <windows.h>
-#  define DC_TEST_BREAK DebugBreak
-# endif
-#else
-# define DC_TEST_BREAK
-#endif
-
-// Test state - evaluates to false inside a test function if a test fails.
-#define DC_TEST_STATE				testFramework_state
-
-// Test functions defined by DC_DEFINE_TEST_FUNC_BEGIN and DC_DEFINE_TEST_FUNC_END pairs do come with
-// a default parameter used to pass a path to them specifying where to find external data needed to
-// run the tests (if desired). NULL by default. It can be queried by using DC_TEST_PATH.
-#define DC_TEST_PATH				testFramework_suitePath
-
-// Test a single expression - the expression must evaluate to true in order to succeed.
-// #define DC_TEST(exp)				{ TEST_STATE = TEST_STATE && (exp); if(!TEST_STATE) DC_TEST_BREAK(); }
-
-#include <assert.h>
-
-#define DC_TEST(exp)        assert(exp)
-// { if (! (exp) ) DC_TEST_BREAK(); }
-
-// Macros used to define a test functions.
-#define DC_DEFINE_TEST_FUNC_BEGIN(name)	/*static */int name(/*const char* DC_TEST_PATH=NULL*/) { /*@@@ add logging*/ int TEST_STATE = TRUE;
-#define DC_DEFINE_TEST_FUNC_END			/*@@@ add logging*/ return TEST_STATE; }
--- a/test/plain/test_main.c	Mon Aug 08 11:54:50 2016 +0200
+++ b/test/plain/test_main.c	Sat Aug 20 15:57:20 2016 +0200
@@ -26,7 +26,7 @@
 
 
 
-#include "test_framework.h"
+#include "../common/test_framework.h"
 #include "../../dyncall/dyncall.h"
 #include "../common/platformInit.h"
 #include "../common/platformInit.c" /* Impl. for functions only used in this translation unit */
--- a/test/plain/test_structs.c	Mon Aug 08 11:54:50 2016 +0200
+++ b/test/plain/test_structs.c	Sat Aug 20 15:57:20 2016 +0200
@@ -25,7 +25,7 @@
 
 
 
-#include "test_framework.h"
+#include "../common/test_framework.h"
 #include "../../dyncall/dyncall.h"
 #include "../../dyncall/dyncall_signature.h"
 #include "../../dyncall/dyncall_struct.h"
--- a/test/plain_c++/test_framework.h	Mon Aug 08 11:54:50 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-
- Package: dyncall
- Library: test
- File: test/plain_c++/test_framework.h
- Description: 
- License:
-
-   Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>, 
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   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.
-
-*/
-
-
-
-// 2007-10-11
-
-#ifndef TRUE
-#define TRUE (1)
-#endif
-
-#ifndef FALSE
-#define FALSE (0)
-#endif
-
-// Statement breaking into debugger (for various platforms). @@@add if defined, etc...
-#ifdef _WIN32
-# ifdef _MSC_VER
-#  define DC_TEST_BREAK __debugbreak
-# else
-#  include <windows.h>
-#  define DC_TEST_BREAK DebugBreak
-# endif
-#else
-# define DC_TEST_BREAK
-#endif
-
-// Test state - evaluates to false inside a test function if a test fails.
-#define DC_TEST_STATE				testFramework_state
-
-// Test functions defined by DC_DEFINE_TEST_FUNC_BEGIN and DC_DEFINE_TEST_FUNC_END pairs do come with
-// a default parameter used to pass a path to them specifying where to find external data needed to
-// run the tests (if desired). NULL by default. It can be queried by using DC_TEST_PATH.
-#define DC_TEST_PATH				testFramework_suitePath
-
-// Test a single expression - the expression must evaluate to true in order to succeed.
-// #define DC_TEST(exp)				{ TEST_STATE = TEST_STATE && (exp); if(!TEST_STATE) DC_TEST_BREAK(); }
-
-#include <assert.h>
-
-#define DC_TEST(exp)        assert(exp)
-// { if (! (exp) ) DC_TEST_BREAK(); }
-
-// Macros used to define a test functions.
-#define DC_DEFINE_TEST_FUNC_BEGIN(name)	/*static */int name(/*const char* DC_TEST_PATH=NULL*/) { /*@@@ add logging*/ int TEST_STATE = TRUE;
-#define DC_DEFINE_TEST_FUNC_END			/*@@@ add logging*/ return TEST_STATE; }
--- a/test/plain_c++/test_main.cc	Mon Aug 08 11:54:50 2016 +0200
+++ b/test/plain_c++/test_main.cc	Sat Aug 20 15:57:20 2016 +0200
@@ -26,7 +26,7 @@
 
 
 
-#include "test_framework.h"
+#include "../common/test_framework.h"
 #include "../../dyncall/dyncall.h"
 #include "../common/platformInit.h"
 #include "../common/platformInit.c" /* Impl. for functions only used in this translation unit */