rbdc 0.8.7 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/{bindings → dyncall-bindings}/ruby/rbdc/extconf.rb +1 -1
- data/{bindings → dyncall-bindings}/ruby/rbdc/rbdc.c +3 -1
- data/dyncall/AUTHORS +2 -0
- data/dyncall/BUGS +1 -0
- data/dyncall/CMakeLists.txt +10 -2
- data/dyncall/ChangeLog +46 -11
- data/dyncall/LICENSE +4 -1
- data/dyncall/Makefile.embedded +7 -3
- data/dyncall/README +23 -14
- data/dyncall/ToDo +27 -28
- data/dyncall/autovar/autovar_ABI.h +3 -2
- data/dyncall/autovar/autovar_ARCH.h +13 -10
- data/dyncall/autovar/autovar_CC.h +3 -2
- data/dyncall/autovar/autovar_OS.h +3 -2
- data/dyncall/autovar/autovar_OSFAMILY.h +3 -2
- data/dyncall/buildsys/scripts/batch-build-linux.sh +6 -2
- data/dyncall/buildsys/scripts/batch-build-minix.sh +2 -0
- data/dyncall/buildsys/scripts/batch-build-psp.sh +4 -1
- data/dyncall/buildsys/scripts/elf-to-psp-eboot.sh +19 -0
- data/dyncall/buildsys/scripts/setenv-cross-ios.sh +0 -0
- data/dyncall/buildsys/scripts/setenv-sdk-ios.sh +0 -0
- data/dyncall/configure +83 -30
- data/dyncall/dyncall/dyncall.3 +16 -4
- data/dyncall/dyncall/dyncall.h +9 -1
- data/dyncall/dyncall/dyncall_alloc.h +2 -1
- data/dyncall/dyncall/dyncall_api.c +2 -1
- data/dyncall/dyncall/dyncall_call.S +9 -2
- data/dyncall/dyncall/dyncall_call_arm32_arm.S +2 -1
- data/dyncall/dyncall/dyncall_call_arm32_arm.h +8 -2
- data/dyncall/dyncall/dyncall_call_arm32_arm_armhf.S +11 -19
- data/dyncall/dyncall/dyncall_call_arm32_arm_armhf.h +15 -2
- data/dyncall/dyncall/dyncall_call_arm32_thumb.h +8 -6
- data/dyncall/dyncall/dyncall_call_arm32_thumb_armhf.S +10 -18
- data/dyncall/dyncall/dyncall_call_arm32_thumb_gas.s +0 -16
- data/dyncall/dyncall/dyncall_call_arm64.S +226 -0
- data/dyncall/dyncall/dyncall_call_arm64.h +45 -0
- data/dyncall/dyncall/dyncall_call_mips.h +2 -1
- data/dyncall/dyncall/dyncall_call_mips_eabi.h +2 -1
- data/dyncall/dyncall/dyncall_call_mips_gas.S +2 -1
- data/dyncall/dyncall/dyncall_call_mips_n32.h +2 -1
- data/dyncall/dyncall/dyncall_call_mips_n64.h +2 -1
- data/dyncall/dyncall/dyncall_call_mips_o32.h +2 -1
- data/dyncall/dyncall/dyncall_call_ppc32.S +27 -2
- data/dyncall/dyncall/dyncall_call_ppc32.h +2 -2
- data/dyncall/dyncall/dyncall_call_ppc64.S +210 -0
- data/dyncall/dyncall/dyncall_call_ppc64.h +55 -0
- data/dyncall/dyncall/dyncall_call_sparc.S +2 -1
- data/dyncall/dyncall/dyncall_call_sparc.h +2 -1
- data/dyncall/dyncall/dyncall_call_sparc64.S +2 -1
- data/dyncall/dyncall/dyncall_call_sparc64.h +2 -1
- data/dyncall/dyncall/dyncall_call_sparc_v9.S +25 -23
- data/dyncall/dyncall/dyncall_call_sparc_v9.h +2 -1
- data/dyncall/dyncall/dyncall_call_x64-att.S +2 -1
- data/dyncall/dyncall/dyncall_call_x64.S +2 -1
- data/dyncall/dyncall/dyncall_call_x64.h +2 -1
- data/dyncall/dyncall/dyncall_call_x86.S +2 -1
- data/dyncall/dyncall/dyncall_call_x86.h +2 -1
- data/dyncall/dyncall/dyncall_callf.c +56 -66
- data/dyncall/dyncall/dyncall_callf.h +5 -1
- data/dyncall/dyncall/dyncall_callvm.c +11 -2
- data/dyncall/dyncall/dyncall_callvm.h +2 -1
- data/dyncall/dyncall/dyncall_callvm_arm32_arm.c +2 -1
- data/dyncall/dyncall/dyncall_callvm_arm32_arm.h +2 -1
- data/dyncall/dyncall/dyncall_callvm_arm32_arm_armhf.c +60 -30
- data/dyncall/dyncall/dyncall_callvm_arm32_arm_armhf.h +3 -2
- data/dyncall/dyncall/dyncall_callvm_arm32_thumb.c +2 -24
- data/dyncall/dyncall/dyncall_callvm_arm32_thumb.h +2 -1
- data/dyncall/dyncall/dyncall_callvm_arm64.c +165 -0
- data/dyncall/dyncall/dyncall_callvm_arm64.h +51 -0
- data/dyncall/dyncall/dyncall_callvm_arm64_apple.c +272 -0
- data/dyncall/dyncall/dyncall_callvm_base.c +2 -1
- data/dyncall/dyncall/dyncall_callvm_mips.c +2 -1
- data/dyncall/dyncall/dyncall_callvm_mips.h +2 -1
- data/dyncall/dyncall/dyncall_callvm_mips_eabi.c +2 -1
- data/dyncall/dyncall/dyncall_callvm_mips_eabi.h +2 -1
- data/dyncall/dyncall/dyncall_callvm_mips_n32.c +2 -1
- data/dyncall/dyncall/dyncall_callvm_mips_n64.c +2 -1
- data/dyncall/dyncall/dyncall_callvm_mips_n64.h +2 -1
- data/dyncall/dyncall/dyncall_callvm_mips_o32.c +2 -1
- data/dyncall/dyncall/dyncall_callvm_mips_o32.h +2 -1
- data/dyncall/dyncall/dyncall_callvm_ppc32.c +45 -2
- data/dyncall/dyncall/dyncall_callvm_ppc32.h +2 -1
- data/dyncall/dyncall/dyncall_callvm_ppc64.c +351 -0
- data/dyncall/dyncall/dyncall_callvm_ppc64.h +60 -0
- data/dyncall/dyncall/dyncall_callvm_sparc.c +2 -1
- data/dyncall/dyncall/dyncall_callvm_sparc.h +2 -1
- data/dyncall/dyncall/dyncall_callvm_sparc64.c +2 -2
- data/dyncall/dyncall/dyncall_callvm_sparc64.h +2 -1
- data/dyncall/dyncall/dyncall_callvm_sparc_v9.c +3 -3
- data/dyncall/dyncall/dyncall_callvm_sparc_v9.h +2 -1
- data/dyncall/dyncall/dyncall_callvm_x64.c +2 -1
- data/dyncall/dyncall/dyncall_callvm_x64.h +2 -1
- data/dyncall/dyncall/dyncall_callvm_x86.c +2 -1
- data/dyncall/dyncall/dyncall_callvm_x86.h +2 -1
- data/dyncall/dyncall/dyncall_config.h +2 -1
- data/dyncall/dyncall/dyncall_macros.h +46 -9
- data/dyncall/dyncall/dyncall_signature.h +2 -1
- data/dyncall/dyncall/dyncall_struct.c +2 -1
- data/dyncall/dyncall/dyncall_struct.h +2 -1
- data/dyncall/dyncall/dyncall_types.h +2 -1
- data/dyncall/dyncall/dyncall_utils.h +2 -1
- data/dyncall/dyncall/dyncall_value.h +19 -1
- data/dyncall/dyncall/dyncall_vector.c +2 -1
- data/dyncall/dyncall/dyncall_vector.h +3 -1
- data/dyncall/dyncall/gen-masm.sh +0 -0
- data/dyncall/dyncallback/Makefile.generic +1 -1
- data/dyncall/dyncallback/dyncall_alloc_wx.c +2 -1
- data/dyncall/dyncallback/dyncall_alloc_wx.h +2 -1
- data/dyncall/dyncallback/dyncall_alloc_wx_malloc.c +2 -1
- data/dyncall/dyncallback/dyncall_alloc_wx_mmap.c +2 -1
- data/dyncall/dyncallback/dyncall_alloc_wx_win32.c +2 -1
- data/dyncall/dyncallback/dyncall_args.c +22 -10
- data/dyncall/dyncallback/dyncall_args.h +2 -1
- data/dyncall/dyncallback/dyncall_args_arm32_arm.c +35 -4
- data/dyncall/dyncallback/dyncall_args_arm32_arm.h +7 -1
- data/dyncall/dyncallback/dyncall_args_arm32_thumb.c +2 -1
- data/dyncall/dyncallback/dyncall_args_arm32_thumb.h +2 -1
- data/dyncall/dyncallback/dyncall_args_arm64.c +77 -0
- data/dyncall/dyncallback/dyncall_args_arm64_apple.c +160 -0
- data/dyncall/dyncallback/dyncall_args_mips.c +3 -2
- data/dyncall/dyncallback/dyncall_args_mips.h +3 -2
- data/dyncall/dyncallback/dyncall_args_ppc32.c +2 -1
- data/dyncall/dyncallback/dyncall_args_ppc32.h +9 -7
- data/dyncall/dyncallback/dyncall_args_ppc32_sysv.c +95 -0
- data/dyncall/dyncallback/dyncall_args_ppc64.c +71 -0
- data/dyncall/dyncallback/dyncall_args_ppc64.h +40 -0
- data/dyncall/dyncallback/dyncall_args_sparc32.c +2 -1
- data/dyncall/dyncallback/dyncall_args_sparc32.h +2 -1
- data/dyncall/dyncallback/dyncall_args_sparc64.c +2 -1
- data/dyncall/dyncallback/dyncall_args_sparc64.h +2 -1
- data/dyncall/dyncallback/dyncall_args_x64.c +2 -1
- data/dyncall/dyncallback/dyncall_args_x64.h +2 -1
- data/dyncall/dyncallback/dyncall_args_x86.c +2 -1
- data/dyncall/dyncallback/dyncall_args_x86.h +2 -1
- data/dyncall/dyncallback/dyncall_callback.c +7 -2
- data/dyncall/dyncallback/dyncall_callback.h +3 -1
- data/dyncall/dyncallback/dyncall_callback_arch.S +14 -6
- data/dyncall/dyncallback/dyncall_callback_arm32_arm.c +2 -1
- data/dyncall/dyncallback/dyncall_callback_arm32_arm.h +2 -1
- data/dyncall/dyncallback/dyncall_callback_arm32_arm_apple.s +1 -1
- data/dyncall/dyncallback/{dyncall_callback_arm32_arm_gas.s → dyncall_callback_arm32_arm_gas.S} +17 -7
- data/dyncall/dyncallback/dyncall_callback_arm32_thumb.c +2 -1
- data/dyncall/dyncallback/dyncall_callback_arm32_thumb.h +2 -1
- data/dyncall/dyncallback/{dyncall_callback_arm32_thumb_apple.s → dyncall_callback_arm32_thumb_apple.S} +2 -2
- data/dyncall/dyncallback/{dyncall_callback_arm32_thumb_gas.s → dyncall_callback_arm32_thumb_gas.S} +2 -2
- data/dyncall/dyncallback/dyncall_callback_arm64.S +111 -0
- data/dyncall/dyncallback/dyncall_callback_arm64.c +71 -0
- data/dyncall/dyncallback/dyncall_callback_mips.c +3 -2
- data/dyncall/dyncallback/dyncall_callback_mips.h +3 -2
- data/dyncall/dyncallback/dyncall_callback_ppc32.S +115 -4
- data/dyncall/dyncallback/dyncall_callback_ppc32.c +3 -2
- data/dyncall/dyncallback/dyncall_callback_ppc32.h +6 -6
- data/dyncall/dyncallback/dyncall_callback_ppc32_apple.s +6 -5
- data/dyncall/dyncallback/dyncall_callback_ppc64.S +170 -0
- data/dyncall/dyncallback/dyncall_callback_ppc64.c +60 -0
- data/dyncall/dyncallback/dyncall_callback_ppc64.h +56 -0
- data/dyncall/dyncallback/dyncall_callback_sparc32.c +2 -1
- data/dyncall/dyncallback/dyncall_callback_sparc32.h +2 -1
- data/dyncall/dyncallback/dyncall_callback_sparc32.s +1 -1
- data/dyncall/dyncallback/dyncall_callback_sparc64.c +2 -1
- data/dyncall/dyncallback/dyncall_callback_sparc64.s +1 -1
- data/dyncall/dyncallback/dyncall_callback_x64.S +5 -12
- data/dyncall/dyncallback/dyncall_callback_x64.c +2 -1
- data/dyncall/dyncallback/dyncall_callback_x64.h +2 -1
- data/dyncall/dyncallback/dyncall_callback_x64_masm.asm +0 -7
- data/dyncall/dyncallback/dyncall_callback_x86.S +5 -12
- data/dyncall/dyncallback/dyncall_callback_x86.c +2 -1
- data/dyncall/dyncallback/dyncall_callback_x86.h +2 -1
- data/dyncall/dyncallback/dyncall_callback_x86_masm.asm +2 -11
- data/dyncall/dyncallback/dyncall_thunk.c +11 -3
- data/dyncall/dyncallback/dyncall_thunk.h +8 -2
- data/dyncall/dyncallback/dyncall_thunk_arm32_arm.c +7 -7
- data/dyncall/dyncallback/dyncall_thunk_arm32_arm.h +2 -1
- data/dyncall/dyncallback/dyncall_thunk_arm32_thumb.c +2 -1
- data/dyncall/dyncallback/dyncall_thunk_arm32_thumb.h +2 -1
- data/dyncall/dyncallback/dyncall_thunk_arm64.c +64 -0
- data/dyncall/dyncallback/dyncall_thunk_arm64.h +42 -0
- data/dyncall/dyncallback/dyncall_thunk_mips.c +49 -17
- data/dyncall/dyncallback/dyncall_thunk_mips.h +3 -2
- data/dyncall/dyncallback/dyncall_thunk_ppc32.c +3 -2
- data/dyncall/dyncallback/dyncall_thunk_ppc32.h +7 -7
- data/dyncall/dyncallback/dyncall_thunk_ppc32_sysv.c +50 -0
- data/dyncall/dyncallback/dyncall_thunk_ppc64.c +87 -0
- data/dyncall/dyncallback/dyncall_thunk_ppc64.h +55 -0
- data/dyncall/dyncallback/dyncall_thunk_sparc32.c +2 -1
- data/dyncall/dyncallback/dyncall_thunk_sparc32.h +2 -1
- data/dyncall/dyncallback/dyncall_thunk_sparc64.c +2 -1
- data/dyncall/dyncallback/dyncall_thunk_sparc64.h +2 -1
- data/dyncall/dyncallback/dyncall_thunk_x64.c +2 -1
- data/dyncall/dyncallback/dyncall_thunk_x64.h +2 -1
- data/dyncall/dyncallback/dyncall_thunk_x86.c +2 -1
- data/dyncall/dyncallback/dyncall_thunk_x86.h +2 -1
- data/dyncall/dyncallback/dyncallback.3 +3 -3
- data/dyncall/dyncallback/gen-masm.sh +0 -0
- data/dyncall/dynload/dynload.c +2 -1
- data/dyncall/dynload/dynload.h +2 -1
- data/dyncall/dynload/dynload_alloc.h +2 -1
- data/dyncall/dynload/dynload_darwin.c +2 -1
- data/dyncall/dynload/dynload_syms.c +2 -1
- data/dyncall/dynload/dynload_syms_elf.c +2 -1
- data/dyncall/dynload/dynload_syms_mach-o.c +3 -2
- data/dyncall/dynload/dynload_syms_pe.c +2 -1
- data/dyncall/dynload/dynload_unix.c +2 -1
- data/dyncall/dynload/dynload_windows.c +2 -1
- data/dyncall/portasm/gen-masm.sh +0 -0
- data/dyncall/portasm/portasm-arm.S +3 -2
- data/dyncall/portasm/portasm-ppc.S +2 -1
- data/dyncall/portasm/portasm-ppc64.S +119 -0
- data/dyncall/portasm/portasm-x64-att.S +2 -1
- data/dyncall/portasm/portasm-x86.S +2 -1
- metadata +39 -18
- data/dyncall/dyncallback/dyncall_callback_x64_apple.s +0 -122
- data/dyncall/dyncallback/dyncall_callback_x64_gas.s +0 -119
- data/dyncall/dyncallback/dyncall_callback_x64_gas_w64.s +0 -102
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: Call kernel for sparc processor architecture.
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2011 Daniel Adler <dadler@uni-goettingen.de>
|
9
|
+
Copyright (c) 2011-2015 Daniel Adler <dadler@uni-goettingen.de>
|
10
10
|
|
11
11
|
Permission to use, copy, modify, and distribute this software for any
|
12
12
|
purpose with or without fee is hereby granted, provided that the above
|
@@ -24,6 +24,7 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
+
|
27
28
|
/* ---------------------------------------------------------------------------
|
28
29
|
|
29
30
|
call kernel for sparc 32-bit
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description:
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2011 Daniel Adler <dadler@uni-goettingen.de>
|
9
|
+
Copyright (c) 2011-2015 Daniel Adler <dadler@uni-goettingen.de>
|
10
10
|
|
11
11
|
Permission to use, copy, modify, and distribute this software for any
|
12
12
|
purpose with or without fee is hereby granted, provided that the above
|
@@ -23,6 +23,7 @@
|
|
23
23
|
*/
|
24
24
|
|
25
25
|
|
26
|
+
|
26
27
|
#ifndef DYNCALL_CALL_SPARC_H
|
27
28
|
#define DYNCALL_CALL_SPARC_H
|
28
29
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: Call kernel for sparc64 v9 ABI.
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2011 Daniel Adler <dadler@uni-goettingen.de>
|
9
|
+
Copyright (c) 2011-2015 Daniel Adler <dadler@uni-goettingen.de>
|
10
10
|
|
11
11
|
Permission to use, copy, modify, and distribute this software for any
|
12
12
|
purpose with or without fee is hereby granted, provided that the above
|
@@ -24,6 +24,7 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
+
|
27
28
|
/* ---------------------------------------------------------------------------
|
28
29
|
|
29
30
|
call kernel for sparc64 v9 abi
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description:
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2011 Daniel Adler <dadler@uni-goettingen.de>
|
9
|
+
Copyright (c) 2011-2015 Daniel Adler <dadler@uni-goettingen.de>
|
10
10
|
|
11
11
|
Permission to use, copy, modify, and distribute this software for any
|
12
12
|
purpose with or without fee is hereby granted, provided that the above
|
@@ -23,6 +23,7 @@
|
|
23
23
|
*/
|
24
24
|
|
25
25
|
|
26
|
+
|
26
27
|
#ifndef DYNCALL_CALL_SPARC64_H
|
27
28
|
#define DYNCALL_CALL_SPARC64_H
|
28
29
|
|
@@ -1,3 +1,28 @@
|
|
1
|
+
/*
|
2
|
+
|
3
|
+
Package: dyncall
|
4
|
+
Library: dyncall
|
5
|
+
File: dyncall/dyncall_call_sparc_v9.S
|
6
|
+
Description: Call kernel for sparc64 v9 ABI.
|
7
|
+
License:
|
8
|
+
|
9
|
+
Copyright (c) 2011-2015 Daniel Adler <dadler@uni-goettingen.de>
|
10
|
+
|
11
|
+
Permission to use, copy, modify, and distribute this software for any
|
12
|
+
purpose with or without fee is hereby granted, provided that the above
|
13
|
+
copyright notice and this permission notice appear in all copies.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
16
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
17
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
18
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
19
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
20
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
21
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
22
|
+
|
23
|
+
*/
|
24
|
+
|
25
|
+
|
1
26
|
#define BIAS 2047
|
2
27
|
.global dcCall_v9
|
3
28
|
/* dcCall_sparc64( DCCallVM* , void * target ) */
|
@@ -171,29 +196,6 @@ Input:
|
|
171
196
|
i1 size
|
172
197
|
i2 data
|
173
198
|
|
174
|
-
*/
|
175
|
-
/*
|
176
|
-
|
177
|
-
Package: dyncall
|
178
|
-
Library: dyncall
|
179
|
-
File: dyncall/dyncall_call_sparc64.S
|
180
|
-
Description: Call kernel for sparc64 v9 ABI.
|
181
|
-
License:
|
182
|
-
|
183
|
-
Copyright (c) 2011-2013 Daniel Adler <dadler@uni-goettingen.de>
|
184
|
-
|
185
|
-
Permission to use, copy, modify, and distribute this software for any
|
186
|
-
purpose with or without fee is hereby granted, provided that the above
|
187
|
-
copyright notice and this permission notice appear in all copies.
|
188
|
-
|
189
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
190
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
191
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
192
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
193
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
194
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
195
|
-
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
196
|
-
|
197
199
|
*/
|
198
200
|
|
199
201
|
#if 0
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description:
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2011-
|
9
|
+
Copyright (c) 2011-2015 Daniel Adler <dadler@uni-goettingen.de>
|
10
10
|
|
11
11
|
Permission to use, copy, modify, and distribute this software for any
|
12
12
|
purpose with or without fee is hereby granted, provided that the above
|
@@ -23,6 +23,7 @@
|
|
23
23
|
*/
|
24
24
|
|
25
25
|
|
26
|
+
|
26
27
|
#ifndef DYNCALL_CALL_SPARC_V9_H
|
27
28
|
#define DYNCALL_CALL_SPARC_V9_H
|
28
29
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: All x64 abi call kernel implementation
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2007-
|
9
|
+
Copyright (c) 2007-2015 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
|
@@ -24,6 +24,7 @@
|
|
24
24
|
*/
|
25
25
|
|
26
26
|
|
27
|
+
|
27
28
|
#include "../portasm/portasm-x64-att.S"
|
28
29
|
|
29
30
|
BEGIN_ASM
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: All x64 abi call kernel implementation
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2007-
|
9
|
+
Copyright (c) 2007-2015 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
|
@@ -24,6 +24,7 @@
|
|
24
24
|
*/
|
25
25
|
|
26
26
|
|
27
|
+
|
27
28
|
#include "../portasm/portasm-x64.S"
|
28
29
|
|
29
30
|
BEGIN_ASM
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description:
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2007-
|
9
|
+
Copyright (c) 2007-2015 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
|
@@ -24,6 +24,7 @@
|
|
24
24
|
*/
|
25
25
|
|
26
26
|
|
27
|
+
|
27
28
|
/*
|
28
29
|
|
29
30
|
dyncall x64
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: All - except Plan9 - x86 abi call kernel implementation
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2007-
|
9
|
+
Copyright (c) 2007-2015 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
|
@@ -24,6 +24,7 @@
|
|
24
24
|
*/
|
25
25
|
|
26
26
|
|
27
|
+
|
27
28
|
#include "../portasm/portasm-x86.S"
|
28
29
|
BEGIN_ASM
|
29
30
|
/* ============================================================================
|
@@ -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-2015 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
|
@@ -24,6 +24,7 @@
|
|
24
24
|
*/
|
25
25
|
|
26
26
|
|
27
|
+
|
27
28
|
/*
|
28
29
|
|
29
30
|
dyncall 32bit Intel x86 family interface
|
@@ -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-2015 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
|
@@ -24,81 +24,71 @@
|
|
24
24
|
*/
|
25
25
|
|
26
26
|
|
27
|
+
|
27
28
|
#include "dyncall_callf.h"
|
28
29
|
|
29
|
-
|
30
|
+
|
31
|
+
// Shareable implementation for argument binding used in ArgF and CallF below.
|
32
|
+
static void dcArgF_impl(DCCallVM* vm, const DCsigchar** sigptr, va_list args)
|
30
33
|
{
|
31
|
-
const DCsigchar* ptr = signature;
|
32
34
|
DCsigchar ch;
|
33
35
|
dcReset(vm);
|
34
|
-
while
|
35
|
-
|
36
|
+
while((ch=*(*sigptr)++) != '\0' && ch != DC_SIGCHAR_ENDARG) {
|
36
37
|
switch(ch) {
|
37
|
-
case DC_SIGCHAR_BOOL:
|
38
|
-
|
39
|
-
|
40
|
-
case
|
41
|
-
|
42
|
-
|
43
|
-
case
|
44
|
-
|
45
|
-
|
46
|
-
case
|
47
|
-
|
48
|
-
|
49
|
-
case
|
50
|
-
|
51
|
-
break;
|
52
|
-
case DC_SIGCHAR_INT:
|
53
|
-
dcArgInt (vm, (DCint) va_arg( args, DCint ) );
|
54
|
-
break;
|
55
|
-
case DC_SIGCHAR_UINT:
|
56
|
-
dcArgInt (vm, (DCint) (DCuint) va_arg( args, DCint ) );
|
57
|
-
break;
|
58
|
-
case DC_SIGCHAR_LONG:
|
59
|
-
dcArgLong (vm, (DClong) va_arg( args, DClong ) );
|
60
|
-
break;
|
61
|
-
case DC_SIGCHAR_ULONG:
|
62
|
-
dcArgLong (vm, (DCulong) va_arg( args, DClong ) );
|
63
|
-
break;
|
64
|
-
case DC_SIGCHAR_LONGLONG:
|
65
|
-
dcArgLongLong (vm, (DClonglong) va_arg( args, DClonglong ) );
|
66
|
-
break;
|
67
|
-
case DC_SIGCHAR_ULONGLONG:
|
68
|
-
dcArgLongLong (vm, (DCulonglong) va_arg( args, DClonglong ) );
|
69
|
-
break;
|
70
|
-
case DC_SIGCHAR_FLOAT:
|
71
|
-
dcArgFloat (vm, (DCfloat) va_arg( args, DCdouble ) );
|
72
|
-
break;
|
73
|
-
case DC_SIGCHAR_DOUBLE:
|
74
|
-
dcArgDouble (vm, (DCdouble) va_arg( args, DCdouble ) );
|
75
|
-
break;
|
76
|
-
case DC_SIGCHAR_POINTER:
|
77
|
-
dcArgPointer (vm, (DCpointer) va_arg( args, DCpointer ) );
|
78
|
-
break;
|
79
|
-
case DC_SIGCHAR_STRING:
|
80
|
-
dcArgPointer (vm, (DCpointer) va_arg( args, DCpointer ) );
|
81
|
-
break;
|
38
|
+
case DC_SIGCHAR_BOOL: dcArgBool (vm, (DCbool) va_arg(args, DCint )); break;
|
39
|
+
case DC_SIGCHAR_CHAR: dcArgChar (vm, (DCchar) va_arg(args, DCint )); break;
|
40
|
+
case DC_SIGCHAR_UCHAR: dcArgChar (vm, (DCchar)(DCuchar) va_arg(args, DCint )); break;
|
41
|
+
case DC_SIGCHAR_SHORT: dcArgShort (vm, (DCshort) va_arg(args, DCint )); break;
|
42
|
+
case DC_SIGCHAR_USHORT: dcArgShort (vm, (DCshort)(DCushort)va_arg(args, DCint )); break;
|
43
|
+
case DC_SIGCHAR_INT: dcArgInt (vm, (DCint) va_arg(args, DCint )); break;
|
44
|
+
case DC_SIGCHAR_UINT: dcArgInt (vm, (DCint)(DCuint) va_arg(args, DCint )); break;
|
45
|
+
case DC_SIGCHAR_LONG: dcArgLong (vm, (DClong) va_arg(args, DClong )); break;
|
46
|
+
case DC_SIGCHAR_ULONG: dcArgLong (vm, (DCulong) va_arg(args, DClong )); break;
|
47
|
+
case DC_SIGCHAR_LONGLONG: dcArgLongLong(vm, (DClonglong) va_arg(args, DClonglong)); break;
|
48
|
+
case DC_SIGCHAR_ULONGLONG: dcArgLongLong(vm, (DCulonglong) va_arg(args, DClonglong)); break;
|
49
|
+
case DC_SIGCHAR_FLOAT: dcArgFloat (vm, (DCfloat) va_arg(args, DCdouble )); break;
|
50
|
+
case DC_SIGCHAR_DOUBLE: dcArgDouble (vm, (DCdouble) va_arg(args, DCdouble )); break;
|
51
|
+
case DC_SIGCHAR_POINTER: dcArgPointer (vm, (DCpointer) va_arg(args, DCpointer )); break;
|
52
|
+
case DC_SIGCHAR_STRING: dcArgPointer (vm, (DCpointer) va_arg(args, DCpointer )); break;
|
82
53
|
}
|
83
54
|
}
|
55
|
+
}
|
56
|
+
|
57
|
+
void dcVArgF(DCCallVM* vm, const DCsigchar* signature, va_list args)
|
58
|
+
{
|
59
|
+
dcArgF_impl(vm, &signature, args);
|
60
|
+
}
|
61
|
+
|
62
|
+
void dcArgF(DCCallVM* vm, const DCsigchar* signature, ...)
|
63
|
+
{
|
64
|
+
va_list va;
|
65
|
+
va_start(va, signature);
|
66
|
+
dcVArgF(vm,signature,va);
|
67
|
+
va_end(va);
|
68
|
+
}
|
69
|
+
|
70
|
+
void dcVCallF(DCCallVM* vm, DCValue* result, DCpointer funcptr, const DCsigchar* signature, va_list args)
|
71
|
+
{
|
72
|
+
const DCsigchar* ptr = signature;
|
73
|
+
dcArgF_impl(vm, &ptr, args);
|
84
74
|
|
85
75
|
switch(*ptr) {
|
86
|
-
case DC_SIGCHAR_VOID: dcCallVoid
|
87
|
-
case DC_SIGCHAR_BOOL: result->B = dcCallBool
|
88
|
-
case DC_SIGCHAR_CHAR: result->c = dcCallChar
|
89
|
-
case DC_SIGCHAR_UCHAR: result->C = (DCuchar)
|
90
|
-
case DC_SIGCHAR_SHORT: result->s = dcCallShort
|
91
|
-
case DC_SIGCHAR_USHORT: result->S = dcCallShort
|
92
|
-
case DC_SIGCHAR_INT: result->i = dcCallInt
|
93
|
-
case DC_SIGCHAR_UINT: result->I = dcCallInt
|
94
|
-
case DC_SIGCHAR_LONG: result->j = dcCallLong
|
95
|
-
case DC_SIGCHAR_ULONG: result->J = dcCallLong
|
96
|
-
case DC_SIGCHAR_LONGLONG: result->l = dcCallLongLong
|
97
|
-
case DC_SIGCHAR_ULONGLONG: result->L = dcCallLongLong
|
98
|
-
case DC_SIGCHAR_FLOAT: result->f = dcCallFloat
|
99
|
-
case DC_SIGCHAR_DOUBLE: result->d = dcCallDouble
|
100
|
-
case DC_SIGCHAR_POINTER: result->p = dcCallPointer
|
101
|
-
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 = dcCallPointer (vm,funcptr); break;
|
102
92
|
}
|
103
93
|
}
|
104
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-2015 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
|
@@ -24,6 +24,7 @@
|
|
24
24
|
*/
|
25
25
|
|
26
26
|
|
27
|
+
|
27
28
|
/*
|
28
29
|
|
29
30
|
dyncall formatted calls C API
|
@@ -45,6 +46,9 @@
|
|
45
46
|
|
46
47
|
#include <stdarg.h>
|
47
48
|
|
49
|
+
void dcArgF (DCCallVM* vm, const DCsigchar* signature, ...);
|
50
|
+
void dcVArgF(DCCallVM* vm, const DCsigchar* signature, va_list args);
|
51
|
+
|
48
52
|
void dcCallF (DCCallVM* vm, DCValue* result, DCpointer funcptr, const DCsigchar* signature, ...);
|
49
53
|
void dcVCallF(DCCallVM* vm, DCValue* result, DCpointer funcptr, const DCsigchar* signature, va_list args);
|
50
54
|
|
@@ -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-2015 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
|
@@ -24,13 +24,14 @@
|
|
24
24
|
*/
|
25
25
|
|
26
26
|
|
27
|
+
|
27
28
|
#include "dyncall_macros.h"
|
28
29
|
|
29
30
|
#if defined(DC__Arch_Intel_x86)
|
30
31
|
# include "dyncall_callvm_x86.c"
|
31
32
|
#elif defined(DC__Arch_AMD64)
|
32
33
|
# include "dyncall_callvm_x64.c"
|
33
|
-
#elif defined(
|
34
|
+
#elif defined(DC__Arch_PPC32)
|
34
35
|
# include "dyncall_callvm_ppc32.c"
|
35
36
|
#elif defined(DC__Arch_PPC64)
|
36
37
|
# include "dyncall_callvm_ppc64.c"
|
@@ -58,10 +59,18 @@
|
|
58
59
|
# else
|
59
60
|
# include "dyncall_callvm_arm32_thumb.c"
|
60
61
|
# endif
|
62
|
+
#elif defined(DC__Arch_ARM64)
|
63
|
+
# if defined(DC__OS_Darwin)
|
64
|
+
# include "dyncall_callvm_arm64_apple.c"
|
65
|
+
# else
|
66
|
+
# include "dyncall_callvm_arm64.c"
|
67
|
+
# endif
|
61
68
|
#elif defined(DC__Arch_Sparc)
|
62
69
|
# include "dyncall_callvm_sparc.c"
|
63
70
|
#elif defined(DC__Arch_Sparcv9)
|
64
71
|
# include "dyncall_callvm_sparc_v9.c"
|
72
|
+
#elif defined(DC__Arch_RiscV)
|
73
|
+
# include "dyncall_callvm_riscv.c"
|
65
74
|
#else
|
66
75
|
# error unsupported platform
|
67
76
|
#endif
|
@@ -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-2015 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
|
@@ -24,6 +24,7 @@
|
|
24
24
|
*/
|
25
25
|
|
26
26
|
|
27
|
+
|
27
28
|
#ifndef DYNCALL_CALLVM_H
|
28
29
|
#define DYNCALL_CALLVM_H
|
29
30
|
|