rbdc 0.8.7 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (215) hide show
  1. checksums.yaml +7 -0
  2. data/{bindings → dyncall-bindings}/ruby/rbdc/extconf.rb +1 -1
  3. data/{bindings → dyncall-bindings}/ruby/rbdc/rbdc.c +3 -1
  4. data/dyncall/AUTHORS +2 -0
  5. data/dyncall/BUGS +1 -0
  6. data/dyncall/CMakeLists.txt +10 -2
  7. data/dyncall/ChangeLog +46 -11
  8. data/dyncall/LICENSE +4 -1
  9. data/dyncall/Makefile.embedded +7 -3
  10. data/dyncall/README +23 -14
  11. data/dyncall/ToDo +27 -28
  12. data/dyncall/autovar/autovar_ABI.h +3 -2
  13. data/dyncall/autovar/autovar_ARCH.h +13 -10
  14. data/dyncall/autovar/autovar_CC.h +3 -2
  15. data/dyncall/autovar/autovar_OS.h +3 -2
  16. data/dyncall/autovar/autovar_OSFAMILY.h +3 -2
  17. data/dyncall/buildsys/scripts/batch-build-linux.sh +6 -2
  18. data/dyncall/buildsys/scripts/batch-build-minix.sh +2 -0
  19. data/dyncall/buildsys/scripts/batch-build-psp.sh +4 -1
  20. data/dyncall/buildsys/scripts/elf-to-psp-eboot.sh +19 -0
  21. data/dyncall/buildsys/scripts/setenv-cross-ios.sh +0 -0
  22. data/dyncall/buildsys/scripts/setenv-sdk-ios.sh +0 -0
  23. data/dyncall/configure +83 -30
  24. data/dyncall/dyncall/dyncall.3 +16 -4
  25. data/dyncall/dyncall/dyncall.h +9 -1
  26. data/dyncall/dyncall/dyncall_alloc.h +2 -1
  27. data/dyncall/dyncall/dyncall_api.c +2 -1
  28. data/dyncall/dyncall/dyncall_call.S +9 -2
  29. data/dyncall/dyncall/dyncall_call_arm32_arm.S +2 -1
  30. data/dyncall/dyncall/dyncall_call_arm32_arm.h +8 -2
  31. data/dyncall/dyncall/dyncall_call_arm32_arm_armhf.S +11 -19
  32. data/dyncall/dyncall/dyncall_call_arm32_arm_armhf.h +15 -2
  33. data/dyncall/dyncall/dyncall_call_arm32_thumb.h +8 -6
  34. data/dyncall/dyncall/dyncall_call_arm32_thumb_armhf.S +10 -18
  35. data/dyncall/dyncall/dyncall_call_arm32_thumb_gas.s +0 -16
  36. data/dyncall/dyncall/dyncall_call_arm64.S +226 -0
  37. data/dyncall/dyncall/dyncall_call_arm64.h +45 -0
  38. data/dyncall/dyncall/dyncall_call_mips.h +2 -1
  39. data/dyncall/dyncall/dyncall_call_mips_eabi.h +2 -1
  40. data/dyncall/dyncall/dyncall_call_mips_gas.S +2 -1
  41. data/dyncall/dyncall/dyncall_call_mips_n32.h +2 -1
  42. data/dyncall/dyncall/dyncall_call_mips_n64.h +2 -1
  43. data/dyncall/dyncall/dyncall_call_mips_o32.h +2 -1
  44. data/dyncall/dyncall/dyncall_call_ppc32.S +27 -2
  45. data/dyncall/dyncall/dyncall_call_ppc32.h +2 -2
  46. data/dyncall/dyncall/dyncall_call_ppc64.S +210 -0
  47. data/dyncall/dyncall/dyncall_call_ppc64.h +55 -0
  48. data/dyncall/dyncall/dyncall_call_sparc.S +2 -1
  49. data/dyncall/dyncall/dyncall_call_sparc.h +2 -1
  50. data/dyncall/dyncall/dyncall_call_sparc64.S +2 -1
  51. data/dyncall/dyncall/dyncall_call_sparc64.h +2 -1
  52. data/dyncall/dyncall/dyncall_call_sparc_v9.S +25 -23
  53. data/dyncall/dyncall/dyncall_call_sparc_v9.h +2 -1
  54. data/dyncall/dyncall/dyncall_call_x64-att.S +2 -1
  55. data/dyncall/dyncall/dyncall_call_x64.S +2 -1
  56. data/dyncall/dyncall/dyncall_call_x64.h +2 -1
  57. data/dyncall/dyncall/dyncall_call_x86.S +2 -1
  58. data/dyncall/dyncall/dyncall_call_x86.h +2 -1
  59. data/dyncall/dyncall/dyncall_callf.c +56 -66
  60. data/dyncall/dyncall/dyncall_callf.h +5 -1
  61. data/dyncall/dyncall/dyncall_callvm.c +11 -2
  62. data/dyncall/dyncall/dyncall_callvm.h +2 -1
  63. data/dyncall/dyncall/dyncall_callvm_arm32_arm.c +2 -1
  64. data/dyncall/dyncall/dyncall_callvm_arm32_arm.h +2 -1
  65. data/dyncall/dyncall/dyncall_callvm_arm32_arm_armhf.c +60 -30
  66. data/dyncall/dyncall/dyncall_callvm_arm32_arm_armhf.h +3 -2
  67. data/dyncall/dyncall/dyncall_callvm_arm32_thumb.c +2 -24
  68. data/dyncall/dyncall/dyncall_callvm_arm32_thumb.h +2 -1
  69. data/dyncall/dyncall/dyncall_callvm_arm64.c +165 -0
  70. data/dyncall/dyncall/dyncall_callvm_arm64.h +51 -0
  71. data/dyncall/dyncall/dyncall_callvm_arm64_apple.c +272 -0
  72. data/dyncall/dyncall/dyncall_callvm_base.c +2 -1
  73. data/dyncall/dyncall/dyncall_callvm_mips.c +2 -1
  74. data/dyncall/dyncall/dyncall_callvm_mips.h +2 -1
  75. data/dyncall/dyncall/dyncall_callvm_mips_eabi.c +2 -1
  76. data/dyncall/dyncall/dyncall_callvm_mips_eabi.h +2 -1
  77. data/dyncall/dyncall/dyncall_callvm_mips_n32.c +2 -1
  78. data/dyncall/dyncall/dyncall_callvm_mips_n64.c +2 -1
  79. data/dyncall/dyncall/dyncall_callvm_mips_n64.h +2 -1
  80. data/dyncall/dyncall/dyncall_callvm_mips_o32.c +2 -1
  81. data/dyncall/dyncall/dyncall_callvm_mips_o32.h +2 -1
  82. data/dyncall/dyncall/dyncall_callvm_ppc32.c +45 -2
  83. data/dyncall/dyncall/dyncall_callvm_ppc32.h +2 -1
  84. data/dyncall/dyncall/dyncall_callvm_ppc64.c +351 -0
  85. data/dyncall/dyncall/dyncall_callvm_ppc64.h +60 -0
  86. data/dyncall/dyncall/dyncall_callvm_sparc.c +2 -1
  87. data/dyncall/dyncall/dyncall_callvm_sparc.h +2 -1
  88. data/dyncall/dyncall/dyncall_callvm_sparc64.c +2 -2
  89. data/dyncall/dyncall/dyncall_callvm_sparc64.h +2 -1
  90. data/dyncall/dyncall/dyncall_callvm_sparc_v9.c +3 -3
  91. data/dyncall/dyncall/dyncall_callvm_sparc_v9.h +2 -1
  92. data/dyncall/dyncall/dyncall_callvm_x64.c +2 -1
  93. data/dyncall/dyncall/dyncall_callvm_x64.h +2 -1
  94. data/dyncall/dyncall/dyncall_callvm_x86.c +2 -1
  95. data/dyncall/dyncall/dyncall_callvm_x86.h +2 -1
  96. data/dyncall/dyncall/dyncall_config.h +2 -1
  97. data/dyncall/dyncall/dyncall_macros.h +46 -9
  98. data/dyncall/dyncall/dyncall_signature.h +2 -1
  99. data/dyncall/dyncall/dyncall_struct.c +2 -1
  100. data/dyncall/dyncall/dyncall_struct.h +2 -1
  101. data/dyncall/dyncall/dyncall_types.h +2 -1
  102. data/dyncall/dyncall/dyncall_utils.h +2 -1
  103. data/dyncall/dyncall/dyncall_value.h +19 -1
  104. data/dyncall/dyncall/dyncall_vector.c +2 -1
  105. data/dyncall/dyncall/dyncall_vector.h +3 -1
  106. data/dyncall/dyncall/gen-masm.sh +0 -0
  107. data/dyncall/dyncallback/Makefile.generic +1 -1
  108. data/dyncall/dyncallback/dyncall_alloc_wx.c +2 -1
  109. data/dyncall/dyncallback/dyncall_alloc_wx.h +2 -1
  110. data/dyncall/dyncallback/dyncall_alloc_wx_malloc.c +2 -1
  111. data/dyncall/dyncallback/dyncall_alloc_wx_mmap.c +2 -1
  112. data/dyncall/dyncallback/dyncall_alloc_wx_win32.c +2 -1
  113. data/dyncall/dyncallback/dyncall_args.c +22 -10
  114. data/dyncall/dyncallback/dyncall_args.h +2 -1
  115. data/dyncall/dyncallback/dyncall_args_arm32_arm.c +35 -4
  116. data/dyncall/dyncallback/dyncall_args_arm32_arm.h +7 -1
  117. data/dyncall/dyncallback/dyncall_args_arm32_thumb.c +2 -1
  118. data/dyncall/dyncallback/dyncall_args_arm32_thumb.h +2 -1
  119. data/dyncall/dyncallback/dyncall_args_arm64.c +77 -0
  120. data/dyncall/dyncallback/dyncall_args_arm64_apple.c +160 -0
  121. data/dyncall/dyncallback/dyncall_args_mips.c +3 -2
  122. data/dyncall/dyncallback/dyncall_args_mips.h +3 -2
  123. data/dyncall/dyncallback/dyncall_args_ppc32.c +2 -1
  124. data/dyncall/dyncallback/dyncall_args_ppc32.h +9 -7
  125. data/dyncall/dyncallback/dyncall_args_ppc32_sysv.c +95 -0
  126. data/dyncall/dyncallback/dyncall_args_ppc64.c +71 -0
  127. data/dyncall/dyncallback/dyncall_args_ppc64.h +40 -0
  128. data/dyncall/dyncallback/dyncall_args_sparc32.c +2 -1
  129. data/dyncall/dyncallback/dyncall_args_sparc32.h +2 -1
  130. data/dyncall/dyncallback/dyncall_args_sparc64.c +2 -1
  131. data/dyncall/dyncallback/dyncall_args_sparc64.h +2 -1
  132. data/dyncall/dyncallback/dyncall_args_x64.c +2 -1
  133. data/dyncall/dyncallback/dyncall_args_x64.h +2 -1
  134. data/dyncall/dyncallback/dyncall_args_x86.c +2 -1
  135. data/dyncall/dyncallback/dyncall_args_x86.h +2 -1
  136. data/dyncall/dyncallback/dyncall_callback.c +7 -2
  137. data/dyncall/dyncallback/dyncall_callback.h +3 -1
  138. data/dyncall/dyncallback/dyncall_callback_arch.S +14 -6
  139. data/dyncall/dyncallback/dyncall_callback_arm32_arm.c +2 -1
  140. data/dyncall/dyncallback/dyncall_callback_arm32_arm.h +2 -1
  141. data/dyncall/dyncallback/dyncall_callback_arm32_arm_apple.s +1 -1
  142. data/dyncall/dyncallback/{dyncall_callback_arm32_arm_gas.s → dyncall_callback_arm32_arm_gas.S} +17 -7
  143. data/dyncall/dyncallback/dyncall_callback_arm32_thumb.c +2 -1
  144. data/dyncall/dyncallback/dyncall_callback_arm32_thumb.h +2 -1
  145. data/dyncall/dyncallback/{dyncall_callback_arm32_thumb_apple.s → dyncall_callback_arm32_thumb_apple.S} +2 -2
  146. data/dyncall/dyncallback/{dyncall_callback_arm32_thumb_gas.s → dyncall_callback_arm32_thumb_gas.S} +2 -2
  147. data/dyncall/dyncallback/dyncall_callback_arm64.S +111 -0
  148. data/dyncall/dyncallback/dyncall_callback_arm64.c +71 -0
  149. data/dyncall/dyncallback/dyncall_callback_mips.c +3 -2
  150. data/dyncall/dyncallback/dyncall_callback_mips.h +3 -2
  151. data/dyncall/dyncallback/dyncall_callback_ppc32.S +115 -4
  152. data/dyncall/dyncallback/dyncall_callback_ppc32.c +3 -2
  153. data/dyncall/dyncallback/dyncall_callback_ppc32.h +6 -6
  154. data/dyncall/dyncallback/dyncall_callback_ppc32_apple.s +6 -5
  155. data/dyncall/dyncallback/dyncall_callback_ppc64.S +170 -0
  156. data/dyncall/dyncallback/dyncall_callback_ppc64.c +60 -0
  157. data/dyncall/dyncallback/dyncall_callback_ppc64.h +56 -0
  158. data/dyncall/dyncallback/dyncall_callback_sparc32.c +2 -1
  159. data/dyncall/dyncallback/dyncall_callback_sparc32.h +2 -1
  160. data/dyncall/dyncallback/dyncall_callback_sparc32.s +1 -1
  161. data/dyncall/dyncallback/dyncall_callback_sparc64.c +2 -1
  162. data/dyncall/dyncallback/dyncall_callback_sparc64.s +1 -1
  163. data/dyncall/dyncallback/dyncall_callback_x64.S +5 -12
  164. data/dyncall/dyncallback/dyncall_callback_x64.c +2 -1
  165. data/dyncall/dyncallback/dyncall_callback_x64.h +2 -1
  166. data/dyncall/dyncallback/dyncall_callback_x64_masm.asm +0 -7
  167. data/dyncall/dyncallback/dyncall_callback_x86.S +5 -12
  168. data/dyncall/dyncallback/dyncall_callback_x86.c +2 -1
  169. data/dyncall/dyncallback/dyncall_callback_x86.h +2 -1
  170. data/dyncall/dyncallback/dyncall_callback_x86_masm.asm +2 -11
  171. data/dyncall/dyncallback/dyncall_thunk.c +11 -3
  172. data/dyncall/dyncallback/dyncall_thunk.h +8 -2
  173. data/dyncall/dyncallback/dyncall_thunk_arm32_arm.c +7 -7
  174. data/dyncall/dyncallback/dyncall_thunk_arm32_arm.h +2 -1
  175. data/dyncall/dyncallback/dyncall_thunk_arm32_thumb.c +2 -1
  176. data/dyncall/dyncallback/dyncall_thunk_arm32_thumb.h +2 -1
  177. data/dyncall/dyncallback/dyncall_thunk_arm64.c +64 -0
  178. data/dyncall/dyncallback/dyncall_thunk_arm64.h +42 -0
  179. data/dyncall/dyncallback/dyncall_thunk_mips.c +49 -17
  180. data/dyncall/dyncallback/dyncall_thunk_mips.h +3 -2
  181. data/dyncall/dyncallback/dyncall_thunk_ppc32.c +3 -2
  182. data/dyncall/dyncallback/dyncall_thunk_ppc32.h +7 -7
  183. data/dyncall/dyncallback/dyncall_thunk_ppc32_sysv.c +50 -0
  184. data/dyncall/dyncallback/dyncall_thunk_ppc64.c +87 -0
  185. data/dyncall/dyncallback/dyncall_thunk_ppc64.h +55 -0
  186. data/dyncall/dyncallback/dyncall_thunk_sparc32.c +2 -1
  187. data/dyncall/dyncallback/dyncall_thunk_sparc32.h +2 -1
  188. data/dyncall/dyncallback/dyncall_thunk_sparc64.c +2 -1
  189. data/dyncall/dyncallback/dyncall_thunk_sparc64.h +2 -1
  190. data/dyncall/dyncallback/dyncall_thunk_x64.c +2 -1
  191. data/dyncall/dyncallback/dyncall_thunk_x64.h +2 -1
  192. data/dyncall/dyncallback/dyncall_thunk_x86.c +2 -1
  193. data/dyncall/dyncallback/dyncall_thunk_x86.h +2 -1
  194. data/dyncall/dyncallback/dyncallback.3 +3 -3
  195. data/dyncall/dyncallback/gen-masm.sh +0 -0
  196. data/dyncall/dynload/dynload.c +2 -1
  197. data/dyncall/dynload/dynload.h +2 -1
  198. data/dyncall/dynload/dynload_alloc.h +2 -1
  199. data/dyncall/dynload/dynload_darwin.c +2 -1
  200. data/dyncall/dynload/dynload_syms.c +2 -1
  201. data/dyncall/dynload/dynload_syms_elf.c +2 -1
  202. data/dyncall/dynload/dynload_syms_mach-o.c +3 -2
  203. data/dyncall/dynload/dynload_syms_pe.c +2 -1
  204. data/dyncall/dynload/dynload_unix.c +2 -1
  205. data/dyncall/dynload/dynload_windows.c +2 -1
  206. data/dyncall/portasm/gen-masm.sh +0 -0
  207. data/dyncall/portasm/portasm-arm.S +3 -2
  208. data/dyncall/portasm/portasm-ppc.S +2 -1
  209. data/dyncall/portasm/portasm-ppc64.S +119 -0
  210. data/dyncall/portasm/portasm-x64-att.S +2 -1
  211. data/dyncall/portasm/portasm-x86.S +2 -1
  212. metadata +39 -18
  213. data/dyncall/dyncallback/dyncall_callback_x64_apple.s +0 -122
  214. data/dyncall/dyncallback/dyncall_callback_x64_gas.s +0 -119
  215. data/dyncall/dyncallback/dyncall_callback_x64_gas_w64.s +0 -102
