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,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 76ba7a97e6c88e40f86e1a59a4c6023222ed83db
4
+ data.tar.gz: c24246dc7d908499db4760aac24cb40f3213acc5
5
+ SHA512:
6
+ metadata.gz: 4c2d628c9aed7e969046206fc969b51082daad477b32191d04b0a95295428cdbc447e727788c3cc4384f7b81f0d928cab225225f3af7da5650f8e9de35478da3
7
+ data.tar.gz: 8fefae5a9f123004aa604322676b9800c6af14cc4b73b16c41c74820c9304605d7812314b2083fc1bf8d7e84f8e524357195985b0623bd6c414626b784c79530
@@ -1,7 +1,7 @@
1
1
  #//////////////////////////////////////////////////////////////////////
2
2
  #
3
3
  # extconf.rb
4
- # Copyright (c) 2007-2014 Daniel Adler <dadler@uni-goettingen.de>,
4
+ # Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>,
5
5
  # Tassilo Philipp <tphilipp@potion-studios.com>
6
6
  #
7
7
  # Permission to use, copy, modify, and distribute this software for any
@@ -1,7 +1,7 @@
1
1
  /*
2
2
 
3
3
  rbdc.c
4
- Copyright (c) 2007-2014 Daniel Adler <dadler@uni-goettingen.de>,
4
+ Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>,
5
5
  Tassilo Philipp <tphilipp@potion-studios.com>
6
6
 
7
7
  Permission to use, copy, modify, and distribute this software for any
@@ -211,6 +211,8 @@ static VALUE ExtLib_Call(int argc, VALUE* argv, VALUE self)
211
211
  for(i=2; i<argc; ++i) {
212
212
  t = TYPE(argv[i]);
213
213
 
214
+ //@@@ add support for calling convention mode(s)
215
+
214
216
  switch(sig[i-2]) {
215
217
  case DC_SIGCHAR_BOOL:
216
218
  b = 1;
@@ -1,4 +1,6 @@
1
1
  Daniel Adler <dadler@uni-goettingen.de>
2
2
  Tassilo Philipp <tphilipp@potion-studios.com>
3
3
  Olivier Chafik <olivier.chafik@gmail.com>
4
+ Erik Mackdanz <erikmack@gmail.com>
5
+ Masanori Mitsugi <mitsugi@linux.vnet.ibm.com>
4
6
 
@@ -1,3 +1,4 @@
1
1
  - add support for SELinux; object files need to be tagged with section '.section .note.GNU-stack,"",%progbits'
2
2
  - dyncall sparc v7/v8: -xO3 on SunPro segfaults in tests.
3
3
  - dyncall sparc64 port: works fine on Debian 6, but has issues on OpenBSD and Solaris regarding passing of float and double values.
4
+ - this BUGS file should be merged with ToDo or vice-versa
@@ -46,7 +46,7 @@ if(MSVC)
46
46
  #set(CMAKE_ASM_COMPILER_ARG1 "/c")
47
47
  #set(CMAKE_ASM_MASM_SOURCE_FILE_EXTENSIONS asm)
48
48
  #set(CMAKE_ASM_MASM_COMPILE_OBJECT "<CMAKE_ASM_MASM_COMPILER> <FLAGS> /c /Fo <OBJECT> <SOURCE>")
49
- elseif(CMAKE_COMPILER_IS_GNUCC)
49
+ elseif(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
50
50
  # when used in shared libraries, -fPIC is required by several architectures
51
51
  # and platforms (observed on AMD64, Solaris/Sparc).
52
52
  # we enable it per default here.
@@ -55,13 +55,21 @@ elseif(CMAKE_COMPILER_IS_GNUCC)
55
55
  set(CMAKE_ASM_COMPILER "${CMAKE_C_COMPILER}")
56
56
  set(CMAKE_ASM_COMPILER_ARG1 "${CPPFLAGS} -c")
57
57
  enable_language(ASM)
58
+ elseif(CMAKE_COMPILER_IS_CLANG)
58
59
  elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "SunPro")
59
60
  set(CMAKE_ASM_COMPILER "${CMAKE_C_COMPILER}")
60
61
  set(CMAKE_ASM_COMPILER_ARG1 "${CPPFLAGS} -c")
61
62
  enable_language(ASM)
63
+ else()
64
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
65
+ add_definitions("-fPIC")
66
+ # enable gcc as front-end to assembler for .S files
67
+ set(CMAKE_ASM_COMPILER "${CMAKE_C_COMPILER}")
68
+ set(CMAKE_ASM_COMPILER_ARG1 "${CPPFLAGS} -c")
69
+ enable_language(ASM)
70
+ endif()
62
71
  endif()
63
72
 
64
-
65
73
  add_subdirectory(dynload)
66
74
  add_subdirectory(dyncall)
67
75
  add_subdirectory(dyncallback)
@@ -1,9 +1,44 @@
1
- This file lists big/noteworthy changes, only...
1
+ This file lists bigger/noteworthy changes, only...
2
2
 
3
- Version 0.9 (upcoming)
4
- ...
3
+ Version 1.0 (upcoming)
4
+ o ...
5
5
 
6
- Version 0.8
6
+ Version 0.9 (2015/12/31)
7
+ dyncall:
8
+ o ARM64 support (AAPCS64 on Linux & Apple's derived version on iOS)
9
+ o armhf calling convention support for ARM32
10
+ o PPC64 support, including syscalls (thanks Masanori!)
11
+ o introduced dcArgF and dcVArgF for flexible/convenient argument binding (works like dcCallF/dcVCallF but without the function call)
12
+ o using -fPIC by default for FreeBSD
13
+ o PPC32 linux syscall support
14
+ o fixed return value errors for arm32 on some platforms (e.g. freebsd/arm32, nintendo ds); arm & thumb mode
15
+ dyncallback:
16
+ o ARM64 support (AAPCS64 on Linux, Apple's derived version on iOS)
17
+ o armhf calling convention support for ARM32
18
+ o PPC64 support (thanks Masanori!)
19
+ o PPC32 System V support (Linux)
20
+ o fix for PPC32 Darwin/OS X
21
+ o more intuitive specification of callback return type
22
+ doc:
23
+ o added ARM64 support info and calling convention documentation
24
+ o added ARM32 armhf section
25
+ o added PPC64 support info
26
+ o cleanup, brought all up to date, etc.
27
+ tests:
28
+ o callf test covers new argf interface
29
+ o several fixes to some test suites
30
+ buildsys:
31
+ o more flexible testsuite build and 'pack' target for convenience
32
+ o fixes/additions for OS X universal builds
33
+ o added iOS universal build support for armv7/arm64
34
+ o helper script for generic .elf -> EBOOT.PBP creation for PSP
35
+ o Sun make fixes for C++ code in test suite
36
+ bindings:
37
+ o erldc: Erlang binding (thanks Erik!)
38
+ infrastructure:
39
+ o moved to hg
40
+
41
+ Version 0.8 (2014/03/24)
7
42
  buildsys:
8
43
  o big simplification make-based build system, no more distinct GNU and BSD makefiles anymore
9
44
  o new, much simpler ./configure for new make-based build-system
@@ -33,7 +68,7 @@ bindings:
33
68
  o rbdc: fixed and extended ruby bindings
34
69
  o shdc: renamed shell binding to shdc and added feature to list shared-objects' symbols
35
70
 
36
- Version 0.7
71
+ Version 0.7 (2012/01/02)
37
72
  architecture:
38
73
  o added subproject: portasm - portable (GNU AS,+Apple and MASM) assembly framework
39
74
  o added subproject: autovar - predefined macro framework (was dyncall_macros.h)
@@ -101,7 +136,7 @@ tests:
101
136
  o improved dir name portability (renamed plain_c++ -> plain_cxx)
102
137
  o renamed *.cpp -> *.cc files (OpenBSD/Sun make has no implicit rules for cpp)
103
138
 
104
- Version 0.6
139
+ Version 0.6 (2010/09/25)
105
140
  building:
106
141
  o new build systems: CMake and Plan9's mk
107
142
  o buildsys/gmake tool chain update: pcc and iphone sdk
@@ -123,7 +158,7 @@ tests:
123
158
  o plain: split "plain" test up in C and C++ part
124
159
  o callbacksuite: added multiple configuration support for callback_suite
125
160
 
126
- Version 0.5
161
+ Version 0.5 (2010/02/01)
127
162
  o renamed arm9 stuff to arm32
128
163
  o added non-EABI ABI for arm32 (before, EABI was the default implementation)
129
164
  o added dyncallback support for x64/windows (thanks Olivier), x64/darwin, arm32/arm, arm32/thumb
@@ -134,7 +169,7 @@ Version 0.5
134
169
  o added new tests callback_plain and calback_suite
135
170
  o added Haiku/BeOS support
136
171
 
137
- Version 0.4
172
+ Version 0.4 (2009/07/06)
138
173
  o added 'doc' makefile target for coherency and ease of use
139
174
  o fixed nmake buildfiles and configure.bat (were out of date and wrong)
140
175
  o test suite clean up (GNUmake, BSDmake):
@@ -151,19 +186,19 @@ Version 0.4
151
186
  o added: test cases for alloc_wx, thunk
152
187
  o updated Documentation
153
188
 
154
- Version 0.3
189
+ Version 0.3 (2009/01/17)
155
190
  o added Linux PPC32 support
156
191
  o added ARM THUMB mode support
157
192
  o cosmetic changes, documentation updated
158
193
  o bugfix: on cygwin exported C symbols in GNU as are prefixed with '_' now.
159
194
  o removed scons build support
160
195
 
161
- Version 0.2
196
+ Version 0.2 (2008/05/18)
162
197
  o added scons build support
163
198
  o configure variables all prefix CONFIG_* now
164
199
  o configure variable INSTALL_DIR changed to INSTALL_PREFIX
165
200
  o configure (shell version) option "--prefix" changed to "--prefix=<path>"
166
201
 
167
- Version 0.1:
202
+ Version 0.1 (2008/01/23)
168
203
  o initial release
169
204
 
@@ -1,4 +1,7 @@
1
- Copyright (c) 2007-2014 Daniel Adler <dadler@uni-goettingen.de>,
1
+ If not stated otherwise inside a file, all files here are distributed in
2
+ terms of:
3
+
4
+ Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>,
2
5
  Tassilo Philipp <tphilipp@potion-studios.com>
3
6
 
4
7
  Permission to use, copy, modify, and distribute this software for any
@@ -62,10 +62,14 @@ ios-os:
62
62
  IOS_PLATFORM="OS" ${MAKE_CMD} ios
63
63
  # NOTE iOS 6.1 does not support armv6 (has no libs)
64
64
  ios61-os:
65
- IOS_SDK="6.1" IOS_ARCH="-arch armv7" ${MAKE_CMD} ios-os
65
+ IOS_SDK="6.1" IOS_ARCH="-arch armv7" ${MAKE_CMD} ios-os
66
66
  ios61-os-no-thumb:
67
- IOS_SDK="6.1" IOS_ARCH="-arch armv7 -mno-thumb" ${MAKE_CMD} ios-os
67
+ IOS_SDK="6.1" IOS_ARCH="-arch armv7 -mno-thumb" ${MAKE_CMD} ios-os
68
68
  ios61-sim:
69
- IOS_SDK="6.1" IOS_ARCH="-arch i386" ${MAKE_CMD} ios-sim
69
+ IOS_SDK="6.1" IOS_ARCH="-arch i386" ${MAKE_CMD} ios-sim
70
+ ios83-os-universal:
71
+ IOS_SDK="8.3" IOS_ARCH="-arch armv7 -arch arm64" ${MAKE_CMD} ios-os
72
+ ios83-sim:
73
+ IOS_SDK="8.3" IOS_ARCH="-arch i386" ${MAKE_CMD} ios-sim
70
74
 
71
75
  .PHONY: all tests clean install bsd linux linux64 minix-gcc mingw32 osx osx-universal sun sun-64bit sun-gcc sun-gcc-64bit
@@ -10,17 +10,20 @@ It comprises three independent components, available as C libraries, namely:
10
10
  - 'dynload' for loading code.
11
11
 
12
12
  The package provides abstractions to the Application Binary Interface
13
- of various hardware platforms such as IA32, AMD64, ARM, PowerPC, MIPS
14
- and SPARC.
13
+ of various hardware platforms such as x86, AMD64, ARM32/64, PowerPC32/64,
14
+ MIPS32/64 and SPARC32/64.
15
15
 
16
- Our releases are deeply tested using a flexible test suite.
16
+ Our releases are thoroughly tested across all supported platforms using a
17
+ flexible test suite.
17
18
 
18
19
  A typical application for the use of dyncall is the back-end of a FFI
19
20
  (foreign function interface) for scripting languages to connect with
20
21
  the C/C++ world.
21
22
 
22
- The binary footprint of the package is approx. 20 kb.
23
- A test suite and comprehensive documentation is available.
23
+ The binary footprint of the package is approx. 10-20 kb, depending on
24
+ the platform.
25
+ Besides the test suite already mentioned, comprehensive documentation is
26
+ available.
24
27
 
25
28
 
26
29
  Building the libraries
@@ -35,14 +38,14 @@ Prequisites:
35
38
  Supported Architectures and ABIs:
36
39
  ---------------------------------
37
40
 
38
- - x86 32/64-bit (cdecl, fastcall, stdcall, C++ this calls, Syscalls)
39
- - ARM AArch32 (ARM/Thumb mode, v4t-v7, oabi/eabi, soft/hardfloat ABIs)
40
- - MIPS 32/64-bit (o32, n64, eabi)
41
- - PowerPC 32-bit (Mac OS X, System V)
42
- - Sparc 32/64-bit (v7/8 and v9)
41
+ - x86 32/64-bit (cdecl, fastcall, stdcall, C++ this calls, syscalls, plan9)
42
+ - ARM AArch32/64 (32: ARM/Thumb mode, v4t-v7, oabi/eabi, soft/hardfloat ABIs; 64: AAPCS64)
43
+ - MIPS 32/64-bit (o32, n64, eabi)
44
+ - PowerPC 32/64-bit (32: Mac OS X, System V; 64: System V little and big endian ELF ABI)
45
+ - Sparc 32/64-bit (v7/8 and v9)
43
46
 
44
- NOTE: Callback support is currently available on
45
- x86-32/64, arm32 softfloat ABIs and ppc32 OS X ABI.
47
+ NOTE: Callback support is currently available on
48
+ x86-32/64, arm32 softfloat ABIs, arm64, PPC64 and PPC32 Linux/OS X.
46
49
 
47
50
  Supported Operating Systems:
48
51
  ----------------------------
@@ -100,6 +103,12 @@ Building on Windows
100
103
  See doc/README.Windows
101
104
 
102
105
 
106
+ Platform-specific build details
107
+ -------------------------------
108
+
109
+ See doc/README.*
110
+
111
+
103
112
  Building the manual
104
113
  -------------------
105
114
 
@@ -108,6 +117,6 @@ Make sure pdflatex is installed and run
108
117
  $ make docs
109
118
 
110
119
 
111
- Please refer to http://www.dyncall.org, dyncall(3), the dyncall manual and
112
- platform-specific READMEs under doc/ for more information.
120
+ Please refer to http://www.dyncall.org, dyncall(3), dyncallback(3), the dyncall
121
+ manual and platform-specific READMEs under doc/ for more information.
113
122
 
@@ -1,23 +1,24 @@
1
- 0.9:
1
+ 1.0:
2
2
  ----
3
+ - autovar was never really pushed all the way through and still plays second
4
+ fiddle to dyncall_macros.h, clean this all up, eventually (Tassilo: for now, I
5
+ removed out of sync files to avoid confusion; but still probably duped code)
6
+ - ppc32 callback fixes on bsd
3
7
  - make install should install manpages
4
8
  - mailing list announcements (html email?)
5
- - Website:
6
- * platform matrix (wie im Handbuch oder Daniels Disse)
7
9
  - fix for NDS:
8
10
  * ARM:
9
11
  - callback_plain retval wrong (not only platform)
10
12
  * THUMB:
11
13
  - ellipsis (might be test itself, not respecting fixed part of args)
12
- - retvals of call_suite (maybe all retvals, in general)
13
14
  - callback_plain retval
14
15
  - callf
15
-
16
-
17
- build-system:
18
- -------------
19
- - cmake mac os x universal binary builds with *.S does not build
20
- multiple architectures
16
+ - fix Minix/x86 callbacks (see callback_suite)
17
+ - armhf ellipsis: fix weirdness with long long as first ... arg
18
+ - add portable "make install"
19
+ - support Solaris11 CFLAGS with -D_FILE_OFFSET_BITS=64
20
+ - make sure selinux works (esp. regarding NX bits, asm might need (or similar): .section .note.GNU-stack,"",@progbits)
21
+ Daniel has a patch for it, if needed, implementing allocwx with two memory blocks, one for w^x, mmaped to one for r|x
21
22
 
22
23
  portasm:
23
24
  --------
@@ -25,16 +26,16 @@ portasm:
25
26
 
26
27
  dyncall:
27
28
  --------
28
- - port ppc64
29
29
  - support for return values: aggregate return values
30
30
  - support for argument values: structures, half-precision, vector types, long double
31
31
  - varargs for mips (might exist, but test all ABIs)
32
32
  - consider automatic type-promotion for arguments passed through DC_CALL_C_ELLIPSIS_VARARGS;
33
33
  this would make it easier to just pass arguments instead of having to know about the C
34
34
  type promotions
35
- - add dcArgF, so CallF without the call; this would allow to use sig for building stack, only
36
- and is more flexible; bindings would benefit if statically typed as it decouples call from
37
- convenient stack building
35
+ - syscalls for x64
36
+ * bsd
37
+ * linux
38
+ - other syscalls
38
39
 
39
40
  dynload:
40
41
  --------
@@ -49,8 +50,8 @@ dynload:
49
50
  dyncallback:
50
51
  ------------
51
52
  - callback_plain's return value not correct anymore on NDS (maybe just broken testcode?)
52
- - add MIPS callbacks (thunks seem to be working, but maybe buggy)
53
- - finish PPC32 callbacks (see bugs section, below)
53
+ - add MIPS callbacks for eabi, n32, o32 (thunks are working)
54
+ - finish PPC32 callbacks (see bugs section, below, BSD not working)
54
55
 
55
56
  bindings:
56
57
  ---------
@@ -60,12 +61,13 @@ bindings:
60
61
  - bring python up to latest
61
62
  - add pydoc for python
62
63
  - add manpage for shdc
63
- - add argf functionality to go (maybe introduce argf to dyncall, first)
64
+ - expose callf-convenience functions to go
64
65
  - add godoc for godc
65
66
  - bring java up to latest
66
67
  - add javadoc to java
67
68
  - add more bindings
68
- - add callback support for go, java, lua, python and ruby (and shell? how?)
69
+ - add callback support for erlang, go, java, lua, python and ruby (and shell? how?)
70
+ - add call-conv-mode-support for rbdc through signature
69
71
 
70
72
  manual:
71
73
  -------
@@ -83,12 +85,11 @@ urgent issues:
83
85
  - Solaris/gmake build doesn't build dynload and tests anymore (maybe not even dyncallback)
84
86
  - test arm32/ATPCS/THUMB (and then change Status in doc Appendix)
85
87
  - look over code and fix TODO or @@@ marks
86
- - add pcc-support to doc
88
+ - add ppc-support to doc (both, 32 and 64, as well as little and big endian remarks)
87
89
 
88
90
  nice to have:
89
91
  -------------
90
92
  - update: microsoft visual c++ build files - integrate all test suites in solution file
91
- - maybe rename DC__Arch_PowerPC to ...PPC32 for coherency reasons (...PPC64)?
92
93
  - consistency: on x64 platforms: make both ABIs available ('win64','sysv') for all x64 OS ports
93
94
  - microsoft build enhancement: autodetect assembly via C preprocessor (like with .S gcc files)
94
95
  - test/thunk: some platforms do not allow for allocation of executable code on heap and stack --
@@ -96,19 +97,23 @@ nice to have:
96
97
 
97
98
  bugs:
98
99
  -----
99
- - callbacks on ppc32 only work on apple (osx abi)
100
+ - callconv set specifically for platform that has only one (default) excepts for some
101
+ platforms, eg. setting X64_sysv on amd64/Linux - keeping cdecl which is the same in
102
+ this case, works
103
+ - callbacks on ppc32 only work on linux and apple (osx abi), but not BSD
100
104
  - vararg function calls don't work for ARM THUMB mode (Daniel's new interface for modesetting for varag
101
105
  args should be used); adapt test/ellipsis and/or retest
102
106
 
103
107
  missing implementations (descending priority):
104
108
  ----------------------------------------------
105
- - ppc64
109
+ - riscv
106
110
  - itanium
107
111
  - 68k, 88k, 6502, etc.
108
112
  - alpha
109
113
  - superh
110
114
  - cell
111
115
  - blackfin
116
+ - s/390
112
117
  - z80
113
118
  - hppa
114
119
  - vax
@@ -118,9 +123,3 @@ missing implementations (descending priority):
118
123
  - arc
119
124
  - seaforth
120
125
 
121
- available hardware for outstanding ports:
122
- -----------------------------------------
123
- - 68k: Tassilo's old Palm m100 (MC68EZ328 (16MHz))
124
- - sh4: Tassilo's Dreamcast
125
- - sigmatel stmp3550b: Daniel's iPod Nano
126
-
@@ -6,8 +6,8 @@
6
6
  Description:
7
7
  License:
8
8
 
9
- Copyright (c) 2011 Daniel Adler <dadler@uni-goettingen.de>,
10
- Tassilo Philipp <tphilipp@potion-studios.com>
9
+ Copyright (c) 2011-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
@@ -22,6 +22,7 @@
22
22
  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23
23
 
24
24
  */
