rbdc 0.9.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dyncall/BUGS +1 -1
- data/dyncall/CMakeLists.txt +19 -7
- data/dyncall/ChangeLog +61 -20
- data/dyncall/LICENSE +1 -1
- data/dyncall/Makefile.generic +2 -0
- data/dyncall/ToDo +97 -29
- data/dyncall/autovar/README.txt +1 -0
- data/dyncall/autovar/autovar_ABI.h +4 -2
- data/dyncall/autovar/autovar_ARCH.h +9 -5
- data/dyncall/autovar/autovar_CC.h +3 -1
- data/dyncall/autovar/autovar_OS.h +2 -2
- data/dyncall/autovar/autovar_OSFAMILY.h +1 -1
- data/dyncall/configure +94 -38
- data/dyncall/dyncall/dyncall.3 +8 -4
- data/dyncall/dyncall/dyncall.h +1 -1
- data/dyncall/dyncall/dyncall_alloc.h +1 -1
- data/dyncall/dyncall/dyncall_api.c +3 -1
- data/dyncall/dyncall/dyncall_call.S +13 -5
- data/dyncall/dyncall/dyncall_call_arm32_arm.S +1 -2
- data/dyncall/dyncall/dyncall_call_arm32_arm.h +1 -1
- data/dyncall/dyncall/dyncall_call_arm32_arm_armhf.S +24 -26
- data/dyncall/dyncall/dyncall_call_arm32_arm_armhf.h +1 -1
- data/dyncall/dyncall/dyncall_call_arm32_thumb.h +1 -1
- data/dyncall/dyncall/dyncall_call_arm32_thumb_armhf.S +1 -1
- data/dyncall/dyncall/dyncall_call_arm32_thumb_gas.s +3 -7
- data/dyncall/dyncall/dyncall_call_arm64.S +2 -2
- data/dyncall/dyncall/dyncall_call_arm64.h +2 -2
- data/dyncall/dyncall/dyncall_call_mips.h +1 -1
- data/dyncall/dyncall/dyncall_call_mips_eabi.h +1 -1
- data/dyncall/dyncall/dyncall_call_mips_eabi_gas.s +16 -16
- data/dyncall/dyncall/dyncall_call_mips_gas.S +2 -2
- data/dyncall/dyncall/dyncall_call_mips_n32.h +5 -4
- data/dyncall/dyncall/dyncall_call_mips_n32_gas.s +4 -4
- data/dyncall/dyncall/dyncall_call_mips_n64.h +3 -3
- data/dyncall/dyncall/dyncall_call_mips_n64_gas.s +2 -2
- data/dyncall/dyncall/dyncall_call_mips_o32.h +4 -3
- data/dyncall/dyncall/dyncall_call_mips_o32_gas.s +1 -3
- data/dyncall/dyncall/dyncall_call_ppc32.S +1 -1
- data/dyncall/dyncall/dyncall_call_ppc32.h +1 -1
- data/dyncall/dyncall/dyncall_call_sparc.h +1 -1
- data/dyncall/dyncall/{dyncall_call_sparc.S → dyncall_call_sparc.s} +39 -44
- data/dyncall/dyncall/dyncall_call_sparc64.h +5 -5
- data/dyncall/dyncall/dyncall_call_sparc64.s +177 -0
- data/dyncall/dyncall/dyncall_call_x64.S +83 -86
- data/dyncall/dyncall/dyncall_call_x64.h +1 -1
- data/dyncall/dyncall/dyncall_call_x86.S +9 -9
- data/dyncall/dyncall/dyncall_call_x86.h +1 -1
- data/dyncall/dyncall/dyncall_call_x86_nasm.asm +5 -5
- data/dyncall/dyncall/dyncall_callf.c +18 -18
- data/dyncall/dyncall/dyncall_callf.h +1 -1
- data/dyncall/dyncall/dyncall_callvm.c +3 -3
- data/dyncall/dyncall/dyncall_callvm.h +1 -1
- data/dyncall/dyncall/dyncall_callvm_arm32_arm.c +25 -40
- data/dyncall/dyncall/dyncall_callvm_arm32_arm.h +1 -5
- data/dyncall/dyncall/dyncall_callvm_arm32_arm_armhf.c +25 -33
- data/dyncall/dyncall/dyncall_callvm_arm32_arm_armhf.h +1 -5
- data/dyncall/dyncall/dyncall_callvm_arm32_thumb.c +24 -36
- data/dyncall/dyncall/dyncall_callvm_arm32_thumb.h +1 -5
- data/dyncall/dyncall/dyncall_callvm_arm64.c +23 -27
- data/dyncall/dyncall/dyncall_callvm_arm64.h +2 -6
- data/dyncall/dyncall/dyncall_callvm_arm64_apple.c +23 -30
- data/dyncall/dyncall/dyncall_callvm_base.c +1 -1
- data/dyncall/dyncall/dyncall_callvm_mips.c +1 -1
- data/dyncall/dyncall/dyncall_callvm_mips.h +1 -1
- data/dyncall/dyncall/dyncall_callvm_mips_eabi.c +30 -27
- data/dyncall/dyncall/dyncall_callvm_mips_eabi.h +1 -5
- data/dyncall/dyncall/dyncall_callvm_mips_n32.c +24 -30
- data/dyncall/dyncall/{dyncall_call_sparc_v9.h → dyncall_callvm_mips_n32.h} +18 -8
- data/dyncall/dyncall/dyncall_callvm_mips_n64.c +23 -30
- data/dyncall/dyncall/dyncall_callvm_mips_n64.h +4 -6
- data/dyncall/dyncall/dyncall_callvm_mips_o32.c +31 -29
- data/dyncall/dyncall/dyncall_callvm_mips_o32.h +1 -3
- data/dyncall/dyncall/dyncall_callvm_ppc32.c +22 -20
- data/dyncall/dyncall/dyncall_callvm_ppc32.h +1 -3
- data/dyncall/dyncall/dyncall_callvm_ppc64.c +54 -15
- data/dyncall/dyncall/dyncall_callvm_ppc64.h +0 -2
- data/dyncall/dyncall/dyncall_callvm_sparc.c +34 -26
- data/dyncall/dyncall/dyncall_callvm_sparc.h +1 -3
- data/dyncall/dyncall/dyncall_callvm_sparc64.c +94 -150
- data/dyncall/dyncall/dyncall_callvm_sparc64.h +11 -17
- data/dyncall/dyncall/dyncall_callvm_x64.c +37 -36
- data/dyncall/dyncall/dyncall_callvm_x64.h +1 -4
- data/dyncall/dyncall/dyncall_callvm_x86.c +22 -63
- data/dyncall/dyncall/dyncall_callvm_x86.h +1 -17
- data/dyncall/dyncall/dyncall_config.h +1 -1
- data/dyncall/dyncall/dyncall_macros.h +28 -19
- data/dyncall/dyncall/dyncall_signature.h +1 -1
- data/dyncall/dyncall/dyncall_types.h +17 -18
- data/dyncall/dyncall/dyncall_utils.h +1 -1
- data/dyncall/dyncall/dyncall_value.h +28 -21
- data/dyncall/dyncall/dyncall_vector.c +1 -1
- data/dyncall/dyncall/dyncall_vector.h +1 -1
- data/dyncall/dyncall/gen-masm.sh +2 -2
- data/dyncall/dyncallback/CMakeLists.txt +1 -2
- data/dyncall/dyncallback/Makefile.generic +1 -1
- data/dyncall/dyncallback/dyncall_alloc_wx.c +1 -1
- data/dyncall/dyncallback/dyncall_alloc_wx.h +4 -3
- data/dyncall/dyncallback/dyncall_alloc_wx_malloc.c +8 -2
- data/dyncall/dyncallback/dyncall_alloc_wx_mmap.c +67 -4
- data/dyncall/dyncallback/dyncall_alloc_wx_win32.c +7 -2
- data/dyncall/dyncallback/dyncall_args.c +19 -15
- data/dyncall/dyncallback/dyncall_args.h +1 -1
- data/dyncall/dyncallback/{dyncall_args_arm32_arm.c → dyncall_args_arm32.c} +4 -4
- data/dyncall/dyncallback/{dyncall_args_arm32_arm.h → dyncall_args_arm32.h} +6 -6
- data/dyncall/dyncallback/dyncall_args_arm64.c +2 -2
- data/dyncall/dyncallback/dyncall_args_arm64_apple.c +2 -2
- data/dyncall/dyncallback/dyncall_args_mips.c +26 -21
- data/dyncall/dyncallback/dyncall_args_mips.h +18 -6
- data/dyncall/dyncallback/dyncall_args_mips64.c +81 -0
- data/dyncall/dyncallback/dyncall_args_mips_o32.c +104 -0
- data/dyncall/dyncallback/dyncall_args_ppc32.c +2 -2
- data/dyncall/dyncallback/dyncall_args_ppc32.h +1 -1
- data/dyncall/dyncallback/dyncall_args_ppc32_sysv.c +1 -1
- data/dyncall/dyncallback/dyncall_args_ppc64.c +24 -3
- data/dyncall/dyncallback/dyncall_args_sparc32.c +41 -15
- data/dyncall/dyncallback/dyncall_args_sparc32.h +2 -2
- data/dyncall/dyncallback/dyncall_args_sparc64.c +28 -15
- data/dyncall/dyncallback/dyncall_args_sparc64.h +7 -3
- data/dyncall/dyncallback/dyncall_args_x64.c +1 -1
- data/dyncall/dyncallback/dyncall_args_x64.h +1 -1
- data/dyncall/dyncallback/dyncall_args_x86.c +1 -1
- data/dyncall/dyncallback/dyncall_args_x86.h +1 -1
- data/dyncall/dyncallback/dyncall_callback.c +10 -12
- data/dyncall/dyncallback/dyncall_callback.h +2 -4
- data/dyncall/dyncallback/dyncall_callback_arch.S +12 -2
- data/dyncall/dyncallback/{dyncall_callback_arm32_arm.c → dyncall_callback_arm32.c} +25 -10
- data/dyncall/dyncallback/dyncall_callback_arm32_arm_apple.s +7 -7
- data/dyncall/dyncallback/dyncall_callback_arm32_arm_gas.S +9 -9
- data/dyncall/dyncallback/dyncall_callback_arm32_thumb_apple.S +1 -1
- data/dyncall/dyncallback/dyncall_callback_arm32_thumb_gas.S +1 -1
- data/dyncall/dyncallback/dyncall_callback_arm64.S +2 -2
- data/dyncall/dyncallback/dyncall_callback_arm64.c +20 -14
- data/dyncall/dyncallback/dyncall_callback_mips.c +26 -9
- data/dyncall/dyncallback/dyncall_callback_mips_eabi_gas.s +99 -0
- data/dyncall/dyncallback/{dyncall_args_arm32_thumb.h → dyncall_callback_mips_gas.S} +14 -9
- data/dyncall/dyncallback/{dyncall_callback_arm32_thumb.c → dyncall_callback_mips_n32_gas.s} +12 -7
- data/dyncall/dyncallback/dyncall_callback_mips_n64_gas.s +98 -0
- data/dyncall/dyncallback/dyncall_callback_mips_o32_gas.s +100 -0
- data/dyncall/dyncallback/dyncall_callback_ppc32.S +54 -54
- data/dyncall/dyncallback/dyncall_callback_ppc32.c +23 -5
- data/dyncall/dyncallback/dyncall_callback_ppc32_apple.s +92 -117
- data/dyncall/dyncallback/dyncall_callback_ppc64.S +2 -2
- data/dyncall/dyncallback/dyncall_callback_ppc64.c +23 -5
- data/dyncall/dyncallback/dyncall_callback_sparc32.c +25 -7
- data/dyncall/dyncallback/dyncall_callback_sparc32.s +55 -4
- data/dyncall/dyncallback/dyncall_callback_sparc64.c +25 -7
- data/dyncall/dyncallback/dyncall_callback_sparc64.s +89 -5
- data/dyncall/dyncallback/dyncall_callback_x64.S +8 -8
- data/dyncall/dyncallback/dyncall_callback_x64.c +19 -6
- data/dyncall/dyncallback/dyncall_callback_x86.S +29 -25
- data/dyncall/dyncallback/dyncall_callback_x86.c +24 -11
- data/dyncall/dyncallback/dyncall_thunk.c +6 -6
- data/dyncall/dyncallback/dyncall_thunk.h +9 -7
- data/dyncall/dyncallback/{dyncall_thunk_arm32_arm.c → dyncall_thunk_arm32.c} +5 -3
- data/dyncall/dyncallback/{dyncall_thunk_arm32_arm.h → dyncall_thunk_arm32.h} +7 -7
- data/dyncall/dyncallback/dyncall_thunk_arm64.c +2 -2
- data/dyncall/dyncallback/dyncall_thunk_arm64.h +8 -13
- data/dyncall/dyncallback/dyncall_thunk_mips.c +16 -20
- data/dyncall/dyncallback/dyncall_thunk_mips.h +4 -2
- data/dyncall/dyncallback/dyncall_thunk_mips64.c +103 -0
- data/dyncall/dyncallback/{dyncall_callback_arm32_thumb.h → dyncall_thunk_mips64.h} +15 -8
- data/dyncall/dyncallback/dyncall_thunk_ppc32.c +4 -4
- data/dyncall/dyncallback/dyncall_thunk_ppc32.h +1 -1
- data/dyncall/dyncallback/dyncall_thunk_ppc32_sysv.c +9 -9
- data/dyncall/dyncallback/dyncall_thunk_ppc64.c +2 -2
- data/dyncall/dyncallback/dyncall_thunk_sparc32.c +19 -2
- data/dyncall/dyncallback/dyncall_thunk_sparc32.h +5 -4
- data/dyncall/dyncallback/dyncall_thunk_sparc64.c +42 -2
- data/dyncall/dyncallback/dyncall_thunk_sparc64.h +5 -5
- data/dyncall/dyncallback/dyncall_thunk_x64.c +1 -1
- data/dyncall/dyncallback/dyncall_thunk_x64.h +2 -2
- data/dyncall/dyncallback/dyncall_thunk_x86.c +1 -1
- data/dyncall/dyncallback/dyncall_thunk_x86.h +2 -2
- data/dyncall/dyncallback/dyncallback.3 +16 -11
- data/dyncall/dynload/dynload.3 +63 -8
- data/dyncall/dynload/dynload.c +2 -8
- data/dyncall/dynload/dynload.h +9 -5
- data/dyncall/dynload/dynload_alloc.h +1 -1
- data/dyncall/dynload/dynload_syms.c +1 -3
- data/dyncall/dynload/dynload_syms_elf.c +19 -11
- data/dyncall/dynload/dynload_syms_mach-o.c +151 -75
- data/dyncall/dynload/dynload_syms_pe.c +24 -24
- data/dyncall/dynload/dynload_unix.c +156 -13
- data/dyncall/dynload/dynload_windows.c +15 -11
- data/dyncall/portasm/portasm-arm.S +1 -1
- data/dyncall/portasm/portasm-ppc.S +1 -1
- data/dyncall/portasm/{portasm-x64-att.S → portasm-x64.S} +7 -4
- data/dyncall/portasm/portasm-x86.S +4 -2
- data/{dyncall-bindings/ruby/rbdc/extconf.rb → extconf.rb} +4 -4
- data/{dyncall-bindings/ruby/rbdc/rbdc.c → rbdc.c} +5 -5
- metadata +24 -48
- data/dyncall/Makefile.M +0 -15
- data/dyncall/buildsys/dynmake/Makefile.base.M +0 -82
- data/dyncall/buildsys/dynmake/dynmake.bat +0 -2
- data/dyncall/buildsys/dynmake/dynmake.sh +0 -4
- data/dyncall/dynMakefile +0 -4
- data/dyncall/dyncall/Makefile.M +0 -10
- data/dyncall/dyncall/TODO +0 -9
- data/dyncall/dyncall/dynMakefile +0 -4
- data/dyncall/dyncall/dyncall_call_sparc64.S +0 -362
- data/dyncall/dyncall/dyncall_call_sparc_v9.S +0 -222
- data/dyncall/dyncall/dyncall_call_x64-att.S +0 -147
- data/dyncall/dyncall/dyncall_callvm_sparc_v9.c +0 -182
- data/dyncall/dyncall/dyncall_callvm_sparc_v9.h +0 -46
- data/dyncall/dyncallback/Makefile.M +0 -10
- data/dyncall/dyncallback/README.txt +0 -9
- data/dyncall/dyncallback/TODO +0 -4
- data/dyncall/dyncallback/dynMakefile +0 -4
- data/dyncall/dyncallback/dyncall_args_arm32_thumb.c +0 -30
- data/dyncall/dyncallback/dyncall_callback_arm32_arm.h +0 -46
- data/dyncall/dyncallback/dyncall_callback_mips.h +0 -43
- data/dyncall/dyncallback/dyncall_callback_ppc32.h +0 -43
- data/dyncall/dyncallback/dyncall_callback_ppc64.h +0 -56
- data/dyncall/dyncallback/dyncall_callback_sparc32.h +0 -44
- data/dyncall/dyncallback/dyncall_callback_x64.h +0 -45
- data/dyncall/dyncallback/dyncall_callback_x86.h +0 -50
- data/dyncall/dyncallback/dyncall_thunk_arm32_thumb.c +0 -30
- data/dyncall/dyncallback/dyncall_thunk_arm32_thumb.h +0 -36
- data/dyncall/dynload/Makefile.M +0 -10
- data/dyncall/dynload/TODO +0 -20
- data/dyncall/dynload/dynMakefile +0 -4
- data/dyncall/dynload/dynload_darwin.c +0 -90
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: heap memory management interface (header only)
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2007-
|
9
|
+
Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>,
|
10
10
|
Tassilo Philipp <tphilipp@potion-studios.com>
|
11
11
|
|
12
12
|
Permission to use, copy, modify, and distribute this software for any
|
@@ -226,9 +226,9 @@ EXPORT_C dcCall_x86_win32_fast
|
|
226
226
|
|
227
227
|
ret
|
228
228
|
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
section .note.GNU-stack noalloc noexec nowrite progbits
|
233
|
-
|
229
|
+
;; Stack markings for ELF/GNU to specify no executable stack */
|
230
|
+
;
|
231
|
+
;%ifidn __OUTPUT_FORMAT__,elf
|
232
|
+
;section .note.GNU-stack noalloc noexec nowrite progbits
|
233
|
+
;%endif
|
234
234
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: formatted call C interface (extension module)
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2007-
|
9
|
+
Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>,
|
10
10
|
Tassilo Philipp <tphilipp@potion-studios.com>
|
11
11
|
|
12
12
|
Permission to use, copy, modify, and distribute this software for any
|
@@ -28,7 +28,7 @@
|
|
28
28
|
#include "dyncall_callf.h"
|
29
29
|
|
30
30
|
|
31
|
-
|
31
|
+
/* Shareable implementation for argument binding used in ArgF and CallF below. */
|
32
32
|
static void dcArgF_impl(DCCallVM* vm, const DCsigchar** sigptr, va_list args)
|
33
33
|
{
|
34
34
|
DCsigchar ch;
|
@@ -73,22 +73,22 @@ void dcVCallF(DCCallVM* vm, DCValue* result, DCpointer funcptr, const DCsigchar*
|
|
73
73
|
dcArgF_impl(vm, &ptr, args);
|
74
74
|
|
75
75
|
switch(*ptr) {
|
76
|
-
case DC_SIGCHAR_VOID: dcCallVoid
|
77
|
-
case DC_SIGCHAR_BOOL: result->B = dcCallBool
|
78
|
-
case DC_SIGCHAR_CHAR: result->c = dcCallChar
|
79
|
-
case DC_SIGCHAR_UCHAR: result->C = (DCuchar)dcCallChar(vm,funcptr); break;
|
80
|
-
case DC_SIGCHAR_SHORT: result->s = dcCallShort
|
81
|
-
case DC_SIGCHAR_USHORT: result->S = dcCallShort
|
82
|
-
case DC_SIGCHAR_INT: result->i = dcCallInt
|
83
|
-
case DC_SIGCHAR_UINT: result->I = dcCallInt
|
84
|
-
case DC_SIGCHAR_LONG: result->j = dcCallLong
|
85
|
-
case DC_SIGCHAR_ULONG: result->J = dcCallLong
|
86
|
-
case DC_SIGCHAR_LONGLONG: result->l = dcCallLongLong
|
87
|
-
case DC_SIGCHAR_ULONGLONG: result->L = dcCallLongLong
|
88
|
-
case DC_SIGCHAR_FLOAT: result->f = dcCallFloat
|
89
|
-
case DC_SIGCHAR_DOUBLE: result->d = dcCallDouble
|
90
|
-
case DC_SIGCHAR_POINTER: result->p = dcCallPointer
|
91
|
-
case DC_SIGCHAR_STRING: result->Z = dcCallPointer
|
76
|
+
case DC_SIGCHAR_VOID: dcCallVoid (vm,funcptr); break;
|
77
|
+
case DC_SIGCHAR_BOOL: result->B = dcCallBool (vm,funcptr); break;
|
78
|
+
case DC_SIGCHAR_CHAR: result->c = dcCallChar (vm,funcptr); break;
|
79
|
+
case DC_SIGCHAR_UCHAR: result->C = (DCuchar)dcCallChar (vm,funcptr); break;
|
80
|
+
case DC_SIGCHAR_SHORT: result->s = dcCallShort (vm,funcptr); break;
|
81
|
+
case DC_SIGCHAR_USHORT: result->S = dcCallShort (vm,funcptr); break;
|
82
|
+
case DC_SIGCHAR_INT: result->i = dcCallInt (vm,funcptr); break;
|
83
|
+
case DC_SIGCHAR_UINT: result->I = dcCallInt (vm,funcptr); break;
|
84
|
+
case DC_SIGCHAR_LONG: result->j = dcCallLong (vm,funcptr); break;
|
85
|
+
case DC_SIGCHAR_ULONG: result->J = dcCallLong (vm,funcptr); break;
|
86
|
+
case DC_SIGCHAR_LONGLONG: result->l = dcCallLongLong (vm,funcptr); break;
|
87
|
+
case DC_SIGCHAR_ULONGLONG: result->L = dcCallLongLong (vm,funcptr); break;
|
88
|
+
case DC_SIGCHAR_FLOAT: result->f = dcCallFloat (vm,funcptr); break;
|
89
|
+
case DC_SIGCHAR_DOUBLE: result->d = dcCallDouble (vm,funcptr); break;
|
90
|
+
case DC_SIGCHAR_POINTER: result->p = dcCallPointer (vm,funcptr); break;
|
91
|
+
case DC_SIGCHAR_STRING: result->Z = (DCstring)dcCallPointer(vm,funcptr); break;
|
92
92
|
}
|
93
93
|
}
|
94
94
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: formatted call interface to dyncall
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2007-
|
9
|
+
Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>,
|
10
10
|
Tassilo Philipp <tphilipp@potion-studios.com>
|
11
11
|
|
12
12
|
Permission to use, copy, modify, and distribute this software for any
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: auto-select default callvm (includes other C sources).
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2007-
|
9
|
+
Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>,
|
10
10
|
Tassilo Philipp <tphilipp@potion-studios.com>
|
11
11
|
|
12
12
|
Permission to use, copy, modify, and distribute this software for any
|
@@ -67,8 +67,8 @@
|
|
67
67
|
# endif
|
68
68
|
#elif defined(DC__Arch_Sparc)
|
69
69
|
# include "dyncall_callvm_sparc.c"
|
70
|
-
#elif defined(
|
71
|
-
# include "
|
70
|
+
#elif defined(DC__Arch_Sparc64)
|
71
|
+
# include "dyncall_callvm_sparc64.c"
|
72
72
|
#elif defined(DC__Arch_RiscV)
|
73
73
|
# include "dyncall_callvm_riscv.c"
|
74
74
|
#else
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: Common call vm binary interface.
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2007-
|
9
|
+
Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>,
|
10
10
|
Tassilo Philipp <tphilipp@potion-studios.com>
|
11
11
|
|
12
12
|
Permission to use, copy, modify, and distribute this software for any
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: ARM 32-bit "arm" ABI callvm implementation
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2007-
|
9
|
+
Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>,
|
10
10
|
Tassilo Philipp <tphilipp@potion-studios.com>
|
11
11
|
|
12
12
|
Permission to use, copy, modify, and distribute this software for any
|
@@ -41,18 +41,6 @@
|
|
41
41
|
#include "dyncall_callvm_arm32_arm.h"
|
42
42
|
#include "dyncall_alloc.h"
|
43
43
|
|
44
|
-
static void dc_callvm_mode_arm32_arm(DCCallVM* in_self,DCint mode);
|
45
|
-
|
46
|
-
static DCCallVM* dc_callvm_new_arm32_arm(DCCallVM_vt* vt, DCsize size)
|
47
|
-
{
|
48
|
-
/* Store at least 16 bytes (4 words) for internal spill area. Assembly code depends on it. */
|
49
|
-
DCCallVM_arm32_arm* self = (DCCallVM_arm32_arm*)dcAllocMem(sizeof(DCCallVM_arm32_arm)+size+16);
|
50
|
-
dc_callvm_base_init(&self->mInterface, vt);
|
51
|
-
dcVecInit(&self->mVecHead, size);
|
52
|
-
return (DCCallVM*)self;
|
53
|
-
}
|
54
|
-
|
55
|
-
|
56
44
|
static void dc_callvm_free_arm32_arm(DCCallVM* in_self)
|
57
45
|
{
|
58
46
|
dcFreeMem(in_self);
|
@@ -152,6 +140,7 @@ void dc_callvm_call_arm32_arm(DCCallVM* in_self, DCpointer target)
|
|
152
140
|
dcCall_arm32_arm(target, dcVecData(&self->mVecHead), dcVecSize(&self->mVecHead));
|
153
141
|
}
|
154
142
|
|
143
|
+
static void dc_callvm_mode_arm32_arm(DCCallVM* in_self, DCint mode);
|
155
144
|
|
156
145
|
DCCallVM_vt gVT_arm32_arm =
|
157
146
|
{
|
@@ -181,7 +170,6 @@ DCCallVM_vt gVT_arm32_arm =
|
|
181
170
|
, NULL /* callStruct */
|
182
171
|
};
|
183
172
|
|
184
|
-
|
185
173
|
DCCallVM_vt gVT_arm32_arm_eabi =
|
186
174
|
{
|
187
175
|
&dc_callvm_free_arm32_arm
|
@@ -210,42 +198,39 @@ DCCallVM_vt gVT_arm32_arm_eabi =
|
|
210
198
|
, NULL /* callStruct */
|
211
199
|
};
|
212
200
|
|
213
|
-
|
214
|
-
DCCallVM* dcNewCallVM_arm32_arm(DCsize size)
|
215
|
-
{
|
216
|
-
/* Check OS if we need EABI as default. */
|
217
|
-
#if defined(DC__ABI_ARM_EABI)
|
218
|
-
return dc_callvm_new_arm32_arm(&gVT_arm32_arm_eabi, size);
|
219
|
-
#else
|
220
|
-
return dc_callvm_new_arm32_arm(&gVT_arm32_arm, size);
|
221
|
-
#endif
|
222
|
-
}
|
223
|
-
|
224
|
-
|
225
|
-
DCCallVM* dcNewCallVM(DCsize size)
|
201
|
+
static void dc_callvm_mode_arm32_arm(DCCallVM* in_self, DCint mode)
|
226
202
|
{
|
227
|
-
|
228
|
-
|
203
|
+
DCCallVM_arm32_arm* self = (DCCallVM_arm32_arm*)in_self;
|
204
|
+
DCCallVM_vt* vt;
|
229
205
|
|
230
|
-
static void dc_callvm_mode_arm32_arm(DCCallVM* in_self,DCint mode)
|
231
|
-
{
|
232
|
-
DCCallVM_arm32_arm* self = (DCCallVM_arm32_arm*) in_self;
|
233
|
-
DCCallVM_vt* vt;
|
234
206
|
switch(mode) {
|
235
|
-
/* Check OS if we need EABI as default. */
|
236
207
|
case DC_CALL_C_ELLIPSIS:
|
237
208
|
case DC_CALL_C_ELLIPSIS_VARARGS:
|
209
|
+
/* Check OS if we need EABI as default. */
|
238
210
|
#if defined(DC__ABI_ARM_EABI)
|
239
|
-
case DC_CALL_C_DEFAULT:
|
211
|
+
case DC_CALL_C_DEFAULT: vt = &gVT_arm32_arm_eabi; break;
|
240
212
|
#else
|
241
|
-
case DC_CALL_C_DEFAULT:
|
213
|
+
case DC_CALL_C_DEFAULT: vt = &gVT_arm32_arm; break;
|
242
214
|
#endif
|
243
|
-
case DC_CALL_C_ARM_ARM:
|
244
|
-
case DC_CALL_C_ARM_ARM_EABI:
|
215
|
+
case DC_CALL_C_ARM_ARM: vt = &gVT_arm32_arm; break;
|
216
|
+
case DC_CALL_C_ARM_ARM_EABI: vt = &gVT_arm32_arm_eabi; break;
|
245
217
|
default:
|
246
|
-
|
218
|
+
self->mInterface.mError = DC_ERROR_UNSUPPORTED_MODE;
|
247
219
|
return;
|
248
220
|
}
|
249
|
-
self->mInterface
|
221
|
+
dc_callvm_base_init(&self->mInterface, vt);
|
222
|
+
}
|
223
|
+
|
224
|
+
/* Public API. */
|
225
|
+
DCCallVM* dcNewCallVM(DCsize size)
|
226
|
+
{
|
227
|
+
/* Store at least 16 bytes (4 words) for internal spill area. Assembly code depends on it. */
|
228
|
+
DCCallVM_arm32_arm* p = (DCCallVM_arm32_arm*)dcAllocMem(sizeof(DCCallVM_arm32_arm)+size+16);
|
229
|
+
|
230
|
+
dc_callvm_mode_arm32_arm((DCCallVM*)p, DC_CALL_C_DEFAULT);
|
231
|
+
|
232
|
+
dcVecInit(&p->mVecHead, size);
|
233
|
+
|
234
|
+
return (DCCallVM*)p;
|
250
235
|
}
|
251
236
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description:
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2007-
|
9
|
+
Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>,
|
10
10
|
Tassilo Philipp <tphilipp@potion-studios.com>
|
11
11
|
|
12
12
|
Permission to use, copy, modify, and distribute this software for any
|
@@ -45,7 +45,6 @@
|
|
45
45
|
#include "dyncall_callvm.h"
|
46
46
|
#include "dyncall_vector.h"
|
47
47
|
|
48
|
-
|
49
48
|
typedef struct
|
50
49
|
{
|
51
50
|
DCCallVM mInterface;
|
@@ -53,8 +52,5 @@ typedef struct
|
|
53
52
|
DCVecHead mVecHead;
|
54
53
|
} DCCallVM_arm32_arm;
|
55
54
|
|
56
|
-
DCCallVM* dcNewCallVM_arm32_arm(DCsize size);
|
57
|
-
|
58
|
-
|
59
55
|
#endif /* DYNCALL_CALLVM_ARM32_ARM_H */
|
60
56
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: ARM 'armhf' ABI implementation
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2007-
|
9
|
+
Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>,
|
10
10
|
Tassilo Philipp <tphilipp@potion-studios.com>
|
11
11
|
|
12
12
|
Permission to use, copy, modify, and distribute this software for any
|
@@ -28,20 +28,6 @@
|
|
28
28
|
#include "dyncall_alloc.h"
|
29
29
|
|
30
30
|
|
31
|
-
static DCCallVM* dc_callvm_new_arm32_armhf(DCCallVM_vt* vt, DCsize size)
|
32
|
-
{
|
33
|
-
/* Store at least 16 bytes (4 words for first 4 int args) for internal spill area. Assembly code depends on it. */
|
34
|
-
DCCallVM_arm32_armhf* p = (DCCallVM_arm32_armhf*)dcAllocMem(sizeof(DCCallVM_arm32_armhf)+size+16);
|
35
|
-
dc_callvm_base_init(&p->mInterface, vt);
|
36
|
-
dcVecInit(&p->mVecHead, size);
|
37
|
-
p->i = 0;
|
38
|
-
p->s = 0;
|
39
|
-
p->d = 0;
|
40
|
-
return (DCCallVM*)p;
|
41
|
-
}
|
42
|
-
|
43
|
-
static void mode(DCCallVM* in_self,DCint mode);
|
44
|
-
|
45
31
|
static void deinit(DCCallVM* in_self)
|
46
32
|
{
|
47
33
|
dcFreeMem(in_self);
|
@@ -114,7 +100,7 @@ static void a_double(DCCallVM* in_p, DCdouble x)
|
|
114
100
|
|
115
101
|
DCCallVM_arm32_armhf* p = (DCCallVM_arm32_armhf*)in_p;
|
116
102
|
if (p->d < 16) {
|
117
|
-
* (
|
103
|
+
* (DCdouble*) &p->S[p->d] = x;
|
118
104
|
p->d += 2;
|
119
105
|
if (!(p->s & 1)) {
|
120
106
|
/* if s is even it always equals d. otherwise, s points to an odd float register. */
|
@@ -145,6 +131,8 @@ void call(DCCallVM* in_p, DCpointer target)
|
|
145
131
|
dcCall_arm32_armhf(target, dcVecData(&p->mVecHead), dcVecSize(&p->mVecHead), &p->S[0]);
|
146
132
|
}
|
147
133
|
|
134
|
+
static void mode(DCCallVM* in_self,DCint mode);
|
135
|
+
|
148
136
|
DCCallVM_vt vt_armhf =
|
149
137
|
{
|
150
138
|
&deinit
|
@@ -201,34 +189,38 @@ DCCallVM_vt vt_armhf_ellipsis =
|
|
201
189
|
, NULL /* callStruct */
|
202
190
|
};
|
203
191
|
|
204
|
-
DCCallVM*
|
192
|
+
static void mode(DCCallVM* in_self, DCint mode)
|
205
193
|
{
|
206
|
-
|
207
|
-
|
208
|
-
#elif defined(DC__ABI_ARM_HF)
|
209
|
-
return dc_callvm_new_arm32_armhf(&vt_armhf, size);
|
210
|
-
#elif defined(DC__ABI_ARM_OABI)
|
211
|
-
return dc_callvm_new_arm32_arm(&oabi, size);
|
212
|
-
#else
|
213
|
-
#error unknown ARM abi
|
214
|
-
#endif
|
215
|
-
}
|
194
|
+
DCCallVM_arm32_armhf* self = (DCCallVM_arm32_armhf*)in_self;
|
195
|
+
DCCallVM_vt* vt;
|
216
196
|
|
217
|
-
static void mode(DCCallVM* in_self,DCint mode)
|
218
|
-
{
|
219
|
-
DCCallVM_arm32_armhf* self = (DCCallVM_arm32_armhf*) in_self;
|
220
197
|
switch(mode) {
|
221
198
|
case DC_CALL_C_DEFAULT:
|
222
199
|
case DC_CALL_C_ARM_ARMHF:
|
223
|
-
|
200
|
+
vt = &vt_armhf;
|
224
201
|
break;
|
225
202
|
case DC_CALL_C_ELLIPSIS:
|
226
203
|
case DC_CALL_C_ELLIPSIS_VARARGS:
|
227
|
-
|
204
|
+
vt = &vt_armhf_ellipsis;
|
228
205
|
break;
|
229
206
|
default:
|
230
|
-
|
207
|
+
self->mInterface.mError = DC_ERROR_UNSUPPORTED_MODE;
|
231
208
|
return;
|
232
209
|
}
|
210
|
+
dc_callvm_base_init(&self->mInterface, vt);
|
211
|
+
}
|
212
|
+
|
213
|
+
/* Public API. */
|
214
|
+
DCCallVM* dcNewCallVM(DCsize size)
|
215
|
+
{
|
216
|
+
/* Store at least 16 bytes (4 words for first 4 int args) for internal spill area. Assembly code depends on it. */
|
217
|
+
DCCallVM_arm32_armhf* p = (DCCallVM_arm32_armhf*)dcAllocMem(sizeof(DCCallVM_arm32_armhf)+size+16);
|
218
|
+
|
219
|
+
mode((DCCallVM*)p, DC_CALL_C_DEFAULT);
|
220
|
+
|
221
|
+
dcVecInit(&p->mVecHead, size);
|
222
|
+
reset((DCCallVM*)p);
|
223
|
+
|
224
|
+
return (DCCallVM*)p;
|
233
225
|
}
|
234
226
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description:
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2007-
|
9
|
+
Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>,
|
10
10
|
Tassilo Philipp <tphilipp@potion-studios.com>
|
11
11
|
|
12
12
|
Permission to use, copy, modify, and distribute this software for any
|
@@ -45,7 +45,6 @@
|
|
45
45
|
#include "dyncall_callvm.h"
|
46
46
|
#include "dyncall_vector.h"
|
47
47
|
|
48
|
-
|
49
48
|
typedef struct
|
50
49
|
{
|
51
50
|
DCCallVM mInterface;
|
@@ -57,8 +56,5 @@ typedef struct
|
|
57
56
|
DCVecHead mVecHead;
|
58
57
|
} DCCallVM_arm32_armhf;
|
59
58
|
|
60
|
-
DCCallVM* dcNewCallVM_arm32_armhf(DCsize size);
|
61
|
-
|
62
|
-
|
63
59
|
#endif /* DYNCALL_CALLVM_ARM32_ARM_H */
|
64
60
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: ARM 32-bit "thumb" ABI callvm implementation
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2007-
|
9
|
+
Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>,
|
10
10
|
Tassilo Philipp <tphilipp@potion-studios.com>
|
11
11
|
|
12
12
|
Permission to use, copy, modify, and distribute this software for any
|
@@ -43,16 +43,6 @@
|
|
43
43
|
|
44
44
|
static void dc_callvm_mode_arm32_thumb(DCCallVM* in_self,DCint mode);
|
45
45
|
|
46
|
-
static DCCallVM* dc_callvm_new_arm32_thumb(DCCallVM_vt* vt, DCsize size)
|
47
|
-
{
|
48
|
-
/* Store at least 16 bytes (4 words) for internal spill area. Assembly code depends on it. */
|
49
|
-
DCCallVM_arm32_thumb* self = (DCCallVM_arm32_thumb*)dcAllocMem(sizeof(DCCallVM_arm32_thumb)+size+16);
|
50
|
-
dc_callvm_base_init(&self->mInterface, vt);
|
51
|
-
dcVecInit(&self->mVecHead, size);
|
52
|
-
return (DCCallVM*)self;
|
53
|
-
}
|
54
|
-
|
55
|
-
|
56
46
|
static void dc_callvm_free_arm32_thumb(DCCallVM* in_self)
|
57
47
|
{
|
58
48
|
dcFreeMem(in_self);
|
@@ -181,7 +171,6 @@ DCCallVM_vt gVT_arm32_thumb =
|
|
181
171
|
, NULL /* callStruct */
|
182
172
|
};
|
183
173
|
|
184
|
-
|
185
174
|
DCCallVM_vt gVT_arm32_thumb_eabi =
|
186
175
|
{
|
187
176
|
&dc_callvm_free_arm32_thumb
|
@@ -210,40 +199,39 @@ DCCallVM_vt gVT_arm32_thumb_eabi =
|
|
210
199
|
, NULL /* callStruct */
|
211
200
|
};
|
212
201
|
|
213
|
-
|
214
|
-
DCCallVM* dcNewCallVM_arm32_thumb(DCsize size)
|
202
|
+
static void dc_callvm_mode_arm32_thumb(DCCallVM* in_self, DCint mode)
|
215
203
|
{
|
204
|
+
DCCallVM_arm32_thumb* self = (DCCallVM_arm32_thumb*)in_self;
|
205
|
+
DCCallVM_vt* vt;
|
206
|
+
|
207
|
+
switch(mode) {
|
208
|
+
case DC_CALL_C_ELLIPSIS:
|
209
|
+
case DC_CALL_C_ELLIPSIS_VARARGS:
|
216
210
|
/* Check OS if we need EABI as default. */
|
217
211
|
#if defined(DC__ABI_ARM_EABI)
|
218
|
-
|
212
|
+
case DC_CALL_C_DEFAULT: vt = &gVT_arm32_thumb_eabi; break;
|
219
213
|
#else
|
220
|
-
|
214
|
+
case DC_CALL_C_DEFAULT: vt = &gVT_arm32_thumb; break;
|
221
215
|
#endif
|
216
|
+
case DC_CALL_C_ARM_THUMB: vt = &gVT_arm32_thumb; break;
|
217
|
+
case DC_CALL_C_ARM_THUMB_EABI: vt = &gVT_arm32_thumb_eabi; break;
|
218
|
+
default:
|
219
|
+
self->mInterface.mError = DC_ERROR_UNSUPPORTED_MODE;
|
220
|
+
return;
|
221
|
+
}
|
222
|
+
dc_callvm_base_init(&self->mInterface, vt);
|
222
223
|
}
|
223
224
|
|
224
|
-
|
225
|
+
/* Public API. */
|
225
226
|
DCCallVM* dcNewCallVM(DCsize size)
|
226
227
|
{
|
227
|
-
|
228
|
-
|
228
|
+
/* Store at least 16 bytes (4 words) for internal spill area. Assembly code depends on it. */
|
229
|
+
DCCallVM_arm32_thumb* p = (DCCallVM_arm32_thumb*)dcAllocMem(sizeof(DCCallVM_arm32_thumb)+size+16);
|
229
230
|
|
231
|
+
dc_callvm_mode_arm32_thumb((DCCallVM*)p, DC_CALL_C_DEFAULT);
|
230
232
|
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
DCCallVM_vt* vt;
|
235
|
-
switch(mode) {
|
236
|
-
/* Check OS if we need EABI as default. */
|
237
|
-
case DC_CALL_C_ELLIPSIS:
|
238
|
-
#if defined(DC__ABI_ARM_EABI)
|
239
|
-
case DC_CALL_C_DEFAULT: vt = &gVT_arm32_thumb_eabi; break;
|
240
|
-
#else
|
241
|
-
case DC_CALL_C_DEFAULT: vt = &gVT_arm32_thumb; break;
|
242
|
-
#endif
|
243
|
-
case DC_CALL_C_ARM_THUMB: vt = &gVT_arm32_thumb; break;
|
244
|
-
case DC_CALL_C_ARM_THUMB_EABI: vt = &gVT_arm32_thumb_eabi; break;
|
245
|
-
default: self->mInterface.mError = DC_ERROR_UNSUPPORTED_MODE; return;
|
246
|
-
}
|
247
|
-
self->mInterface.mVTpointer = vt;
|
233
|
+
dcVecInit(&p->mVecHead, size);
|
234
|
+
|
235
|
+
return (DCCallVM*)p;
|
248
236
|
}
|
249
237
|
|