@@ -0,0 +1,60 @@
1
+ /*
2
+
3
+ Package: dyncall
4
+ Library: dyncall
5
+ File: dyncall/dyncall_callvm_ppc64.h
6
+ Description:
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
+
26
+ #ifndef DYNCALL_CALLVM_PPC64_H
27
+ #define DYNCALL_CALLVM_PPC64_H
28
+
29
+ /*
30
+
31
+ dyncall callvm for 64bit ppc architectures
32
+
33
+ SUPPORTED CALLING CONVENTIONS
34
+ standard and ... (ellipsis) calls
35
+
36
+ REVISION
37
+ 2014/08/07 initial
38
+
39
+ */
40
+
41
+
42
+ #include "dyncall_call_ppc64.h"
43
+ #include "dyncall_callvm.h"
44
+ #include "dyncall_vector.h"
45
+
46
+ typedef struct DCCallVM_ppc64_ DCCallVM_ppc64;
47
+
48
+ struct DCCallVM_ppc64_
49
+ {
50
+ DCCallVM mInterface;
51
+ int mIntRegs;
52
+ int mFloatRegs;
53
+ struct DCRegData_ppc64_ mRegData;
54
+ DCVecHead mVecHead;
55
+ };
56
+
57
+ DCCallVM* dcNewCallVM_ppc64(DCsize size);
58
+
59
+ #endif /* DYNCALL_CALLVM_PPC64_H */
60
+
@@ -6,7 +6,7 @@
6
6
  Description: Call VM 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
