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,8 +6,8 @@
|
|
6
6
|
Description: Callback's Arguments VM - Implementation for MIPS
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2013 Daniel Adler <dadler@uni-goettingen.de>,
|
10
|
-
|
9
|
+
Copyright (c) 2013-2015 Daniel Adler <dadler@uni-goettingen.de>,
|
10
|
+
Tassilo Philipp <tphilipp@potion-studios.com>
|
11
11
|
|
12
12
|
Permission to use, copy, modify, and distribute this software for any
|
13
13
|
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
|
#include "dyncall_args_mips.h"
|
27
28
|
|
28
29
|
DCint dcbArgInt(DCArgs* p)
|
@@ -6,8 +6,8 @@
|
|
6
6
|
Description: Callback's Arguments VM - Header for MIPS
|
7
7
|
License:
|
8
8
|
|
9
|
-
Copyright (c) 2013 Daniel Adler <dadler@uni-goettingen.de>,
|
10
|
-
|
9
|
+
Copyright (c) 2013-2015 Daniel Adler <dadler@uni-goettingen.de>,
|
10
|
+
Tassilo Philipp <tphilipp@potion-studios.com>
|
11
11
|
|
12
12
|
Permission to use, copy, modify, and distribute this software for any
|
13
13
|
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 DYNCALLBACK_ARGS_MIPS_H
|
27
28
|
#define DYNCALLBACK_ARGS_MIPS_H
|
28
29
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: Callback's Arguments VM - Implementation for ppc32
|
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
|
@@ -23,6 +23,7 @@
|
|
23
23
|
|
24
24
|
*/
|
25
25
|
|
26
|
+
|
26
27
|
#include "dyncall_args_ppc32.h"
|
27
28
|
|
28
29
|
DCint dcbArgInt (DCArgs* p)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: Callback's Arguments VM - Header for ppc32
|
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
|
@@ -28,14 +28,16 @@
|
|
28
28
|
|
29
29
|
#include "dyncall_args.h"
|
30
30
|
|
31
|
+
/* Common Args iterator for Apple and System V ABI. */
|
32
|
+
|
31
33
|
struct DCArgs
|
32
34
|
{
|
33
|
-
int
|
34
|
-
double
|
35
|
-
unsigned char* stackptr;
|
36
|
-
int
|
37
|
-
int
|
38
|
-
};
|
35
|
+
int ireg_data[8]; /* offset: 0 size: 4*8 = 32 */
|
36
|
+
double freg_data[13]; /* offset: 32 size: 8*13= 104 */
|
37
|
+
unsigned char* stackptr; /* offset: 136 size: 4 */
|
38
|
+
int ireg_count; /* offset: 140 size: 4 */
|
39
|
+
int freg_count; /* offset: 144 size: 4 */
|
40
|
+
}; /* total size: 148 */
|
39
41
|
|
40
42
|
#endif /* DYNCALLBACK_ARGS_PPC32_H */
|
41
43
|
|
@@ -0,0 +1,95 @@
|
|
1
|
+
/*
|
2
|
+
|
3
|
+
Package: dyncall
|
4
|
+
Library: dyncallback
|
5
|
+
File: dyncallback/dyncall_args_ppc32_sysv.c
|
6
|
+
Description: Callback's Args Implementation for PowerPC 32-bit System V ABI
|
7
|
+
License:
|
8
|
+
|
9
|
+
Copyright (c) 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
|
+
|
26
|
+
#include "dyncall_args_ppc32.h"
|
27
|
+
|
28
|
+
DCint dcbArgInt (DCArgs* p)
|
29
|
+
{
|
30
|
+
DCint value;
|
31
|
+
if (p->ireg_count < 8)
|
32
|
+
value = p->ireg_data[p->ireg_count++];
|
33
|
+
else {
|
34
|
+
value = *( (int*) p->stackptr );
|
35
|
+
p->stackptr += sizeof(int);
|
36
|
+
}
|
37
|
+
return value;
|
38
|
+
}
|
39
|
+
DCuint dcbArgUInt (DCArgs* p) { return (DCuint) dcbArgInt(p); }
|
40
|
+
|
41
|
+
DCulonglong dcbArgULongLong (DCArgs* p)
|
42
|
+
{
|
43
|
+
DCulonglong value;
|
44
|
+
if (p->ireg_count < 7)
|
45
|
+
{
|
46
|
+
/* next free integer register is even (r0, r2, r3) ? */
|
47
|
+
/* if not, skip one integer */
|
48
|
+
p->ireg_count = (p->ireg_count + 1) & -2;
|
49
|
+
value = * (unsigned long long*) ( & p->ireg_data[p->ireg_count] );
|
50
|
+
p->ireg_count += 2;
|
51
|
+
} else {
|
52
|
+
p->ireg_count = 8;
|
53
|
+
/* 64-bit values are naturally aligned on stack */
|
54
|
+
p->stackptr = (unsigned char*) ( ( ( (ptrdiff_t) (p->stackptr) ) + 7) & ( (ptrdiff_t) -8 ) );
|
55
|
+
value = * ( (unsigned long long*) p->stackptr );
|
56
|
+
p->stackptr += sizeof(unsigned long long);
|
57
|
+
}
|
58
|
+
return value;
|
59
|
+
}
|
60
|
+
DClonglong dcbArgLongLong(DCArgs* p) { return (DClonglong)dcbArgULongLong(p); }
|
61
|
+
|
62
|
+
DClong dcbArgLong (DCArgs* p) { return (DClong) dcbArgUInt(p); }
|
63
|
+
DCulong dcbArgULong (DCArgs* p) { return (DCulong) dcbArgUInt(p); }
|
64
|
+
DCchar dcbArgChar (DCArgs* p) { return (DCchar) dcbArgUInt(p); }
|
65
|
+
DCuchar dcbArgUChar (DCArgs* p) { return (DCuchar) dcbArgUInt(p); }
|
66
|
+
DCshort dcbArgShort (DCArgs* p) { return (DCshort) dcbArgUInt(p); }
|
67
|
+
DCushort dcbArgUShort (DCArgs* p) { return (DCushort)dcbArgUInt(p); }
|
68
|
+
DCbool dcbArgBool (DCArgs* p) { return (DCbool) dcbArgUInt(p); }
|
69
|
+
|
70
|
+
DCpointer dcbArgPointer (DCArgs* p) { return (DCpointer)dcbArgUInt(p); }
|
71
|
+
|
72
|
+
DCdouble dcbArgDouble (DCArgs* p)
|
73
|
+
{
|
74
|
+
DCdouble result;
|
75
|
+
if (p->freg_count < 8) {
|
76
|
+
result = p->freg_data[p->freg_count++];
|
77
|
+
} else {
|
78
|
+
p->stackptr = (unsigned char*) ( ( ( (ptrdiff_t) (p->stackptr) ) + 7) & ( (ptrdiff_t) -8 ) );
|
79
|
+
result = * ( (double*) p->stackptr );
|
80
|
+
p->stackptr += sizeof(double);
|
81
|
+
}
|
82
|
+
return result;
|
83
|
+
}
|
84
|
+
DCfloat dcbArgFloat (DCArgs* p)
|
85
|
+
{
|
86
|
+
DCfloat result;
|
87
|
+
if (p->freg_count < 8) {
|
88
|
+
result = (DCfloat) p->freg_data[p->freg_count++];
|
89
|
+
} else {
|
90
|
+
result = * ( (float*) p->stackptr );
|
91
|
+
p->stackptr += sizeof(float);
|
92
|
+
}
|
93
|
+
return result;
|
94
|
+
}
|
95
|
+
|
@@ -0,0 +1,71 @@
|
|
1
|
+
/*
|
2
|
+
|
3
|
+
Package: dyncall
|
4
|
+
Library: dyncallback
|
5
|
+
File: dyncallback/dyncall_args_ppc64.c
|
6
|
+
Description: Callback's Arguments VM - Implementation for ppc64
|
7
|
+
License:
|
8
|
+
|
9
|
+
Copyright (c) 2014-2015 Masanori Mitsugi <mitsugi@linux.vnet.ibm.com>
|
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
|
+
#include "dyncall_args_ppc64.h"
|
26
|
+
|
27
|
+
DCint dcbArgInt (DCArgs* p) { return (DCint) dcbArgLongLong(p); }
|
28
|
+
DCuint dcbArgUInt (DCArgs* p) { return (DCuint) dcbArgLongLong(p); }
|
29
|
+
DCulonglong dcbArgULongLong(DCArgs* p) { return (DCulonglong) dcbArgLongLong(p); }
|
30
|
+
|
31
|
+
DClonglong dcbArgLongLong(DCArgs* p)
|
32
|
+
{
|
33
|
+
DClonglong value;
|
34
|
+
if (p->ireg_count < 8) {
|
35
|
+
value = p->ireg_data[p->ireg_count++];
|
36
|
+
} else {
|
37
|
+
value = *( (long long*) p->stackptr );
|
38
|
+
}
|
39
|
+
p->stackptr += sizeof(long long);
|
40
|
+
return value;
|
41
|
+
}
|
42
|
+
|
43
|
+
DClong dcbArgLong (DCArgs* p) { return (DClong) dcbArgLongLong(p); }
|
44
|
+
DCulong dcbArgULong (DCArgs* p) { return (DCulong) dcbArgLongLong(p); }
|
45
|
+
DCchar dcbArgChar (DCArgs* p) { return (DCchar) dcbArgLongLong(p); }
|
46
|
+
DCuchar dcbArgUChar (DCArgs* p) { return (DCuchar) dcbArgLongLong(p); }
|
47
|
+
DCshort dcbArgShort (DCArgs* p) { return (DCshort) dcbArgLongLong(p); }
|
48
|
+
DCushort dcbArgUShort (DCArgs* p) { return (DCushort)dcbArgLongLong(p); }
|
49
|
+
DCbool dcbArgBool (DCArgs* p) { return (DCbool) dcbArgLongLong(p); }
|
50
|
+
|
51
|
+
DCpointer dcbArgPointer (DCArgs* p) { return (DCpointer)dcbArgLongLong(p); }
|
52
|
+
|
53
|
+
DCdouble dcbArgDouble (DCArgs* p)
|
54
|
+
{
|
55
|
+
DCdouble result;
|
56
|
+
|
57
|
+
if (p->freg_count < 13) {
|
58
|
+
result = p->freg_data[p->freg_count++];
|
59
|
+
if (p->ireg_count < 8) {
|
60
|
+
p->ireg_count++;
|
61
|
+
}
|
62
|
+
} else {
|
63
|
+
result = * ( (double*) p->stackptr );
|
64
|
+
}
|
65
|
+
|
66
|
+
p->stackptr += sizeof(double);
|
67
|
+
return result;
|
68
|
+
}
|
69
|
+
|
70
|
+
DCfloat dcbArgFloat (DCArgs* p) { return (DCfloat)dcbArgDouble(p); }
|
71
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
/*
|
2
|
+
|
3
|
+
Package: dyncall
|
4
|
+
Library: dyncallback
|
5
|
+
File: dyncallback/dyncall_args_ppc64.h
|
6
|
+
Description: Callback's Arguments VM - Header for ppc64
|
7
|
+
License:
|
8
|
+
|
9
|
+
Copyright (c) 2014-2015 Masanori Mitsugi <mitsugi@linux.vnet.ibm.com>
|
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
|
+
#ifndef DYNCALLBACK_ARGS_PPC64_H
|
26
|
+
#define DYNCALLBACK_ARGS_PPC64_H
|
27
|
+
|
28
|
+
#include "dyncall_args.h"
|
29
|
+
|
30
|
+
struct DCArgs
|
31
|
+
{
|
32
|
+
long long ireg_data[8];
|
33
|
+
double freg_data[13];
|
34
|
+
unsigned char* stackptr;
|
35
|
+
int ireg_count;
|
36
|
+
int freg_count;
|
37
|
+
};
|
38
|
+
|
39
|
+
#endif /* DYNCALLBACK_ARGS_PPC64_H */
|
40
|
+
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: Callback's Arguments VM - Implementation for sparc32 - not yet
|
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
|
@@ -23,6 +23,7 @@
|
|
23
23
|
|
24
24
|
*/
|
25
25
|
|
26
|
+
|
26
27
|
#include "dyncall_args_sparc32.h"
|
27
28
|
|
28
29
|
DCint dcbArgInt (DCArgs* p) { return 0; }
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: Callback's Arguments VM - Header for sparc32
|
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
|
@@ -23,6 +23,7 @@
|
|
23
23
|
|
24
24
|
*/
|
25
25
|
|
26
|
+
|
26
27
|
#ifndef DYNCALLBACK_ARGS_SPARC32_H
|
27
28
|
#define DYNCALLBACK_ARGS_SPARC32_H
|
28
29
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: Callback's Arguments VM - Implementation for sparc64 - not yet
|
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
|
@@ -23,6 +23,7 @@
|
|
23
23
|
|
24
24
|
*/
|
25
25
|
|
26
|
+
|
26
27
|
#include "dyncall_args_sparc64.h"
|
27
28
|
|
28
29
|
DCint dcbArgInt (DCArgs* p) { return 0; }
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: Callback's Arguments VM - Header for sparc32 - not yet
|
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
|
@@ -23,6 +23,7 @@
|
|
23
23
|
|
24
24
|
*/
|
25
25
|
|
26
|
+
|
26
27
|
#ifndef DYNCALLBACK_ARGS_SPARC64_H
|
27
28
|
#define DYNCALLBACK_ARGS_SPARC64_H
|
28
29
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: Callback's Arguments VM - Implementation for x64
|
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 "dyncall_args_x64.h"
|
28
29
|
|
29
30
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: Callback's Arguments VM - Header for x64
|
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
|
@@ -23,6 +23,7 @@
|
|
23
23
|
|
24
24
|
*/
|
25
25
|
|
26
|
+
|
26
27
|
#ifndef DYNCALLBACK_ARGS_X64_H
|
27
28
|
#define DYNCALLBACK_ARGS_X64_H
|
28
29
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: Callback's Arguments VM - Implementation for x86
|
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
|
@@ -23,6 +23,7 @@
|
|
23
23
|
|
24
24
|
*/
|
25
25
|
|
26
|
+
|
26
27
|
#include "dyncall_args_x86.h"
|
27
28
|
|
28
29
|
/* ---------------------------------------------------------------------------- */
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: Callback's Arguments VM - Header for x86
|
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_ARGS_X86_H_
|
28
29
|
#define DYNCALL_ARGS_X86_H_
|
29
30
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Description: Callback - Implementation back-end selector
|
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
|
@@ -23,14 +23,17 @@
|
|
23
23
|
|
24
24
|
*/
|
25
25
|
|
26
|
+
|
26
27
|
#include "../dyncall/dyncall_macros.h"
|
27
28
|
|
28
29
|
#if defined(DC__Arch_Intel_x86)
|
29
30
|
#include "dyncall_callback_x86.c"
|
30
31
|
#elif defined (DC__Arch_AMD64)
|
31
32
|
#include "dyncall_callback_x64.c"
|
32
|
-
#elif defined (
|
33
|
+
#elif defined (DC__Arch_PPC32)
|
33
34
|
#include "dyncall_callback_ppc32.c"
|
35
|
+
#elif defined (DC__Arch_PPC64)
|
36
|
+
#include "dyncall_callback_ppc64.c"
|
34
37
|
#elif defined (DC__Arch_ARM_ARM)
|
35
38
|
#include "dyncall_callback_arm32_arm.c"
|
36
39
|
#elif defined (DC__Arch_ARM_THUMB)
|
@@ -41,5 +44,7 @@
|
|
41
44
|
#include "dyncall_callback_sparc32.c"
|
42
45
|
#elif defined (DC__Arch_Sparcv9)
|
43
46
|
#include "dyncall_callback_sparc64.c"
|
47
|
+
#elif defined (DC__Arch_ARM64)
|
48
|
+
#include "dyncall_callback_arm64.c"
|
44
49
|
#endif
|
45
50
|
|