25
+
25
26
  #ifndef AUTOVAR_ABI_H
26
27
  #define AUTOVAR_ABI_H
27
28
 
@@ -6,8 +6,8 @@
6
6
  Description:
7
7
  License:
8
8
 
9
- Copyright (c) 2011 Daniel Adler <dadler@uni-goettingen.de>,
10
- Tassilo Philipp <tphilipp@potion-studios.com>
9
+ Copyright (c) 2011-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
@@ -22,23 +22,26 @@
22
22
  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23
23
 
24
24
  */
25
+
25
26
  #ifndef AUTOVAR_ARCH_H
26
27
  #define AUTOVAR_ARCH_H
27
28
 
28
29
  /* Check architecture. */
29
- #if defined(_M_IX86) || defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || defined(__386__) || defined(__i386)
30
- # define ARCH_X86
31
- #elif defined(_M_X64_) || defined(_M_AMD64) || defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64)
30
+ #if defined(_M_X64_) || defined(_M_AMD64) || defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64)
32
31
  # define ARCH_X64
32
+ #elif defined(_M_IX86) || defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || defined(__386__) || defined(__i386)
33
+ # define ARCH_X86
33
34
  #elif defined(_M_IA64) || defined(__ia64__)
34
35
  # define ARCH_IA64