@@ -23,6 +23,7 @@
23
23
  */
24
24
 
25
25
 
26
+
26
27
  #include "dyncall_callvm_sparc.h"
27
28
  #include "dyncall_call_sparc.h"
28
29
  #include "dyncall_utils.h"
@@ -6,7 +6,7 @@
6
6
  Description: Call VM 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
@@ -23,6 +23,7 @@
23
23
  */
24
24
 
25
25
 
26
+
26
27
  #ifndef DYNCALL_CALLVM_SPARC_H
27
28
  #define DYNCALL_CALLVM_SPARC_H
28
29
 
@@ -6,7 +6,7 @@
6
6
  Description: Call VM for sparc64 64-bit 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
@@ -23,9 +23,9 @@
23
23
  */
24
24
 
25
25
 
26
+
26
27
  #include "dyncall_callvm_sparc64.h"
27
28
  #include "dyncall_call_sparc64.h"
28
- #include "dyncall_utils.h"
29
29
  #include "dyncall_alloc.h"
30
30
 
31
31
  #define IREGS 6
@@ -6,7 +6,7 @@
6
6
  Description: Call VM for sparc64 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
@@ -23,6 +23,7 @@
23
23
  */
24
24
 
25
25
 
26
+
26
27
  #ifndef DYNCALL_CALLVM_SPARC_H
