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
data/dyncall/Makefile.M
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#include "buildsys/dynmake/Makefile.base.M"
|
2
|
-
|
3
|
-
all:
|
4
|
-
cd dyncall _(SHELL_COMMAND_SEPARATOR) _(MAKE) _(MAKEFLAGS_USER) _(MAKEFLAG_FILE) _(MAKE_DEFAULT_FILE)
|
5
|
-
cd dynload _(SHELL_COMMAND_SEPARATOR) _(MAKE) _(MAKEFLAGS_USER) _(MAKEFLAG_FILE) _(MAKE_DEFAULT_FILE)
|
6
|
-
cd dyncallback _(SHELL_COMMAND_SEPARATOR) _(MAKE) _(MAKEFLAGS_USER) _(MAKEFLAG_FILE) _(MAKE_DEFAULT_FILE)
|
7
|
-
|
8
|
-
clean:
|
9
|
-
cd dyncall _(SHELL_COMMAND_SEPARATOR) _(MAKE) _(MAKEFLAGS_USER) _(MAKEFLAG_FILE) _(MAKE_DEFAULT_FILE) clean
|
10
|
-
cd dynload _(SHELL_COMMAND_SEPARATOR) _(MAKE) _(MAKEFLAGS_USER) _(MAKEFLAG_FILE) _(MAKE_DEFAULT_FILE) clean
|
11
|
-
cd dyncallback _(SHELL_COMMAND_SEPARATOR) _(MAKE) _(MAKEFLAGS_USER) _(MAKEFLAG_FILE) _(MAKE_DEFAULT_FILE) clean
|
12
|
-
|
13
|
-
tests:
|
14
|
-
cd test _(SHELL_COMMAND_SEPARATOR) _(MAKE) _(MAKEFLAGS_USER) _(MAKEFLAG_FILE) _(MAKE_DEFAULT_FILE)
|
15
|
-
|
@@ -1,82 +0,0 @@
|
|
1
|
-
#include "../../dyncall/dyncall_macros.h"
|
2
|
-
|
3
|
-
#if defined(DC_WINDOWS) && defined(MAKE_CMD_nmake)
|
4
|
-
|
5
|
-
/* Abstractions */
|
6
|
-
#define _(X) $(X) /* Standard variables */
|
7
|
-
#define _L(X) X.lib
|
8
|
-
#define _O(X) X.obj
|
9
|
-
|
10
|
-
#define TARGET @
|
11
|
-
#define PREREQS **
|
12
|
-
|
13
|
-
/* Makefile internal vars for platform abstraction */
|
14
|
-
MAKEFLAGS_USER = /NOLOGO
|
15
|
-
MAKEFLAG_FILE = /f
|
16
|
-
MAKE_DEFAULT_FILE = dynMakefile
|
17
|
-
SHELL_COMMAND_SEPARATOR = &&
|
18
|
-
|
19
|
-
AR = lib
|
20
|
-
ARFLAGS_USER = /NOLOGO
|
21
|
-
ARFLAGS =
|
22
|
-
ARFLAG_OUT_PREFIX = /OUT:
|
23
|
-
|
24
|
-
CFLAGS_USER = /nologo /I..\dyncall /I..\dyncallback
|
25
|
-
CFLAGS = _(CFLAGS) _(CFLAGS_USER)
|
26
|
-
|
27
|
-
LDFLAGS_USER = /nologo /L..\dyncall /L..\dyncallback
|
28
|
-
LDFLAGS = _(LDFLAGS) _(LDFLAGS_USER)
|
29
|
-
LDFLAG_IN_PREFIX =
|
30
|
-
LDFLAG_OUT_PREFIX = /OUT:
|
31
|
-
|
32
|
-
ASFLAGS_USER = /nologo
|
33
|
-
AFLAGS = _(AFLAGS) _(ASFLAGS_USER) /* Set AFLAGS (without 'S'), which is the standard nmake predefined macro for MASM */
|
34
|
-
ASFLAGS = _(AFLAGS)
|
35
|
-
|
36
|
-
RM = del
|
37
|
-
|
38
|
-
.SUFFIXES : .S
|
39
|
-
|
40
|
-
.S.obj:
|
41
|
-
cl /nologo /EP $< > $*.asm
|
42
|
-
_(AS) _(ASFLAGS) /c $*.asm
|
43
|
-
del $*.asm
|
44
|
-
|
45
|
-
|
46
|
-
#else
|
47
|
-
|
48
|
-
/* Abstractions */
|
49
|
-
#define _(X) ${X} /* Standard variables */
|
50
|
-
#define _L(X) lib##X.a
|
51
|
-
#define _O(X) X.o
|
52
|
-
|
53
|
-
#define TARGET @
|
54
|
-
#if defined(MAKE_CMD_gmake) || (defined(DC__OS_Linux) && !defined(MAKE_CMD_bsdmake)) || (defined(DC__OS_Darwin) && !defined(MAKE_CMD_bsdmake)) || (defined(DC__OS_SunOS) && !defined(MAKE_CMD_bsdmake))
|
55
|
-
# define PREREQS ^
|
56
|
-
#else
|
57
|
-
# define PREREQS >
|
58
|
-
#endif
|
59
|
-
|
60
|
-
|
61
|
-
/* Makefile internal vars for platform abstraction */
|
62
|
-
MAKEFLAGS_USER =
|
63
|
-
MAKEFLAG_FILE = -f
|
64
|
-
MAKE_DEFAULT_FILE = dynMakefile
|
65
|
-
SHELL_COMMAND_SEPARATOR = ;
|
66
|
-
|
67
|
-
ARFLAG_OUT_PREFIX =
|
68
|
-
|
69
|
-
CFLAGS_USER = -I ../dyncall -I ../dyncallback
|
70
|
-
CFLAGS += _(CFLAGS_USER)
|
71
|
-
|
72
|
-
LDFLAGS_USER = -L../../dyncall -L../../dyncallback
|
73
|
-
LDFLAGS += _(LDFLAGS_USER)
|
74
|
-
LDFLAG_IN_PREFIX = -l
|
75
|
-
LDFLAG_OUT_PREFIX = -o
|
76
|
-
|
77
|
-
ASFLAGS_USER =
|
78
|
-
|
79
|
-
RM = rm -f
|
80
|
-
|
81
|
-
#endif
|
82
|
-
|
data/dyncall/dynMakefile
DELETED
data/dyncall/dyncall/Makefile.M
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
#include "../buildsys/dynmake/Makefile.base.M"
|
2
|
-
|
3
|
-
all: _L(dyncall_s)
|
4
|
-
|
5
|
-
_L(dyncall_s): _O(dyncall_vector) _O(dyncall_api) _O(dyncall_callvm) _O(dyncall_callvm_base) _O(dyncall_call) _O(dyncall_callf) _O(dyncall_struct)
|
6
|
-
_(AR) _(ARFLAGS) _(ARFLAG_OUT_PREFIX)_(TARGET) _(PREREQS)
|
7
|
-
|
8
|
-
clean:
|
9
|
-
_(RM) _O(*)
|
10
|
-
_(RM) _L(dyncall_s)
|
data/dyncall/dyncall/TODO
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
- implement structure passing for all calling conventinos and platforms
|
2
|
-
- make sure that struct support for ellipsis calls are not forgotten (copy everything by value)
|
3
|
-
|
4
|
-
- merge arm32_thumb_{gas/apple} and include thumb support for portasm
|
5
|
-
- check dyncall_call_x64_traditional_cpp.S / try-sync with win64 masm
|
6
|
-
- remove dyncall_call_x86_apple.s
|
7
|
-
- x64 port cleanup: all x64 calling conventions on all platforms
|
8
|
-
- remove dyncall_call_x86_masm.asm dyncall_call_x64_masm.asm
|
9
|
-
- x64 verification: return values are passed via RAX and RDX, and XMM0 and XMM1.
|
data/dyncall/dyncall/dynMakefile
DELETED
@@ -1,362 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
|
3
|
-
Package: dyncall
|
4
|
-
Library: dyncall
|
5
|
-
File: dyncall/dyncall_call_sparc64.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
|
-
|
26
|
-
|
27
|
-
|
28
|
-
/* ---------------------------------------------------------------------------
|
29
|
-
|
30
|
-
call kernel for sparc64 v9 abi
|
31
|
-
tested on sparc64/linux/debian [gcc54.fsffrance.org - thanx to the farm!]
|
32
|
-
|
33
|
-
new C Interface:
|
34
|
-
void dcCall_sparc (DCCallVM* callvm, DCpointer target);
|
35
|
-
%i0 %1
|
36
|
-
|
37
|
-
see dyncall_call_sparc.S for details.
|
38
|
-
|
39
|
-
old C Interface:
|
40
|
-
void dcCall_sparc (DCpointer target, DCsize size, DCpointer data);
|
41
|
-
%i0 , %i1 , %i2
|
42
|
-
Input:
|
43
|
-
i0 target
|
44
|
-
i1 size
|
45
|
-
i2 data
|
46
|
-
|
47
|
-
*/
|
48
|
-
|
49
|
-
#define REGSIZE 8
|
50
|
-
|
51
|
-
#define BIAS 2047
|
52
|
-
|
53
|
-
#define ALIGN 16
|
54
|
-
|
55
|
-
#define IREGS 6
|
56
|
-
#define FREGS 16
|
57
|
-
#define SREGS 16
|
58
|
-
#define IBASE 0
|
59
|
-
#define FBASE (IREGS*8)
|
60
|
-
|
61
|
-
#define SHEAD ((16+6)*8)
|
62
|
-
#define DHEAD ((IREGS+FREGS)*8)+SREGS*4
|
63
|
-
|
64
|
-
CALLVM_singleUseFlags = 24
|
65
|
-
CALLVM_size = 40
|
66
|
-
CALLVM_dataoff = 48
|
67
|
-
|
68
|
-
|
69
|
-
.global dcCall_sparc64
|
70
|
-
dcCall_sparc64:
|
71
|
-
|
72
|
-
/* Basic Prolog: supports up to 6 arguments. */
|
73
|
-
|
74
|
-
/* new C interface */
|
75
|
-
/* o0-1: callvm,target */
|
76
|
-
|
77
|
-
or %o0, %g0, %o3 /* %o3: callvm */
|
78
|
-
or %o1, %g0, %o0 /* %o0: target */
|
79
|
-
ldx [%o3+CALLVM_size], %o1 /* %o1: size */
|
80
|
-
add %o3, CALLVM_dataoff, %o2 /* %o2: data */
|
81
|
-
ld [%o3+CALLVM_singleUseFlags], %o4 /* %o4: flags */
|
82
|
-
/*leaf functions: may use the first six output registers.*/
|
83
|
-
/*o0-2:target,size,data*/
|
84
|
-
/*o3-5:free to use */
|
85
|
-
|
86
|
-
/* Arguments: */
|
87
|
-
/* %o0 = ptr to target. */
|
88
|
-
/* %o1 = size of data. */
|
89
|
-
/* %o2 = data pointer. */
|
90
|
-
/* %o4 = use flags. */
|
91
|
-
|
92
|
-
/* Compute a matching stack size (approximate): o3 = align(o1+136,16) */
|
93
|
-
|
94
|
-
add %o1, SHEAD+ALIGN-1, %o3
|
95
|
-
and %o3, -ALIGN, %o3
|
96
|
-
neg %o3
|
97
|
-
|
98
|
-
/* Prolog. */
|
99
|
-
save %sp, %o3, %sp
|
100
|
-
|
101
|
-
/* Arguments: */
|
102
|
-
/* %i0 = ptr to target. */
|
103
|
-
/* %i1 = size of data. */
|
104
|
-
/* %i2 = data pointer. */
|
105
|
-
/* %i3 = stack size. */
|
106
|
-
|
107
|
-
/* Load output registers. */
|
108
|
-
|
109
|
-
ldx [%i2+IBASE+REGSIZE*0 ],%o0
|
110
|
-
ldx [%i2+IBASE+REGSIZE*1 ],%o1
|
111
|
-
ldx [%i2+IBASE+REGSIZE*2 ],%o2
|
112
|
-
ldx [%i2+IBASE+REGSIZE*3 ],%o3
|
113
|
-
ldx [%i2+IBASE+REGSIZE*4 ],%o4
|
114
|
-
ldx [%i2+IBASE+REGSIZE*5 ],%o5
|
115
|
-
|
116
|
-
/* Load double-precision float registers. */
|
117
|
-
|
118
|
-
ldd [%i2+FBASE+REGSIZE*0 ],%f0
|
119
|
-
ldd [%i2+FBASE+REGSIZE*1 ],%f2
|
120
|
-
ldd [%i2+FBASE+REGSIZE*2 ],%f4
|
121
|
-
ldd [%i2+FBASE+REGSIZE*3 ],%f6
|
122
|
-
ldd [%i2+FBASE+REGSIZE*4 ],%f8
|
123
|
-
ldd [%i2+FBASE+REGSIZE*5 ],%f10
|
124
|
-
ldd [%i2+FBASE+REGSIZE*6 ],%f12
|
125
|
-
ldd [%i2+FBASE+REGSIZE*7 ],%f14
|
126
|
-
ldd [%i2+FBASE+REGSIZE*8 ],%f16
|
127
|
-
ldd [%i2+FBASE+REGSIZE*9 ],%f18
|
128
|
-
ldd [%i2+FBASE+REGSIZE*10],%f20
|
129
|
-
ldd [%i2+FBASE+REGSIZE*11],%f22
|
130
|
-
ldd [%i2+FBASE+REGSIZE*12],%f24
|
131
|
-
ldd [%i2+FBASE+REGSIZE*13],%f26
|
132
|
-
ldd [%i2+FBASE+REGSIZE*14],%f28
|
133
|
-
ldd [%i2+FBASE+REGSIZE*15],%f30
|
134
|
-
|
135
|
-
/* load single-precision float registers */
|
136
|
-
|
137
|
-
or %g0, 1, %l0
|
138
|
-
.f0:
|
139
|
-
andcc %i4, %l0, %g0
|
140
|
-
beq .f1
|
141
|
-
nop
|
142
|
-
ld [%i2+FBASE+REGSIZE*16+4*0 ], %f1
|
143
|
-
.f1:
|
144
|
-
sll %l0, 1, %l0
|
145
|
-
andcc %i4, %l0, %g0
|
146
|
-
beq .f2
|
147
|
-
nop
|
148
|
-
ld [%i2+FBASE+REGSIZE*16+4*1 ], %f3
|
149
|
-
.f2:
|
150
|
-
sll %l0, 1, %l0
|
151
|
-
andcc %i4, %l0, %g0
|
152
|
-
beq .f3
|
153
|
-
nop
|
154
|
-
ld [%i2+FBASE+REGSIZE*16+4*2 ], %f5
|
155
|
-
.f3:
|
156
|
-
sll %l0, 1, %l0
|
157
|
-
andcc %i4, %l0, %g0
|
158
|
-
beq .f4
|
159
|
-
nop
|
160
|
-
ld [%i2+FBASE+REGSIZE*16+4*3 ], %f7
|
161
|
-
.f4:
|
162
|
-
sll %l0, 1, %l0
|
163
|
-
andcc %i4, %l0, %g0
|
164
|
-
beq .f5
|
165
|
-
nop
|
166
|
-
ld [%i2+FBASE+REGSIZE*16+4*4 ], %f9
|
167
|
-
.f5:
|
168
|
-
sll %l0, 1, %l0
|
169
|
-
andcc %i4, %l0, %g0
|
170
|
-
beq .f6
|
171
|
-
nop
|
172
|
-
ld [%i2+FBASE+REGSIZE*16+4*5 ], %f11
|
173
|
-
.f6:
|
174
|
-
sll %l0, 1, %l0
|
175
|
-
andcc %i4, %l0, %g0
|
176
|
-
beq .f7
|
177
|
-
nop
|
178
|
-
ld [%i2+FBASE+REGSIZE*16+4*6 ], %f13
|
179
|
-
.f7:
|
180
|
-
sll %l0, 1, %l0
|
181
|
-
andcc %i4, %l0, %g0
|
182
|
-
beq .f8
|
183
|
-
nop
|
184
|
-
ld [%i2+FBASE+REGSIZE*16+4*7 ], %f15
|
185
|
-
.f8:
|
186
|
-
sll %l0, 1, %l0
|
187
|
-
andcc %i4, %l0, %g0
|
188
|
-
beq .f9
|
189
|
-
nop
|
190
|
-
ld [%i2+FBASE+REGSIZE*16+4*8 ], %f17
|
191
|
-
.f9:
|
192
|
-
sll %l0, 1, %l0
|
193
|
-
andcc %i4, %l0, %g0
|
194
|
-
beq .f10
|
195
|
-
nop
|
196
|
-
ld [%i2+FBASE+REGSIZE*16+4*9 ], %f19
|
197
|
-
.f10:
|
198
|
-
sll %l0, 1, %l0
|
199
|
-
andcc %i4, %l0, %g0
|
200
|
-
beq .f11
|
201
|
-
nop
|
202
|
-
ld [%i2+FBASE+REGSIZE*16+4*10], %f21
|
203
|
-
.f11:
|
204
|
-
sll %l0, 1, %l0
|
205
|
-
andcc %i4, %l0, %g0
|
206
|
-
beq .f12
|
207
|
-
nop
|
208
|
-
ld [%i2+FBASE+REGSIZE*16+4*11], %f23
|
209
|
-
.f12:
|
210
|
-
sll %l0, 1, %l0
|
211
|
-
andcc %i4, %l0, %g0
|
212
|
-
beq .f13
|
213
|
-
nop
|
214
|
-
ld [%i2+FBASE+REGSIZE*16+4*12], %f25
|
215
|
-
.f13:
|
216
|
-
sll %l0, 1, %l0
|
217
|
-
andcc %i4, %l0, %g0
|
218
|
-
beq .f14
|
219
|
-
nop
|
220
|
-
ld [%i2+FBASE+REGSIZE*16+4*13], %f27
|
221
|
-
.f14:
|
222
|
-
sll %l0, 1, %l0
|
223
|
-
andcc %i4, %l0, %g0
|
224
|
-
beq .f15
|
225
|
-
nop
|
226
|
-
ld [%i2+FBASE+REGSIZE*16+4*14], %f29
|
227
|
-
.f15:
|
228
|
-
sll %l0, 1, %l0
|
229
|
-
andcc %i4, %l0, %g0
|
230
|
-
beq .f_end
|
231
|
-
nop
|
232
|
-
ld [%i2+FBASE+REGSIZE*16+4*15], %f31
|
233
|
-
.f_end:
|
234
|
-
/* Skip Register Data, do we nee to copy on stack at all? */
|
235
|
-
sub %i1, DHEAD, %i1 /* skip data header. */
|
236
|
-
cmp %i1, 0
|
237
|
-
ble .do_call
|
238
|
-
nop
|
239
|
-
|
240
|
-
/* Copy loop: */
|
241
|
-
add %i2, DHEAD, %i2 /* i2 = skip data header. */
|
242
|
-
or %g0, %g0, %l0 /* l0 = offset initialized to 0. */
|
243
|
-
add %sp, BIAS+SHEAD, %l2 /* l2 = argument area on stack space (7th word). (64+4+6*4 = byte offset 92). */
|
244
|
-
|
245
|
-
.next:
|
246
|
-
ldx [%i2+%l0],%l1 /* Read from arg buffer(%i2) to %l1. */
|
247
|
-
stx %l1, [%l2+%l0] /* Write %l1 to stack space(%l2). */
|
248
|
-
add %l0, REGSIZE, %l0 /* Increment offset. */
|
249
|
-
sub %i1, REGSIZE, %i1 /* Decrement copy size. */
|
250
|
-
cmp %i1, 0
|
251
|
-
bgt .next
|
252
|
-
nop
|
253
|
-
.do_call:
|
254
|
-
call %i0 /* Call target. */
|
255
|
-
nop
|
256
|
-
or %o0, %g0, %i0
|
257
|
-
jmpl %i7 + 8, %g0
|
258
|
-
restore
|
259
|
-
/*
|
260
|
-
return %i7 + 8
|
261
|
-
jmpl %i7 + 8, %g0
|
262
|
-
nop
|
263
|
-
|
264
|
-
jmpl %i7 + 8, %g0
|
265
|
-
nop
|
266
|
-
restore
|
267
|
-
ret
|
268
|
-
*/
|
269
|
-
|
270
|
-
/*
|
271
|
-
or %o0, %g0, %i0
|
272
|
-
or %o1, %g0, %i1
|
273
|
-
or %o2, %g0, %i2
|
274
|
-
or %o3, %g0, %i3
|
275
|
-
return %i7 + 8
|
276
|
-
nop
|
277
|
-
|
278
|
-
Changes from v8:
|
279
|
-
- fundamental data types
|
280
|
-
- (un)signed int: 8,16,32,64
|
281
|
-
- float: 32,64,128
|
282
|
-
- float: IEEE 754 compilant
|
283
|
-
32 32-bit float registers f0,f1,..,f31
|
284
|
-
32 64-bit float registers f0,f2,..,f62
|
285
|
-
16 128-bit float registers f0,f4,..,f60
|
286
|
-
|
287
|
-
Description:
|
288
|
-
We need to raise up a dynamic stack frame.
|
289
|
-
Therefore we need to compute the stack size. We do this first,
|
290
|
-
in the context of the caller as a leaf function (using o3 as scratch for addition).
|
291
|
-
Then we raise the frame, ending up in o0-o3 is then i0-i3.
|
292
|
-
|
293
|
-
|
294
|
-
Stack Layout:
|
295
|
-
BIAS = 2047
|
296
|
-
|
297
|
-
BIAS+XX: should be 16 byte aligned.
|
298
|
-
...
|
299
|
-
136: argument overflow area
|
300
|
-
128: 1 extended word for struct/union poiner return value
|
301
|
-
BIAS+ 0: 16 extended words for registers (in/local) save area [register window]
|
302
|
-
|
303
|
-
|
304
|
-
Function Argument Passing:
|
305
|
-
- integer %o0..%o5 (caller view).
|
306
|
-
- floating-point %f0 .. %f15
|
307
|
-
- continuous memory starting at %sp+BIAS+136 (caller view).
|
308
|
-
|
309
|
-
Register Usage:
|
310
|
-
%fp0..%fp31 : floating-point arguments.
|
311
|
-
%sp or %o6 : stack pointer, always 8 (or 16?)-byte aligned.
|
312
|
-
%fp or %i6 : frame pointer.
|
313
|
-
%i0 and %o0 : integer and pointer return values.
|
314
|
-
%i7 and %o7 : return address. (caller puts return address to %o7, callee uses %i7)
|
315
|
-
%fp0 and %fp1: return value (float).
|
316
|
-
%i0..%i5 : input argument registers
|
317
|
-
%o0..%o5 : output argument registers
|
318
|
-
%g0 : always zero, writes to it have no effect.
|
319
|
-
|
320
|
-
Register Mappings:
|
321
|
-
r0-7 -> globals
|
322
|
-
r8-15 -> outs
|
323
|
-
r16-r23 -> locals
|
324
|
-
r24-r31 -> ins
|
325
|
-
|
326
|
-
Integer Register Overview Table:
|
327
|
-
ID Class Name Description
|
328
|
-
------------------------------------------------------------------------------
|
329
|
-
0 globals g0 always zero, writes to it have no effect
|
330
|
-
1 g1
|
331
|
-
2 g2
|
332
|
-
3 g3
|
333
|
-
4 g4
|
334
|
-
5 g5
|
335
|
-
6 g6
|
336
|
-
7 g7
|
337
|
-
8 out o0 [int/ptr] arg 0 and return
|
338
|
-
9 o1 arg 1
|
339
|
-
10 o2 arg 2
|
340
|
-
11 o3 arg 3
|
341
|
-
12 o4 arg 4
|
342
|
-
13 o5 arg 5
|
343
|
-
14 o6 stack pointer
|
344
|
-
15 o7
|
345
|
-
16 local l0 scratch
|
346
|
-
17 l1
|
347
|
-
18 l2
|
348
|
-
19 l3
|
349
|
-
20 l4
|
350
|
-
21 l5
|
351
|
-
22 l6
|
352
|
-
23 l7
|
353
|
-
24 in i0 [int/pt] arg 0 and return
|
354
|
-
25 i1
|
355
|
-
26 i2
|
356
|
-
27 i3
|
357
|
-
28 i4
|
358
|
-
29 i5
|
359
|
-
30 i6 frame pointer
|
360
|
-
31 i7
|
361
|
-
*/
|
362
|
-
|