35
36
  #elif defined(_M_PPC) || defined(__powerpc__) || defined(__powerpc) || defined(__POWERPC__) || defined(__ppc__) || defined(__power__)
36
- # define ARCH_PPC
37
- #elif defined(__ppc64__) || defined(_ARCH_PPC64) || defined(__power64__)
38
- # define ARCH_PPC64
37
+ # if defined(__ppc64__) || defined(_ARCH_PPC64) || defined(__power64__) || defined(__powerpc64__)
38
+ # define ARCH_PPC64
39
+ # else
40
+ # define ARCH_PPC
41
+ # endif
39
42
  #elif defined(__mips64__) || defined(__mips64)
40
43
  # define ARCH_MIPS64
41
- #elif defined(_M_MRX000) || defined(__mips__)
44
+ #elif defined(_M_MRX000) || defined(__mips__) || defined(__mips) || defined(_mips)
42
45
  # define ARCH_MIPS
43
46
  #elif defined(__arm__)
44
47
  # define ARCH_ARM
@@ -47,7 +50,7 @@
47
50
  # endif
48
51
  #elif defined(__sh__)
49
52
  # define ARCH_SH
50
- #elif defined(__sparcv9) || ( defined(__sparc) && defined(__arch64__) )
53
+ #elif defined(__sparcv9) || defined(__sparc64__) || ( defined(__sparc) && defined(__arch64__) )
51
54
  # define ARCH_SPARC64
52
55
  #elif defined(__sparc)
53
56
  # define ARCH_SPARC