27
28
  #define DYNCALL_CALLVM_SPARC_H
28
29
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  Package: dyncall
4
4
  Library: dyncall
5
- File: dyncall/dyncall_callvm_v9.c
5
+ File: dyncall/dyncall_callvm_sparc_v9.c
6
6
  Description: Call VM for sparc-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
@@ -23,9 +23,9 @@
23
23
  */
24
24
 
25
25
 
26
+
26
27
  #include "dyncall_callvm_sparc_v9.h"
27
28
  #include "dyncall_call_sparc_v9.h"
28
- #include "dyncall_utils.h"
29
29
  #include "dyncall_alloc.h"
30
30
 
31
31
  /* Reset argument buffer. */
@@ -6,7 +6,7 @@
6
6
  Description: Call VM for sparc-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
@@ -23,6 +23,7 @@
23
23
  */
24
24
 
25
25
 
26
+
26
27
  #ifndef DYNCALL_CALLVM_SPARC_V9_H
27
28
  #define DYNCALL_CALLVM_SPARC_V9_H
28
29
 
@@ -6,7 +6,7 @@
6
6
  Description:
7
7
  License:
8
8
 
9
- Copyright (c) 2007-2011 Daniel Adler <dadler@uni-goettingen.de>,
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
@@ -25,6 +25,7 @@
25
25
 
