rbdc 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bindings/ruby/rbdc/extconf.rb +57 -0
- data/bindings/ruby/rbdc/rbdc.c +304 -0
- data/dyncall/AUTHORS +4 -0
- data/dyncall/BUGS +3 -0
- data/dyncall/CMakeLists.txt +79 -0
- data/dyncall/ChangeLog +165 -0
- data/dyncall/LICENSE +15 -0
- data/dyncall/Makefile.M +15 -0
- data/dyncall/Makefile.embedded +71 -0
- data/dyncall/Makefile.generic +36 -0
- data/dyncall/Nmakefile +45 -0
- data/dyncall/README +92 -0
- data/dyncall/ToDo +114 -0
- data/dyncall/autovar/LICENSE.txt +15 -0
- data/dyncall/autovar/README.txt +69 -0
- data/dyncall/autovar/autovar_ABI.h +44 -0
- data/dyncall/autovar/autovar_ARCH.h +56 -0
- data/dyncall/autovar/autovar_CC.h +46 -0
- data/dyncall/autovar/autovar_OS.h +78 -0
- data/dyncall/autovar/autovar_OSFAMILY.h +39 -0
- data/dyncall/buildsys/cmake/Modules/FindDynCall.cmake +43 -0
- data/dyncall/buildsys/cmake/Modules/FindDynCallback.cmake +43 -0
- data/dyncall/buildsys/cmake/Modules/FindDynLoad.cmake +45 -0
- data/dyncall/buildsys/cmake/Modules/UseLATEX.cmake +811 -0
- data/dyncall/buildsys/dynmake/Makefile.base.M +82 -0
- data/dyncall/buildsys/dynmake/dynmake.bat +2 -0
- data/dyncall/buildsys/dynmake/dynmake.sh +4 -0
- data/dyncall/buildsys/lua/Makefile +10 -0
- data/dyncall/buildsys/lua/README.txt +4 -0
- data/dyncall/buildsys/lua/bootstrap.sh +34 -0
- data/dyncall/buildsys/lua/cleanup.sh +6 -0
- data/dyncall/buildsys/lua/mkfile +34 -0
- data/dyncall/buildsys/lua/setenv.sh +4 -0
- data/dyncall/buildsys/mk/app.mk +30 -0
- data/dyncall/buildsys/mk/dirs.mk +27 -0
- data/dyncall/buildsys/mk/epilog.mk +30 -0
- data/dyncall/buildsys/mk/lib.mk +23 -0
- data/dyncall/buildsys/mk/pcc.mk +60 -0
- data/dyncall/buildsys/mk/prolog.mk +35 -0
- data/dyncall/buildsys/nmake/common.nmake +61 -0
- data/dyncall/buildsys/nmake/epilog.nmake +28 -0
- data/dyncall/buildsys/nmake/prolog.nmake +76 -0
- data/dyncall/buildsys/nmake/tool_gcc.nmake +82 -0
- data/dyncall/buildsys/nmake/tool_msvc.nmake +67 -0
- data/dyncall/buildsys/scripts/batch-build-linux.sh +11 -0
- data/dyncall/buildsys/scripts/batch-build-minix.sh +11 -0
- data/dyncall/buildsys/scripts/batch-build-psp.sh +11 -0
- data/dyncall/buildsys/scripts/conf-nds.bat +41 -0
- data/dyncall/buildsys/scripts/setenv-cross-ios.sh +8 -0
- data/dyncall/buildsys/scripts/setenv-sdk-ios.sh +22 -0
- data/dyncall/buildsys/vs2005/dyncall/dyncall.vcproj +245 -0
- data/dyncall/buildsys/vs2005/test_plain/test_plain.vcproj +202 -0
- data/dyncall/buildsys/vs2005/vs2005.sln +29 -0
- data/dyncall/configure +152 -0
- data/dyncall/configure.bat +157 -0
- data/dyncall/configure.rc +234 -0
- data/dyncall/dynMakefile +4 -0
- data/dyncall/dyncall/CMakeLists.txt +53 -0
- data/dyncall/dyncall/DynCallConfig.cmake +3 -0
- data/dyncall/dyncall/Makefile.M +10 -0
- data/dyncall/dyncall/Makefile.embedded +20 -0
- data/dyncall/dyncall/Makefile.generic +16 -0
- data/dyncall/dyncall/Nmakefile +62 -0
- data/dyncall/dyncall/README-Developer.txt +45 -0
- data/dyncall/dyncall/README.txt +65 -0
- data/dyncall/dyncall/TODO +9 -0
- data/dyncall/dyncall/dynMakefile +4 -0
- data/dyncall/dyncall/dyncall.3 +189 -0
- data/dyncall/dyncall/dyncall.h +135 -0
- data/dyncall/dyncall/dyncall_alloc.h +40 -0
- data/dyncall/dyncall/dyncall_api.c +167 -0
- data/dyncall/dyncall/dyncall_call.S +72 -0
- data/dyncall/dyncall/dyncall_call_arm32_arm.S +80 -0
- data/dyncall/dyncall/dyncall_call_arm32_arm.h +61 -0
- data/dyncall/dyncall/dyncall_call_arm32_arm_armhf.S +96 -0
- data/dyncall/dyncall/dyncall_call_arm32_arm_armhf.h +44 -0
- data/dyncall/dyncall/dyncall_call_arm32_thumb.h +65 -0
- data/dyncall/dyncall/dyncall_call_arm32_thumb_apple.s +80 -0
- data/dyncall/dyncall/dyncall_call_arm32_thumb_armhf.S +121 -0
- data/dyncall/dyncall/dyncall_call_arm32_thumb_gas.s +101 -0
- data/dyncall/dyncall/dyncall_call_mips.h +50 -0
- data/dyncall/dyncall/dyncall_call_mips_eabi.h +61 -0
- data/dyncall/dyncall/dyncall_call_mips_eabi_gas.s +115 -0
- data/dyncall/dyncall/dyncall_call_mips_gas.S +36 -0
- data/dyncall/dyncall/dyncall_call_mips_n32.h +67 -0
- data/dyncall/dyncall/dyncall_call_mips_n32_gas.s +192 -0
- data/dyncall/dyncall/dyncall_call_mips_n64.h +67 -0
- data/dyncall/dyncall/dyncall_call_mips_n64_gas.s +192 -0
- data/dyncall/dyncall/dyncall_call_mips_o32.h +70 -0
- data/dyncall/dyncall/dyncall_call_mips_o32_gas.s +109 -0
- data/dyncall/dyncall/dyncall_call_ppc32.S +266 -0
- data/dyncall/dyncall/dyncall_call_ppc32.h +62 -0
- data/dyncall/dyncall/dyncall_call_sparc.S +192 -0
- data/dyncall/dyncall/dyncall_call_sparc.h +42 -0
- data/dyncall/dyncall/dyncall_call_sparc64.S +361 -0
- data/dyncall/dyncall/dyncall_call_sparc64.h +42 -0
- data/dyncall/dyncall/dyncall_call_sparc_v9.S +220 -0
- data/dyncall/dyncall/dyncall_call_sparc_v9.h +42 -0
- data/dyncall/dyncall/dyncall_call_x64-att.S +146 -0
- data/dyncall/dyncall/dyncall_call_x64.S +149 -0
- data/dyncall/dyncall/dyncall_call_x64.h +63 -0
- data/dyncall/dyncall/dyncall_call_x64_generic_masm.asm +70 -0
- data/dyncall/dyncall/dyncall_call_x86.S +238 -0
- data/dyncall/dyncall/dyncall_call_x86.h +70 -0
- data/dyncall/dyncall/dyncall_call_x86_8a.s +127 -0
- data/dyncall/dyncall/dyncall_call_x86_generic_masm.asm +136 -0
- data/dyncall/dyncall/dyncall_call_x86_nasm.asm +234 -0
- data/dyncall/dyncall/dyncall_callf.c +112 -0
- data/dyncall/dyncall/dyncall_callf.h +52 -0
- data/dyncall/dyncall/dyncall_callvm.c +68 -0
- data/dyncall/dyncall/dyncall_callvm.h +88 -0
- data/dyncall/dyncall/dyncall_callvm_arm32_arm.c +250 -0
- data/dyncall/dyncall/dyncall_callvm_arm32_arm.h +59 -0
- data/dyncall/dyncall/dyncall_callvm_arm32_arm_armhf.c +204 -0
- data/dyncall/dyncall/dyncall_callvm_arm32_arm_armhf.h +63 -0
- data/dyncall/dyncall/dyncall_callvm_arm32_thumb.c +271 -0
- data/dyncall/dyncall/dyncall_callvm_arm32_thumb.h +59 -0
- data/dyncall/dyncall/dyncall_callvm_base.c +33 -0
- data/dyncall/dyncall/dyncall_callvm_mips.c +40 -0
- data/dyncall/dyncall/dyncall_callvm_mips.h +37 -0
- data/dyncall/dyncall/dyncall_callvm_mips_eabi.c +181 -0
- data/dyncall/dyncall/dyncall_callvm_mips_eabi.h +61 -0
- data/dyncall/dyncall/dyncall_callvm_mips_n32.c +268 -0
- data/dyncall/dyncall/dyncall_callvm_mips_n64.c +268 -0
- data/dyncall/dyncall/dyncall_callvm_mips_n64.h +53 -0
- data/dyncall/dyncall/dyncall_callvm_mips_o32.c +235 -0
- data/dyncall/dyncall/dyncall_callvm_mips_o32.h +45 -0
- data/dyncall/dyncall/dyncall_callvm_ppc32.c +372 -0
- data/dyncall/dyncall/dyncall_callvm_ppc32.h +61 -0
- data/dyncall/dyncall/dyncall_callvm_sparc.c +155 -0
- data/dyncall/dyncall/dyncall_callvm_sparc.h +44 -0
- data/dyncall/dyncall/dyncall_callvm_sparc64.c +239 -0
- data/dyncall/dyncall/dyncall_callvm_sparc64.h +47 -0
- data/dyncall/dyncall/dyncall_callvm_sparc_v9.c +182 -0
- data/dyncall/dyncall/dyncall_callvm_sparc_v9.h +45 -0
- data/dyncall/dyncall/dyncall_callvm_x64.c +228 -0
- data/dyncall/dyncall/dyncall_callvm_x64.h +111 -0
- data/dyncall/dyncall/dyncall_callvm_x86.c +667 -0
- data/dyncall/dyncall/dyncall_callvm_x86.h +75 -0
- data/dyncall/dyncall/dyncall_config.h +46 -0
- data/dyncall/dyncall/dyncall_macros.h +248 -0
- data/dyncall/dyncall/dyncall_signature.h +71 -0
- data/dyncall/dyncall/dyncall_struct.c +255 -0
- data/dyncall/dyncall/dyncall_struct.h +69 -0
- data/dyncall/dyncall/dyncall_types.h +74 -0
- data/dyncall/dyncall/dyncall_utils.h +38 -0
- data/dyncall/dyncall/dyncall_value.h +73 -0
- data/dyncall/dyncall/dyncall_vector.c +52 -0
- data/dyncall/dyncall/dyncall_vector.h +56 -0
- data/dyncall/dyncall/gen-masm.sh +7 -0
- data/dyncall/dyncall/mkfile +29 -0
- data/dyncall/dyncallback/CMakeLists.txt +55 -0
- data/dyncall/dyncallback/DynCallbackConfig.cmake +2 -0
- data/dyncall/dyncallback/Makefile.M +10 -0
- data/dyncall/dyncallback/Makefile.embedded +15 -0
- data/dyncall/dyncallback/Makefile.generic +20 -0
- data/dyncall/dyncallback/Nmakefile +71 -0
- data/dyncall/dyncallback/README.txt +9 -0
- data/dyncall/dyncallback/TODO +4 -0
- data/dyncall/dyncallback/dynMakefile +4 -0
- data/dyncall/dyncallback/dyncall_alloc_wx.c +35 -0
- data/dyncall/dyncallback/dyncall_alloc_wx.h +46 -0
- data/dyncall/dyncallback/dyncall_alloc_wx_malloc.c +40 -0
- data/dyncall/dyncallback/dyncall_alloc_wx_mmap.c +42 -0
- data/dyncall/dyncallback/dyncall_alloc_wx_win32.c +42 -0
- data/dyncall/dyncallback/dyncall_args.c +45 -0
- data/dyncall/dyncallback/dyncall_args.h +65 -0
- data/dyncall/dyncallback/dyncall_args_arm32_arm.c +112 -0
- data/dyncall/dyncallback/dyncall_args_arm32_arm.h +40 -0
- data/dyncall/dyncallback/dyncall_args_arm32_thumb.c +29 -0
- data/dyncall/dyncallback/dyncall_args_arm32_thumb.h +32 -0
- data/dyncall/dyncallback/dyncall_args_mips.c +81 -0
- data/dyncall/dyncallback/dyncall_args_mips.h +41 -0
- data/dyncall/dyncallback/dyncall_args_ppc32.c +88 -0
- data/dyncall/dyncallback/dyncall_args_ppc32.h +41 -0
- data/dyncall/dyncallback/dyncall_args_sparc32.c +41 -0
- data/dyncall/dyncallback/dyncall_args_sparc32.h +37 -0
- data/dyncall/dyncallback/dyncall_args_sparc64.c +41 -0
- data/dyncall/dyncallback/dyncall_args_sparc64.h +37 -0
- data/dyncall/dyncallback/dyncall_args_x64.c +73 -0
- data/dyncall/dyncallback/dyncall_args_x64.h +44 -0
- data/dyncall/dyncallback/dyncall_args_x86.c +121 -0
- data/dyncall/dyncallback/dyncall_args_x86.h +58 -0
- data/dyncall/dyncallback/dyncall_callback.c +45 -0
- data/dyncall/dyncallback/dyncall_callback.h +51 -0
- data/dyncall/dyncallback/dyncall_callback_arch.S +71 -0
- data/dyncall/dyncallback/dyncall_callback_arm32_arm.c +63 -0
- data/dyncall/dyncallback/dyncall_callback_arm32_arm.h +45 -0
- data/dyncall/dyncallback/dyncall_callback_arm32_arm_apple.s +73 -0
- data/dyncall/dyncallback/dyncall_callback_arm32_arm_gas.s +73 -0
- data/dyncall/dyncallback/dyncall_callback_arm32_thumb.c +29 -0
- data/dyncall/dyncallback/dyncall_callback_arm32_thumb.h +33 -0
- data/dyncall/dyncallback/dyncall_callback_arm32_thumb_apple.s +32 -0
- data/dyncall/dyncallback/dyncall_callback_arm32_thumb_gas.s +32 -0
- data/dyncall/dyncallback/dyncall_callback_mips.c +61 -0
- data/dyncall/dyncallback/dyncall_callback_mips.h +42 -0
- data/dyncall/dyncallback/dyncall_callback_ppc32.S +33 -0
- data/dyncall/dyncallback/dyncall_callback_ppc32.c +60 -0
- data/dyncall/dyncallback/dyncall_callback_ppc32.h +43 -0
- data/dyncall/dyncallback/dyncall_callback_ppc32_apple.s +180 -0
- data/dyncall/dyncallback/dyncall_callback_sparc32.c +57 -0
- data/dyncall/dyncallback/dyncall_callback_sparc32.h +43 -0
- data/dyncall/dyncallback/dyncall_callback_sparc32.s +30 -0
- data/dyncall/dyncallback/dyncall_callback_sparc64.c +57 -0
- data/dyncall/dyncallback/dyncall_callback_sparc64.s +30 -0
- data/dyncall/dyncallback/dyncall_callback_x64.S +187 -0
- data/dyncall/dyncallback/dyncall_callback_x64.c +69 -0
- data/dyncall/dyncallback/dyncall_callback_x64.h +44 -0
- data/dyncall/dyncallback/dyncall_callback_x64_apple.s +122 -0
- data/dyncall/dyncallback/dyncall_callback_x64_gas.s +119 -0
- data/dyncall/dyncallback/dyncall_callback_x64_gas_w64.s +102 -0
- data/dyncall/dyncallback/dyncall_callback_x64_masm.asm +89 -0
- data/dyncall/dyncallback/dyncall_callback_x86.S +115 -0
- data/dyncall/dyncallback/dyncall_callback_x86.c +281 -0
- data/dyncall/dyncallback/dyncall_callback_x86.h +49 -0
- data/dyncall/dyncallback/dyncall_callback_x86_8a.s +100 -0
- data/dyncall/dyncallback/dyncall_callback_x86_masm.asm +74 -0
- data/dyncall/dyncallback/dyncall_thunk.c +47 -0
- data/dyncall/dyncallback/dyncall_thunk.h +84 -0
- data/dyncall/dyncallback/dyncall_thunk_arm32_arm.c +45 -0
- data/dyncall/dyncallback/dyncall_thunk_arm32_arm.h +40 -0
- data/dyncall/dyncallback/dyncall_thunk_arm32_thumb.c +29 -0
- data/dyncall/dyncallback/dyncall_thunk_arm32_thumb.h +35 -0
- data/dyncall/dyncallback/dyncall_thunk_mips.c +52 -0
- data/dyncall/dyncallback/dyncall_thunk_mips.h +37 -0
- data/dyncall/dyncallback/dyncall_thunk_ppc32.c +51 -0
- data/dyncall/dyncallback/dyncall_thunk_ppc32.h +40 -0
- data/dyncall/dyncallback/dyncall_thunk_sparc32.c +32 -0
- data/dyncall/dyncallback/dyncall_thunk_sparc32.h +36 -0
- data/dyncall/dyncallback/dyncall_thunk_sparc64.c +32 -0
- data/dyncall/dyncallback/dyncall_thunk_sparc64.h +36 -0
- data/dyncall/dyncallback/dyncall_thunk_x64.c +48 -0
- data/dyncall/dyncallback/dyncall_thunk_x64.h +39 -0
- data/dyncall/dyncallback/dyncall_thunk_x86.c +44 -0
- data/dyncall/dyncallback/dyncall_thunk_x86.h +39 -0
- data/dyncall/dyncallback/dyncallback.3 +134 -0
- data/dyncall/dyncallback/gen-masm.sh +8 -0
- data/dyncall/dyncallback/mkfile +29 -0
- data/dyncall/dynload/CMakeLists.txt +25 -0
- data/dyncall/dynload/DynLoadConfig.cmake +3 -0
- data/dyncall/dynload/Makefile.M +10 -0
- data/dyncall/dynload/Makefile.embedded +22 -0
- data/dyncall/dynload/Makefile.generic +18 -0
- data/dyncall/dynload/Nmakefile +57 -0
- data/dyncall/dynload/README.txt +113 -0
- data/dyncall/dynload/TODO +20 -0
- data/dyncall/dynload/dynMakefile +4 -0
- data/dyncall/dynload/dynload.3 +64 -0
- data/dyncall/dynload/dynload.c +38 -0
- data/dyncall/dynload/dynload.h +65 -0
- data/dyncall/dynload/dynload_alloc.h +40 -0
- data/dyncall/dynload/dynload_darwin.c +89 -0
- data/dyncall/dynload/dynload_syms.c +38 -0
- data/dyncall/dynload/dynload_syms_elf.c +214 -0
- data/dyncall/dynload/dynload_syms_mach-o.c +167 -0
- data/dyncall/dynload/dynload_syms_pe.c +109 -0
- data/dyncall/dynload/dynload_unix.c +57 -0
- data/dyncall/dynload/dynload_windows.c +59 -0
- data/dyncall/mkfile +36 -0
- data/dyncall/portasm/README.txt +42 -0
- data/dyncall/portasm/gen-masm.sh +3 -0
- data/dyncall/portasm/portasm-arm.S +36 -0
- data/dyncall/portasm/portasm-ppc.S +98 -0
- data/dyncall/portasm/portasm-x64-att.S +155 -0
- data/dyncall/portasm/portasm-x86.S +127 -0
- metadata +311 -0
@@ -0,0 +1,61 @@
|
|
1
|
+
/*
|
2
|
+
|
3
|
+
Package: dyncall
|
4
|
+
Library: dyncall
|
5
|
+
File: dyncall/dyncall_call_mips_eabi.h
|
6
|
+
Description: mips "eabi" abi call kernel C interface.
|
7
|
+
License:
|
8
|
+
|
9
|
+
Copyright (c) 2007-2011 Daniel Adler <dadler@uni-goettingen.de>,
|
10
|
+
Tassilo Philipp <tphilipp@potion-studios.com>
|
11
|
+
|
12
|
+
Permission to use, copy, modify, and distribute this software for any
|
13
|
+
purpose with or without fee is hereby granted, provided that the above
|
14
|
+
copyright notice and this permission notice appear in all copies.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
17
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
18
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
19
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
20
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
21
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
22
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
23
|
+
|
24
|
+
*/
|
25
|
+
|
26
|
+
|
27
|
+
#ifndef DYNCALL_CALL_MIPS_EABI_H
|
28
|
+
#define DYNCALL_CALL_MIPS_EABI_H
|
29
|
+
|
30
|
+
#include "dyncall_types.h"
|
31
|
+
|
32
|
+
#ifdef __cplusplus
|
33
|
+
extern "C" {
|
34
|
+
#endif
|
35
|
+
|
36
|
+
/* Call-kernel register data:
|
37
|
+
|
38
|
+
Details:
|
39
|
+
Two register content buffers for the corresponding register types
|
40
|
+
integer and float are filled from CallVM code and then later at
|
41
|
+
call-kernel loaded into the registers.
|
42
|
+
*/
|
43
|
+
|
44
|
+
struct DCRegData_mips_eabi
|
45
|
+
{
|
46
|
+
DCint mIntData[8];
|
47
|
+
DCfloat mSingleData[8];
|
48
|
+
};
|
49
|
+
|
50
|
+
|
51
|
+
/* Call kernel. */
|
52
|
+
|
53
|
+
void dcCall_mips_eabi(DCpointer target, struct DCRegData_mips_eabi* regdata, DCsize stksize, DCpointer stkdata);
|
54
|
+
|
55
|
+
#ifdef __cplusplus
|
56
|
+
}
|
57
|
+
#endif
|
58
|
+
|
59
|
+
|
60
|
+
#endif /* DYNCALL_CALL_MIPS_EABI_H */
|
61
|
+
|
@@ -0,0 +1,115 @@
|
|
1
|
+
/*
|
2
|
+
|
3
|
+
Package: dyncall
|
4
|
+
Library: dyncall
|
5
|
+
File: dyncall/dyncall_call_mips_eabi_gas.s
|
6
|
+
Description:
|
7
|
+
License:
|
8
|
+
|
9
|
+
Copyright (c) 2007-2011 Daniel Adler <dadler@uni-goettingen.de>,
|
10
|
+
Tassilo Philipp <tphilipp@potion-studios.com>
|
11
|
+
|
12
|
+
Permission to use, copy, modify, and distribute this software for any
|
13
|
+
purpose with or without fee is hereby granted, provided that the above
|
14
|
+
copyright notice and this permission notice appear in all copies.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
17
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
18
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
19
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
20
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
21
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
22
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
23
|
+
|
24
|
+
*/
|
25
|
+
|
26
|
+
|
27
|
+
/*//////////////////////////////////////////////////////////////////////
|
28
|
+
|
29
|
+
dyncall_call_mips_eabi_gas.s
|
30
|
+
|
31
|
+
MIPS 32bit family of processors.
|
32
|
+
2008-01-03
|
33
|
+
|
34
|
+
//////////////////////////////////////////////////////////////////////*/
|
35
|
+
.text
|
36
|
+
.globl dcCall_mips_eabi
|
37
|
+
|
38
|
+
dcCall_mips_eabi:
|
39
|
+
/* $4 target function */
|
40
|
+
/* $5 register data */
|
41
|
+
/* $6 stack size */
|
42
|
+
/* $7 stack data */
|
43
|
+
addiu $sp,$sp,-16
|
44
|
+
sw $16,8($sp)
|
45
|
+
sw $31,4($sp)
|
46
|
+
sw $fp,0($sp)
|
47
|
+
|
48
|
+
move $fp,$sp
|
49
|
+
|
50
|
+
move $2, $0
|
51
|
+
add $2, 8
|
52
|
+
neg $2
|
53
|
+
and $sp, $2
|
54
|
+
add $6, 7
|
55
|
+
and $6, $2
|
56
|
+
|
57
|
+
move $12,$4 /* target function */
|
58
|
+
move $13,$5 /* register data */
|
59
|
+
move $16,$6 /* stack size */
|
60
|
+
|
61
|
+
sub $sp,$sp,$16 /* allocate stack frame */
|
62
|
+
|
63
|
+
/* copy stack data */
|
64
|
+
|
65
|
+
.next:
|
66
|
+
beq $6,$0, .skip
|
67
|
+
nop
|
68
|
+
addiu $6,$6, -4
|
69
|
+
|
70
|
+
lw $2, 0($7)
|
71
|
+
sw $2, 0($sp)
|
72
|
+
addiu $7,$7, 4
|
73
|
+
addiu $sp,$sp, 4
|
74
|
+
j .next
|
75
|
+
nop
|
76
|
+
|
77
|
+
.skip:
|
78
|
+
|
79
|
+
sub $sp,$sp,$16
|
80
|
+
|
81
|
+
/* load integer parameter registers */
|
82
|
+
|
83
|
+
lw $4 , 0($13)
|
84
|
+
lw $5 , 4($13)
|
85
|
+
lw $6 , 8($13)
|
86
|
+
lw $7 ,12($13)
|
87
|
+
lw $8 ,16($13)
|
88
|
+
lw $9 ,20($13)
|
89
|
+
lw $10,24($13)
|
90
|
+
lw $11,28($13)
|
91
|
+
|
92
|
+
/* load single-precise floating pointer parameter registers */
|
93
|
+
|
94
|
+
lwc1 $f12, 32($13)
|
95
|
+
lwc1 $f13, 36($13)
|
96
|
+
lwc1 $f14, 40($13)
|
97
|
+
lwc1 $f15, 44($13)
|
98
|
+
lwc1 $f16, 48($13)
|
99
|
+
lwc1 $f17, 52($13)
|
100
|
+
lwc1 $f18, 56($13)
|
101
|
+
lwc1 $f19, 60($13)
|
102
|
+
|
103
|
+
jal $12
|
104
|
+
nop
|
105
|
+
|
106
|
+
/* add $sp,$sp,$16 */
|
107
|
+
move $sp,$fp
|
108
|
+
|
109
|
+
lw $16,8($sp)
|
110
|
+
lw $31,4($sp)
|
111
|
+
lw $fp,0($sp)
|
112
|
+
addiu $sp,$sp,16
|
113
|
+
j $31
|
114
|
+
nop
|
115
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
/*
|
2
|
+
|
3
|
+
Package: dyncall
|
4
|
+
Library: dyncall
|
5
|
+
File: dyncall/dyncall_call_mips_gas.S
|
6
|
+
Description: auto-select (via gnu c preprocessor) mips abi call kernel
|
7
|
+
License:
|
8
|
+
|
9
|
+
Copyright (c) 2007-2011 Daniel Adler <dadler@uni-goettingen.de>,
|
10
|
+
Tassilo Philipp <tphilipp@potion-studios.com>
|
11
|
+
|
12
|
+
Permission to use, copy, modify, and distribute this software for any
|
13
|
+
purpose with or without fee is hereby granted, provided that the above
|
14
|
+
copyright notice and this permission notice appear in all copies.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
17
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
18
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
19
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
20
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
21
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
22
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
23
|
+
|
24
|
+
*/
|
25
|
+
|
26
|
+
|
27
|
+
#if defined(DC__ABI_MIPS_O32)
|
28
|
+
#include "dyncall_call_mips_o32_gas.s"
|
29
|
+
#elif defined(DC__ABI_MIPS_N64)
|
30
|
+
#include "dyncall_call_mips_n64_gas.s"
|
31
|
+
#elif defined(DC__ABI_MIPS_N32)
|
32
|
+
#include "dyncall_call_mips_n32_gas.s"
|
33
|
+
#else
|
34
|
+
#include "dyncall_call_mips_eabi_gas.s"
|
35
|
+
#endif
|
36
|
+
|
@@ -0,0 +1,67 @@
|
|
1
|
+
/*
|
2
|
+
|
3
|
+
Package: dyncall
|
4
|
+
Library: dyncall
|
5
|
+
File: dyncall/dyncall_call_mips_n32.h
|
6
|
+
Description: mips "n32" ABI call-kernel C interface.
|
7
|
+
License:
|
8
|
+
|
9
|
+
Copyright (c) 2007-2011 Daniel Adler <dadler@uni-goettingen.de>,
|
10
|
+
Tassilo Philipp <tphilipp@potion-studios.com>
|
11
|
+
|
12
|
+
Permission to use, copy, modify, and distribute this software for any
|
13
|
+
purpose with or without fee is hereby granted, provided that the above
|
14
|
+
copyright notice and this permission notice appear in all copies.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
17
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
18
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
19
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
20
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
21
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
22
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
23
|
+
|
24
|
+
*/
|
25
|
+
|
26
|
+
|
27
|
+
#ifndef DYNCALL_CALL_MIPS_N32_H
|
28
|
+
#define DYNCALL_CALL_MIPS_N32_H
|
29
|
+
|
30
|
+
#include "dyncall_types.h"
|
31
|
+
|
32
|
+
#ifdef __cplusplus
|
33
|
+
extern "C" {
|
34
|
+
#endif
|
35
|
+
|
36
|
+
/*
|
37
|
+
two register-files for integer (promoted to 64-bit) and float (not promoted!)
|
38
|
+
are used.
|
39
|
+
|
40
|
+
arguments are transfered in a free slot on the corresponding register file.
|
41
|
+
the other register-file will be skipped by one.
|
42
|
+
|
43
|
+
float arguments are either loaded from single or double -
|
44
|
+
a auto-conversion into double and then loaded as double precision
|
45
|
+
turned out to fail for several tests.
|
46
|
+
|
47
|
+
therefore a union for storage of float or double is used instead.
|
48
|
+
a bitmask (mUseDouble) records which type is used and will be
|
49
|
+
interpreted in the call-kernel.
|
50
|
+
*/
|
51
|
+
|
52
|
+
struct DCRegData_mips_n32
|
53
|
+
{
|
54
|
+
DClonglong mIntData[8];
|
55
|
+
union { DCfloat f; DCdouble d; } mFloatData[8];
|
56
|
+
DClonglong mUseDouble; /* bitmask: lower 8 bits specifies to use float or double from union array. */
|
57
|
+
};
|
58
|
+
|
59
|
+
void dcCall_mips_n32(DCpointer target, struct DCRegData_mips_n32* regdata, DCsize stksize, DCpointer stkdata);
|
60
|
+
|
61
|
+
#ifdef __cplusplus
|
62
|
+
}
|
63
|
+
#endif
|
64
|
+
|
65
|
+
|
66
|
+
#endif /* DYNCALL_CALL_MIPS_N64_H */
|
67
|
+
|
@@ -0,0 +1,192 @@
|
|
1
|
+
/*
|
2
|
+
|
3
|
+
Package: dyncall
|
4
|
+
Library: dyncall
|
5
|
+
File: dyncall/dyncall_call_mips_n32_gas.s
|
6
|
+
Description: mips "n32" abi call kernel implementation in GNU Assembler
|
7
|
+
License:
|
8
|
+
|
9
|
+
Copyright (c) 2007-2011 Daniel Adler <dadler@uni-goettingen.de>,
|
10
|
+
Tassilo Philipp <tphilipp@potion-studios.com>
|
11
|
+
|
12
|
+
Permission to use, copy, modify, and distribute this software for any
|
13
|
+
purpose with or without fee is hereby granted, provided that the above
|
14
|
+
copyright notice and this permission notice appear in all copies.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
17
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
18
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
19
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
20
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
21
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
22
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
23
|
+
|
24
|
+
*/
|
25
|
+
|
26
|
+
.section .mdebug.abiN32
|
27
|
+
.previous
|
28
|
+
.abicalls
|
29
|
+
.text
|
30
|
+
.align 2
|
31
|
+
.globl dcCall_mips_n32
|
32
|
+
.ent dcCall_mips_n32
|
33
|
+
dcCall_mips_n32:
|
34
|
+
|
35
|
+
/* Stack-frame prolog */
|
36
|
+
|
37
|
+
.frame $fp,64,$31 /* vars=16, regs=3/0, args=0, extra=16 */
|
38
|
+
.mask 0xd0000000,-8
|
39
|
+
.fmask 0x00000000,0
|
40
|
+
subu $sp,$sp,64
|
41
|
+
sd $31,48($sp) /* save return address register (ra) */
|
42
|
+
sd $30,40($sp) /* save frame pointer register (fp) */
|
43
|
+
sd $28,32($sp) /* save global pointer register (gp) */
|
44
|
+
move $fp,$sp
|
45
|
+
|
46
|
+
|
47
|
+
/* arguments: */
|
48
|
+
|
49
|
+
/* $4 target function */
|
50
|
+
/* $5 register data */
|
51
|
+
/* $6 stack size */
|
52
|
+
/* $7 stack data */
|
53
|
+
|
54
|
+
|
55
|
+
/* allocate argument stack space */
|
56
|
+
|
57
|
+
subu $sp, $sp, $6
|
58
|
+
|
59
|
+
/* copy stack data */
|
60
|
+
|
61
|
+
/* n64 abi call assumptions:
|
62
|
+
- stack data is 16-byte aligned.
|
63
|
+
- no extra-storage for arguments passed via registers.
|
64
|
+
*/
|
65
|
+
|
66
|
+
/* $12 source pointer (parameter stack data) */
|
67
|
+
/* $14 destination (stack pointer) */
|
68
|
+
/* $6 byte count */
|
69
|
+
|
70
|
+
move $12, $7
|
71
|
+
move $14, $sp
|
72
|
+
|
73
|
+
.next:
|
74
|
+
beq $6, $0, .skip
|
75
|
+
nop
|
76
|
+
daddiu $6, $6, -8
|
77
|
+
ld $2, 0($12)
|
78
|
+
sd $2, 0($14)
|
79
|
+
daddiu $12,$12, 8
|
80
|
+
daddiu $14,$14, 8
|
81
|
+
b .next
|
82
|
+
.skip:
|
83
|
+
move $25, $4
|
84
|
+
|
85
|
+
/* load registers */
|
86
|
+
|
87
|
+
/* locals: */
|
88
|
+
/* $13 = register data */
|
89
|
+
/* $14 = useDouble flags */
|
90
|
+
move $13, $5
|
91
|
+
ld $14, 128($13)
|
92
|
+
|
93
|
+
/* load integer parameter registers */
|
94
|
+
|
95
|
+
ld $4 , 0($13)
|
96
|
+
ld $5 , 8($13)
|
97
|
+
ld $6 ,16($13)
|
98
|
+
ld $7 ,24($13)
|
99
|
+
ld $8 ,32($13)
|
100
|
+
ld $9 ,40($13)
|
101
|
+
ld $10,48($13)
|
102
|
+
ld $11,56($13)
|
103
|
+
|
104
|
+
/* load float-or-double floating pointer parameter registers
|
105
|
+
a 64-bit bitmask given at byte offset 128 of regdata indicates
|
106
|
+
if loading a float (bit cleared) or double (bit set), starting
|
107
|
+
at bit position 0 in bitmask.
|
108
|
+
*/
|
109
|
+
.t0:
|
110
|
+
and $15, $14, 1
|
111
|
+
bgtz $15, .d0
|
112
|
+
.f0:
|
113
|
+
l.s $f12, 64($13)
|
114
|
+
j .t1
|
115
|
+
.d0:
|
116
|
+
l.d $f12, 64($13)
|
117
|
+
|
118
|
+
.t1:
|
119
|
+
and $15, $14, 2
|
120
|
+
bgtz $15, .d1
|
121
|
+
.f1:
|
122
|
+
l.s $f13, 72($13)
|
123
|
+
j .t2
|
124
|
+
.d1:
|
125
|
+
l.d $f13, 72($13)
|
126
|
+
.t2:
|
127
|
+
and $15, $14, 4
|
128
|
+
bgtz $15, .d2
|
129
|
+
.f2:
|
130
|
+
l.s $f14, 80($13)
|
131
|
+
j .t3
|
132
|
+
.d2:
|
133
|
+
l.d $f14, 80($13)
|
134
|
+
.t3:
|
135
|
+
and $15, $14, 8
|
136
|
+
bgtz $15, .d3
|
137
|
+
.f3:
|
138
|
+
l.s $f15, 88($13)
|
139
|
+
j .t4
|
140
|
+
.d3:
|
141
|
+
l.d $f15, 88($13)
|
142
|
+
.t4:
|
143
|
+
and $15, $14, 16
|
144
|
+
bgtz $15, .d4
|
145
|
+
.f4:
|
146
|
+
l.s $f16, 96($13)
|
147
|
+
j .t5
|
148
|
+
.d4:
|
149
|
+
l.d $f16, 96($13)
|
150
|
+
.t5:
|
151
|
+
and $15, $14, 32
|
152
|
+
bgtz $15, .d5
|
153
|
+
.f5:
|
154
|
+
l.s $f17,104($13)
|
155
|
+
j .t6
|
156
|
+
.d5:
|
157
|
+
l.d $f17,104($13)
|
158
|
+
.t6:
|
159
|
+
and $15, $14, 64
|
160
|
+
bgtz $15, .d6
|
161
|
+
.f6:
|
162
|
+
l.s $f18,112($13)
|
163
|
+
j .t7
|
164
|
+
.d6:
|
165
|
+
l.d $f18,112($13)
|
166
|
+
.t7:
|
167
|
+
and $15, $14, 128
|
168
|
+
bgtz $15, .d7
|
169
|
+
.f7:
|
170
|
+
l.s $f19,120($13)
|
171
|
+
j .fregend
|
172
|
+
.d7:
|
173
|
+
l.d $f19,120($13)
|
174
|
+
|
175
|
+
.fregend:
|
176
|
+
|
177
|
+
/* jump-and-link to register $25 */
|
178
|
+
|
179
|
+
jal $31, $25
|
180
|
+
|
181
|
+
/* no nop according to gcc assembly output */
|
182
|
+
|
183
|
+
/* Stack-frame epilog */
|
184
|
+
move $sp,$fp
|
185
|
+
ld $31,48($sp) /* restore ra register */
|
186
|
+
ld $fp,40($sp) /* restore fp register */
|
187
|
+
ld $28,32($sp) /* restore gp register */
|
188
|
+
daddu $sp,$sp,64
|
189
|
+
j $31
|
190
|
+
.end dcCall_mips_n64
|
191
|
+
.size dcCall_mips_n64, .-dcCall_mips_n64
|
192
|
+
|