26
26
 
27
27
 
28
+
28
29
  /* MS Windows x64 calling convention, AMD64 SystemV ABI. */
29
30
 
30
31
 
@@ -6,7 +6,7 @@
6
6
  Description:
7
7
  License:
8
8
 
9
- Copyright (c) 2007-2011 Daniel Adler <dadler@uni-goettingen.de>,
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 callvm for x64 architecture
@@ -6,7 +6,7 @@
6
6
  Description: Call VM for x86 architecture implementation
7
7
  License:
8
8
 
9
- Copyright (c) 2007-2011 Daniel Adler <dadler@uni-goettingen.de>,
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_callvm_x86.h"
28
29
  #include "dyncall_alloc.h"
29
30
 
@@ -6,7 +6,7 @@
6
6
  Description: Call virtual machine for x86 architecture header
7
7
  License:
8
8
 
9
- Copyright (c) 2007-2011 Daniel Adler <dadler@uni-goettingen.de>,
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_X86_H
28
29
  #define DYNCALL_CALLVM_X86_H
29
30
 
@@ -6,7 +6,7 @@
6
6
  Description: Macro configuration file for non-standard C types
7
7
  License:
8
8
 
9
- Copyright (c) 2007-2011 Daniel Adler <dadler@uni-goettingen.de>,
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 type configuration
@@ -6,7 +6,7 @@
6
6
  Description: Platform detection macros
7
7
  License:
8
8
 
9
- Copyright (c) 2007-2011 Daniel Adler <dadler@uni-goettingen.de>,
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 macros
@@ -168,22 +169,26 @@
168
169
  /* Architecture. */
169
170
 
170
171
  /* Check architecture. */
171
- #if defined(_M_IX86) || defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || defined(__386__) || defined(__i386)
172
- # define DC__Arch_Intel_x86
173
- #elif defined(_M_X64_) || defined(_M_AMD64) || defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64)
172
+ #if defined(_M_X64_) || defined(_M_AMD64) || defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64)
174
173
  # define DC__Arch_AMD64
174
+ #elif defined(_M_IX86) || defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || defined(__386__) || defined(__i386)
175
+ # define DC__Arch_Intel_x86
175
176
  #elif defined(_M_IA64) || defined(__ia64__)
176
177
  # define DC__Arch_Itanium
177
178
  #elif defined(_M_PPC) || defined(__powerpc__) || defined(__powerpc) || defined(__POWERPC__) || defined(__ppc__) || defined(__power__)
178
- # define DC__Arch_PowerPC
179
- #elif defined(__ppc64__) || defined(_ARCH_PPC64) || defined(__power64__)
180
- # define DC__Arch_PPC64
179
+ # if defined(__ppc64__) || defined(_ARCH_PPC64) || defined(__power64__) || defined(__powerpc64__)
180
+ # define DC__Arch_PPC64
181
+ # else
182
+ # define DC__Arch_PPC32
183
+ # endif
181
184
  #elif defined(__mips64__) || defined(__mips64)
182
185
  # define DC__Arch_MIPS64
183
186
  #elif defined(_M_MRX000) || defined(__mips__) || defined(__mips) || defined(_mips)
184
187
  # define DC__Arch_MIPS
185
- #elif defined(__arm__)
188
+ #elif defined(__arm__)
186
189
  # define DC__Arch_ARM
190
+ #elif defined(__aarch64__)
191
+ # define DC__Arch_ARM64
187
192
  #elif defined(__sh__)
188
193
  # define DC__Arch_SuperH
189
194
  #elif defined(__sparcv9) || defined(__sparc64__) || ( defined(__sparc) && defined(__arch64__) )
@@ -209,7 +214,7 @@
209
214
 
210
215
 
211
216
 
212
- /* Misc machine-dependent quirks. */
217
+ /* Misc machine-dependent modes, ABIs, etc.. */
213
218
 
214
219
  #if defined(__arm__) && !defined(__thumb__)
215
220
  # define DC__Arch_ARM_ARM
@@ -241,6 +246,38 @@
241
246
  # endif
242
247
  #endif /* MIPS */
243
248
 
249
+ #if defined(DC__Arch_PPC64)
250
+ # if defined(_CALL_ELF)
251
+ # define DC__ABI_PPC64_ELF_V _CALL_ELF
252
+ # else
253
+ # define DC__ABI_PPC64_ELF_V 0 /* 0 means not explicitly set, otherwise this is 1 (big endian) and 2 (little endian) */
254
+ # endif
255
+ #endif /* MIPS */
256
+
257
+
258
+ /* Endian detection. */
259
+ #if defined(DC__Arch_Intel_x86) || defined(DC__Arch_AMD64) /* always little */
260
+ # define DC__Endian_LITTLE
261
+ #elif defined(DC__Arch_Sparc) /*always big until v9*/
262
+ # define DC__Endian_BIG
263
+ #else /* all others are bi-endian */
264
+ /* @@@check flags used on following bi-endianness archs:
265
+ DC__Arch_ARM
266
+ DC__Arch_ARM64
267
+ DC__Arch_Itanium
268
+ DC__Arch_MIPS
269
+ DC__Arch_MIPS64
270
+ DC__Arch_PPC32
271
+ DC__Arch_PPC64
272
+ DC__Arch_Sparcv9
273
+ DC__Arch_SuperH
274
+ */
275
+ # if (defined(DC__Arch_PPC64) && (DC__ABI_PPC64_ELF_V == 1)) || defined(_BIG_ENDIAN) || defined(MIPSEB)
276
+ # define DC__Endian_BIG
277
+ # elif (defined(DC__Arch_PPC64) && (DC__ABI_PPC64_ELF_V == 2)) || defined(_LITTLE_ENDIAN) || defined(MIPSEL)
278
+ # define DC__Endian_LITTLE
279
+ # endif /* no else, leave unset if not sure */
280
+ #endif
244
281
 
245
282
 
246
283
  /* Internal macro/tag. */
@@ -6,7 +6,7 @@
6
6
  Description: Type and calling-convention signature character defines
7
7
  License:
8
8
 
9
- Copyright (c) 2007-2011 Daniel Adler <dadler@uni-goettingen.de>,
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 signature characters
@@ -6,7 +6,7 @@
6
6
  Description: C interface to compute struct size
7
7
  License:
8
8
 
9
- Copyright (c) 2010-2011 Olivier Chafik <olivier.chafik@centraliens.net>
9
+ Copyright (c) 2010-2015 Olivier Chafik <olivier.chafik@centraliens.net>
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
  #include "dyncall.h"
27
28
  #include "dyncall_signature.h"
28
29
  #include "dyncall_struct.h"
@@ -6,7 +6,7 @@
6
6
  Description: C interface to compute struct size
7
7
  License:
8
8
 
9
- Copyright (c) 2010-2011 Olivier Chafik <olivier.chafik@centraliens.net>
9
+ Copyright (c) 2010-2015 Olivier Chafik <olivier.chafik@centraliens.net>
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
  /*
27
28
 
28
29
  dyncall struct metadata structures
@@ -6,7 +6,7 @@
6
6
  Description: Typedefs
7
7
  License:
8
8
 
9
- Copyright (c) 2007-2011 Daniel Adler <dadler@uni-goettingen.de>,
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 argument- and return-types
@@ -6,7 +6,7 @@
6
6
  Description: Type and calling-convention signature character defines
7
7
  License:
8
8
 
9
- Copyright (c) 2007-2011 Daniel Adler <dadler@uni-goettingen.de>,
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
@@ -25,6 +25,7 @@
25
25
 
26
26
 
27
27
 
28
+
28
29
  #ifndef DYNCALL_UTILS_H
29
30
  #define DYNCALL_UTILS_H
30
31
 
@@ -6,7 +6,7 @@
6
6
  Description: Value variant type
7
7
  License:
8
8
 
9
- Copyright (c) 2007-2011 Daniel Adler <dadler@uni-goettingen.de>,
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
@@ -48,6 +48,23 @@ typedef union DCValue_ DCValue;
48
48
 
49
49
  union DCValue_
50
50
  {
51
+ #if defined (DC__Arch_PPC32) && defined(DC__Endian_BIG)
52
+ DCbool B;
53
+ struct { DCchar c_pad[3]; DCchar c; };
54
+ struct { DCuchar C_pad[3]; DCuchar C; };
55
+ struct { DCshort s_pad; DCshort s; };
56
+ struct { DCshort S_pad; DCshort S; };
57
+ DCint i;
58
+ DCuint I;
59
+ #elif defined (DC__Arch_PPC64) && defined(DC__Endian_BIG)
60
+ struct { DCbool B_pad; DCbool B; };
61
+ struct { DCchar c_pad[7]; DCchar c; };
62
+ struct { DCuchar C_pad[7]; DCuchar C; };
63
+ struct { DCshort s_pad[3]; DCshort s; };
64
+ struct { DCshort S_pad[3]; DCshort S; };
65
+ struct { DCint i_pad; DCint i; };
66
+ struct { DCint I_pad; DCuint I; };
67
+ #else
51
68
  DCbool B;
52
69
  DCchar c;
53
70
  DCuchar C;
@@ -55,6 +72,7 @@ union DCValue_
55
72
  DCushort S;
56
73
  DCint i;
57
74
  DCuint I;
75
+ #endif
58
76
  DClong j;
59
77
  DCulong J;
60
78
  DClonglong l;