Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rebase post GCC merge

  • Loading branch information...
commit 84d3253f86dad6b4f261231935675d35fd964b05 1 parent 964c5b9
@atgreen authored
Showing with 0 additions and 219,987 deletions.
  1. 0  .pc/aix-ibm-xlc/.timestamp
  2. +0 −4,556 .pc/aix-ibm-xlc/ChangeLog
  3. +0 −16,028 .pc/aix-ibm-xlc/configure
  4. +0 −479 .pc/aix-ibm-xlc/configure.ac
  5. +0 −404 .pc/aix-ibm-xlc/include/ffi.h.in
  6. +0 −324 .pc/aix-ibm-xlc/src/powerpc/aix.S
  7. +0 −443 .pc/aix-ibm-xlc/src/powerpc/aix_closure.S
  8. 0  .pc/alpha/.timestamp
  9. +0 −4,749 .pc/alpha/ChangeLog
  10. +0 −284 .pc/alpha/src/alpha/ffi.c
  11. 0  .pc/amiga/.timestamp
  12. +0 −4,744 .pc/amiga/ChangeLog
  13. +0 −345 .pc/amiga/README
  14. +0 −16,062 .pc/amiga/configure
  15. +0 −499 .pc/amiga/configure.ac
  16. +0 −46 .pc/applied-patches
  17. 0  .pc/autoconf-archive-update/.timestamp
  18. +0 −1,836 .pc/autoconf-archive-update/Makefile.in
  19. +0 −1,866 .pc/autoconf-archive-update/aclocal.m4
  20. +0 −16,065 .pc/autoconf-archive-update/configure
  21. +0 −176 .pc/autoconf-archive-update/m4/ax_cc_maxopt.m4
  22. +0 −195 .pc/autoconf-archive-update/m4/ax_cflags_warn_all.m4
  23. +0 −63 .pc/autoconf-archive-update/m4/ax_compiler_vendor.m4
  24. +0 −300 .pc/autoconf-archive-update/m4/ax_enable_builddir.m4
  25. +0 −215 .pc/autoconf-archive-update/m4/ax_gcc_archflag.m4
  26. 0  .pc/bad-abi-fix/.timestamp
  27. +0 −4,641 .pc/bad-abi-fix/ChangeLog
  28. +0 −122 .pc/bad-abi-fix/include/ffi_common.h
  29. +0 −726 .pc/bad-abi-fix/src/arm/ffi.c
  30. +0 −421 .pc/bad-abi-fix/src/avr32/ffi.c
  31. +0 −584 .pc/bad-abi-fix/src/ia64/ffi.c
  32. +0 −1,029 .pc/bad-abi-fix/src/mips/ffi.c
  33. +0 −716 .pc/bad-abi-fix/src/pa/ffi.c
  34. +0 −1,442 .pc/bad-abi-fix/src/powerpc/ffi.c
  35. +0 −188 .pc/bad-abi-fix/src/prep_cif.c
  36. +0 −640 .pc/bad-abi-fix/src/x86/ffi64.c
  37. 0  .pc/copyright-updates/.timestamp
  38. +0 −21 .pc/copyright-updates/LICENSE
  39. 0  .pc/darwin-EH-fix/.timestamp
  40. +0 −4,668 .pc/darwin-EH-fix/ChangeLog
  41. +0 −383 .pc/darwin-EH-fix/src/powerpc/darwin.S
  42. +0 −576 .pc/darwin-EH-fix/src/powerpc/darwin_closure.S
  43. 0  .pc/darwin11/.timestamp
  44. +0 −4,678 .pc/darwin11/ChangeLog
  45. +0 −16,030 .pc/darwin11/configure
  46. +0 −499 .pc/darwin11/configure.ac
  47. 0  .pc/debug-build/.timestamp
  48. +0 −4,537 .pc/debug-build/ChangeLog
  49. +0 −192 .pc/debug-build/Makefile.am
  50. +0 −15,954 .pc/debug-build/configure
  51. +0 −467 .pc/debug-build/configure.ac
  52. 0  .pc/ffi_last_abi/.timestamp
  53. +0 −4,511 .pc/ffi_last_abi/ChangeLog
  54. +0 −50 .pc/ffi_last_abi/src/avr32/ffitarget.h
  55. +0 −383 .pc/ffi_last_abi/src/cris/ffi.c
  56. +0 −51 .pc/ffi_last_abi/src/cris/ffitarget.h
  57. +0 −61 .pc/ffi_last_abi/src/frv/ffitarget.h
  58. +0 −50 .pc/ffi_last_abi/src/ia64/ffitarget.h
  59. +0 −48 .pc/ffi_last_abi/src/m32r/ffitarget.h
  60. +0 −49 .pc/ffi_last_abi/src/m68k/ffitarget.h
  61. +0 −243 .pc/ffi_last_abi/src/mips/ffitarget.h
  62. +0 −56 .pc/ffi_last_abi/src/moxie/ffitarget.h
  63. +0 −77 .pc/ffi_last_abi/src/pa/ffitarget.h
  64. +0 −176 .pc/ffi_last_abi/src/prep_cif.c
  65. +0 −62 .pc/ffi_last_abi/src/s390/ffitarget.h
  66. +0 −49 .pc/ffi_last_abi/src/sh/ffitarget.h
  67. +0 −53 .pc/ffi_last_abi/src/sh64/ffitarget.h
  68. +0 −68 .pc/ffi_last_abi/src/sparc/ffitarget.h
  69. +0 −122 .pc/ffi_last_abi/src/x86/ffitarget.h
  70. 0  .pc/ffitarget-include-fix/.timestamp
  71. +0 −48 .pc/ffitarget-include-fix/src/alpha/ffitarget.h
  72. +0 −66 .pc/ffitarget-include-fix/src/arm/ffitarget.h
  73. +0 −50 .pc/ffitarget-include-fix/src/avr32/ffitarget.h
  74. +0 −51 .pc/ffitarget-include-fix/src/cris/ffitarget.h
  75. +0 −57 .pc/ffitarget-include-fix/src/frv/ffitarget.h
  76. +0 −50 .pc/ffitarget-include-fix/src/ia64/ffitarget.h
  77. +0 −48 .pc/ffitarget-include-fix/src/m32r/ffitarget.h
  78. +0 −49 .pc/ffitarget-include-fix/src/m68k/ffitarget.h
  79. +0 −242 .pc/ffitarget-include-fix/src/mips/ffitarget.h
  80. +0 −52 .pc/ffitarget-include-fix/src/moxie/ffitarget.h
  81. +0 −78 .pc/ffitarget-include-fix/src/pa/ffitarget.h
  82. +0 −135 .pc/ffitarget-include-fix/src/powerpc/ffitarget.h
  83. +0 −62 .pc/ffitarget-include-fix/src/s390/ffitarget.h
  84. +0 −49 .pc/ffitarget-include-fix/src/sh/ffitarget.h
  85. +0 −53 .pc/ffitarget-include-fix/src/sh64/ffitarget.h
  86. +0 −68 .pc/ffitarget-include-fix/src/sparc/ffitarget.h
  87. +0 −124 .pc/ffitarget-include-fix/src/x86/ffitarget.h
  88. 0  .pc/fix-grammar/.timestamp
  89. +0 −4,569 .pc/fix-grammar/ChangeLog
  90. +0 −125 .pc/fix-grammar/src/powerpc/asm.h
  91. 0  .pc/fix-ppc32/.timestamp
  92. +0 −4,663 .pc/fix-ppc32/ChangeLog
  93. +0 −1,445 .pc/fix-ppc32/src/powerpc/ffi.c
  94. 0  .pc/fix-xfails/.timestamp
  95. +0 −4,607 .pc/fix-xfails/ChangeLog
  96. +0 −177 .pc/fix-xfails/src/prep_cif.c
  97. +0 −627 .pc/fix-xfails/src/x86/ffi64.c
  98. +0 −35 .pc/fix-xfails/testsuite/libffi.call/err_bad_abi.c
  99. +0 −25 .pc/fix-xfails/testsuite/libffi.call/err_bad_typedef.c
  100. 0  .pc/fix_maxopt/.timestamp
  101. +0 −4,658 .pc/fix_maxopt/ChangeLog
  102. +0 −180 .pc/fix_maxopt/m4/ax_cc_maxopt.m4
  103. 0  .pc/hpux-mallinfo/.timestamp
  104. +0 −4,579 .pc/hpux-mallinfo/ChangeLog
  105. +0 −5,158 .pc/hpux-mallinfo/src/dlmalloc.c
  106. 0  .pc/interix-patch/.timestamp
  107. +0 −615 .pc/interix-patch/src/closures.c
  108. 0  .pc/interix/.timestamp
  109. +0 −4,613 .pc/interix/ChangeLog
  110. +0 −16,030 .pc/interix/configure
  111. +0 −491 .pc/interix/configure.ac
  112. +0 −615 .pc/interix/src/closures.c
  113. 0  .pc/ios-fixes/.timestamp
  114. +0 −4,641 .pc/ios-fixes/ChangeLog
  115. +0 −12 .pc/ios-fixes/build-ios.sh
  116. 0  .pc/ios/.timestamp
  117. +0 −4,584 .pc/ios/ChangeLog
  118. +0 −200 .pc/ios/Makefile.am
  119. +0 −1,827 .pc/ios/Makefile.in
  120. +0 −481 .pc/ios/configure.ac
  121. +0 −193 .pc/ios/fficonfig.h.in
  122. +0 −504 .pc/ios/src/arm/ffi.c
  123. +0 −471 .pc/ios/src/arm/sysv.S
  124. +0 −610 .pc/ios/src/closures.c
  125. 0  .pc/irix/.timestamp
  126. +0 −4,628 .pc/irix/ChangeLog
  127. +0 −421 .pc/irix/include/ffi.h.in
  128. +0 −356 .pc/irix/src/java_raw_api.c
  129. +0 −242 .pc/irix/src/mips/ffitarget.h
  130. 0  .pc/kfreebsd-mmap/.timestamp
  131. +0 −4,697 .pc/kfreebsd-mmap/ChangeLog
  132. +0 −499 .pc/kfreebsd-mmap/configure.ac
  133. 0  .pc/m68k-patches/.timestamp
  134. +0 −288 .pc/m68k-patches/src/m68k/ffi.c
  135. +0 −36 .pc/m68k-patches/testsuite/libffi.call/return_sc.c
  136. 0  .pc/ml64-safeseh/.timestamp
  137. +0 −4,533 .pc/ml64-safeseh/ChangeLog
  138. +0 −195 .pc/ml64-safeseh/msvcc.sh
  139. 0  .pc/more-openbsd-mips/.timestamp
  140. +0 −499 .pc/more-openbsd-mips/configure.ac
  141. +0 −1,032 .pc/more-openbsd-mips/src/mips/ffi.c
  142. +0 −242 .pc/more-openbsd-mips/src/mips/ffitarget.h
  143. 0  .pc/more-openbsd/.timestamp
Sorry, we could not display the entire diff because it was too big.
View
0  .pc/aix-ibm-xlc/.timestamp
No changes.
View
4,556 .pc/aix-ibm-xlc/ChangeLog
0 additions, 4,556 deletions not shown
View
16,028 .pc/aix-ibm-xlc/configure
0 additions, 16,028 deletions not shown
View
479 .pc/aix-ibm-xlc/configure.ac
@@ -1,479 +0,0 @@
-dnl Process this with autoconf to create configure
-
-AC_PREREQ(2.63)
-
-AC_INIT([libffi], [3.0.11-rc2], [http://github.com/atgreen/libffi/issues])
-AC_CONFIG_HEADERS([fficonfig.h])
-
-AC_CANONICAL_SYSTEM
-target_alias=${target_alias-$host_alias}
-
-. ${srcdir}/configure.host
-
-AM_INIT_AUTOMAKE
-
-# The same as in boehm-gc and libstdc++. Have to borrow it from there.
-# We must force CC to /not/ be precious variables; otherwise
-# the wrong, non-multilib-adjusted value will be used in multilibs.
-# As a side effect, we have to subst CFLAGS ourselves.
-# Also save and restore CFLAGS, since AC_PROG_CC will come up with
-# defaults of its own if none are provided.
-
-m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
-m4_define([_AC_ARG_VAR_PRECIOUS],[])
-save_CFLAGS=$CFLAGS
-AC_PROG_CC
-CFLAGS=$save_CFLAGS
-m4_undefine([_AC_ARG_VAR_PRECIOUS])
-m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
-
-AC_SUBST(CFLAGS)
-
-AM_PROG_AS
-AM_PROG_CC_C_O
-AC_PROG_LIBTOOL
-AC_CONFIG_MACRO_DIR([m4])
-
-AM_MAINTAINER_MODE
-
-AC_CHECK_HEADERS(sys/mman.h)
-AC_CHECK_FUNCS(mmap)
-AC_FUNC_MMAP_BLACKLIST
-
-dnl The -no-testsuite modules omit the test subdir.
-AM_CONDITIONAL(TESTSUBDIR, test -d $srcdir/testsuite)
-
-TARGETDIR="unknown"
-case "$host" in
- alpha*-*-*)
- TARGET=ALPHA; TARGETDIR=alpha;
- # Support 128-bit long double, changeable via command-line switch.
- HAVE_LONG_DOUBLE='defined(__LONG_DOUBLE_128__)'
- ;;
-
- arm*-*-*)
- TARGET=ARM; TARGETDIR=arm
- ;;
-
- amd64-*-freebsd* | amd64-*-openbsd*)
- TARGET=X86_64; TARGETDIR=x86
- ;;
-
- amd64-*-freebsd*)
- TARGET=X86_64; TARGETDIR=x86
- ;;
-
- avr32*-*-*)
- TARGET=AVR32; TARGETDIR=avr32
- ;;
-
- cris-*-*)
- TARGET=LIBFFI_CRIS; TARGETDIR=cris
- ;;
-
- frv-*-*)
- TARGET=FRV; TARGETDIR=frv
- ;;
-
- hppa*-*-linux* | parisc*-*-linux*)
- TARGET=PA_LINUX; TARGETDIR=pa
- ;;
- hppa*64-*-hpux*)
- TARGET=PA64_HPUX; TARGETDIR=pa
- ;;
- hppa*-*-hpux*)
- TARGET=PA_HPUX; TARGETDIR=pa
- ;;
-
- i?86-*-freebsd* | i?86-*-openbsd*)
- TARGET=X86_FREEBSD; TARGETDIR=x86
- ;;
- i?86-win32* | i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2*)
- TARGET=X86_WIN32; TARGETDIR=x86
- # All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
- # We must also check with_cross_host to decide if this is a native
- # or cross-build and select where to install dlls appropriately.
- if test -n "$with_cross_host" &&
- test x"$with_cross_host" != x"no"; then
- AM_LTLDFLAGS='-no-undefined -bindir "$(toolexeclibdir)"';
- else
- AM_LTLDFLAGS='-no-undefined -bindir "$(bindir)"';
- fi
- ;;
- i?86-*-darwin*)
- TARGET=X86_DARWIN; TARGETDIR=x86
- ;;
- i?86-*-solaris2.1[[0-9]]*)
- TARGET=X86_64; TARGETDIR=x86
- ;;
- i?86-*-*)
- TARGET=X86_64; TARGETDIR=x86
- ;;
-
- ia64*-*-*)
- TARGET=IA64; TARGETDIR=ia64
- ;;
-
- m32r*-*-*)
- TARGET=M32R; TARGETDIR=m32r
- ;;
-
- m68k-*-*)
- TARGET=M68K; TARGETDIR=m68k
- ;;
-
- mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
- TARGET=MIPS; TARGETDIR=mips
- ;;
- mips*-*-linux*)
- # Support 128-bit long double for NewABI.
- HAVE_LONG_DOUBLE='defined(__mips64)'
- TARGET=MIPS; TARGETDIR=mips
- ;;
-
- moxie-*-*)
- TARGET=MOXIE; TARGETDIR=moxie
- ;;
-
- powerpc*-*-linux* | powerpc-*-sysv*)
- TARGET=POWERPC; TARGETDIR=powerpc
- ;;
- powerpc-*-beos*)
- TARGET=POWERPC; TARGETDIR=powerpc
- ;;
- powerpc-*-darwin*)
- TARGET=POWERPC_DARWIN; TARGETDIR=powerpc
- ;;
- powerpc-*-aix* | rs6000-*-aix*)
- TARGET=POWERPC_AIX; TARGETDIR=powerpc
- ;;
- powerpc-*-freebsd*)
- TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
- ;;
- powerpc64-*-freebsd*)
- TARGET=POWERPC; TARGETDIR=powerpc
- ;;
- powerpc*-*-rtems*)
- TARGET=POWERPC; TARGETDIR=powerpc
- ;;
-
- s390-*-* | s390x-*-*)
- TARGET=S390; TARGETDIR=s390
- ;;
-
- sh-*-* | sh[[34]]*-*-*)
- TARGET=SH; TARGETDIR=sh
- ;;
- sh64-*-* | sh5*-*-*)
- TARGET=SH64; TARGETDIR=sh64
- ;;
-
- sparc*-*-*)
- TARGET=SPARC; TARGETDIR=sparc
- ;;
-
- x86_64-*-darwin*)
- TARGET=X86_DARWIN; TARGETDIR=x86
- ;;
-
- x86_64-*-cygwin* | x86_64-*-mingw*)
- TARGET=X86_WIN64; TARGETDIR=x86
- # All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
- # We must also check with_cross_host to decide if this is a native
- # or cross-build and select where to install dlls appropriately.
- if test -n "$with_cross_host" &&
- test x"$with_cross_host" != x"no"; then
- AM_LTLDFLAGS='-no-undefined -bindir "$(toolexeclibdir)"';
- else
- AM_LTLDFLAGS='-no-undefined -bindir "$(bindir)"';
- fi
- ;;
-
- x86_64-*-*)
- TARGET=X86_64; TARGETDIR=x86
- ;;
-esac
-
-AC_SUBST(AM_RUNTESTFLAGS)
-AC_SUBST(AM_LTLDFLAGS)
-
-if test $TARGETDIR = unknown; then
- AC_MSG_ERROR(["libffi has not been ported to $host."])
-fi
-
-AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS)
-AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
-AM_CONDITIONAL(X86, test x$TARGET = xX86)
-AM_CONDITIONAL(X86_FREEBSD, test x$TARGET = xX86_FREEBSD)
-AM_CONDITIONAL(X86_WIN32, test x$TARGET = xX86_WIN32)
-AM_CONDITIONAL(X86_WIN64, test x$TARGET = xX86_WIN64)
-AM_CONDITIONAL(X86_DARWIN, test x$TARGET = xX86_DARWIN)
-AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
-AM_CONDITIONAL(IA64, test x$TARGET = xIA64)
-AM_CONDITIONAL(M32R, test x$TARGET = xM32R)
-AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
-AM_CONDITIONAL(MOXIE, test x$TARGET = xMOXIE)
-AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
-AM_CONDITIONAL(POWERPC_AIX, test x$TARGET = xPOWERPC_AIX)
-AM_CONDITIONAL(POWERPC_DARWIN, test x$TARGET = xPOWERPC_DARWIN)
-AM_CONDITIONAL(POWERPC_FREEBSD, test x$TARGET = xPOWERPC_FREEBSD)
-AM_CONDITIONAL(ARM, test x$TARGET = xARM)
-AM_CONDITIONAL(AVR32, test x$TARGET = xAVR32)
-AM_CONDITIONAL(LIBFFI_CRIS, test x$TARGET = xLIBFFI_CRIS)
-AM_CONDITIONAL(FRV, test x$TARGET = xFRV)
-AM_CONDITIONAL(S390, test x$TARGET = xS390)
-AM_CONDITIONAL(X86_64, test x$TARGET = xX86_64)
-AM_CONDITIONAL(SH, test x$TARGET = xSH)
-AM_CONDITIONAL(SH64, test x$TARGET = xSH64)
-AM_CONDITIONAL(PA_LINUX, test x$TARGET = xPA_LINUX)
-AM_CONDITIONAL(PA_HPUX, test x$TARGET = xPA_HPUX)
-AM_CONDITIONAL(PA64_HPUX, test x$TARGET = xPA64_HPUX)
-
-AC_HEADER_STDC
-AC_CHECK_FUNCS(memcpy)
-AC_FUNC_ALLOCA
-
-AC_CHECK_SIZEOF(double)
-AC_CHECK_SIZEOF(long double)
-
-# Also AC_SUBST this variable for ffi.h.
-if test -z "$HAVE_LONG_DOUBLE"; then
- HAVE_LONG_DOUBLE=0
- if test $ac_cv_sizeof_double != $ac_cv_sizeof_long_double; then
- if test $ac_cv_sizeof_long_double != 0; then
- HAVE_LONG_DOUBLE=1
- AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the long double type and it is bigger than a double])
- fi
- fi
-fi
-AC_SUBST(HAVE_LONG_DOUBLE)
-
-AC_C_BIGENDIAN
-
-GCC_AS_CFI_PSEUDO_OP
-
-if test x$TARGET = xSPARC; then
- AC_CACHE_CHECK([assembler and linker support unaligned pc related relocs],
- libffi_cv_as_sparc_ua_pcrel, [
- save_CFLAGS="$CFLAGS"
- save_LDFLAGS="$LDFLAGS"
- CFLAGS="$CFLAGS -fpic"
- LDFLAGS="$LDFLAGS -shared"
- AC_TRY_LINK([asm (".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo); .text");],,
- [libffi_cv_as_sparc_ua_pcrel=yes],
- [libffi_cv_as_sparc_ua_pcrel=no])
- CFLAGS="$save_CFLAGS"
- LDFLAGS="$save_LDFLAGS"])
- if test "x$libffi_cv_as_sparc_ua_pcrel" = xyes; then
- AC_DEFINE(HAVE_AS_SPARC_UA_PCREL, 1,
- [Define if your assembler and linker support unaligned PC relative relocs.])
- fi
-
- AC_CACHE_CHECK([assembler .register pseudo-op support],
- libffi_cv_as_register_pseudo_op, [
- libffi_cv_as_register_pseudo_op=unknown
- # Check if we have .register
- AC_TRY_COMPILE([asm (".register %g2, #scratch");],,
- [libffi_cv_as_register_pseudo_op=yes],
- [libffi_cv_as_register_pseudo_op=no])
- ])
- if test "x$libffi_cv_as_register_pseudo_op" = xyes; then
- AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP, 1,
- [Define if your assembler supports .register.])
- fi
-fi
-
-if test x$TARGET = xX86 || test x$TARGET = xX86_WIN32 || test x$TARGET = xX86_64; then
- AC_CACHE_CHECK([assembler supports pc related relocs],
- libffi_cv_as_x86_pcrel, [
- libffi_cv_as_x86_pcrel=no
- echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s
- if $CC $CFLAGS -c conftest.s > /dev/null; then
- libffi_cv_as_x86_pcrel=yes
- fi
- ])
- if test "x$libffi_cv_as_x86_pcrel" = xyes; then
- AC_DEFINE(HAVE_AS_X86_PCREL, 1,
- [Define if your assembler supports PC relative relocs.])
- fi
-
- AC_CACHE_CHECK([assembler .ascii pseudo-op support],
- libffi_cv_as_ascii_pseudo_op, [
- libffi_cv_as_ascii_pseudo_op=unknown
- # Check if we have .ascii
- AC_TRY_COMPILE([asm (".ascii \\"string\\"");],,
- [libffi_cv_as_ascii_pseudo_op=yes],
- [libffi_cv_as_ascii_pseudo_op=no])
- ])
- if test "x$libffi_cv_as_ascii_pseudo_op" = xyes; then
- AC_DEFINE(HAVE_AS_ASCII_PSEUDO_OP, 1,
- [Define if your assembler supports .ascii.])
- fi
-
- AC_CACHE_CHECK([assembler .string pseudo-op support],
- libffi_cv_as_string_pseudo_op, [
- libffi_cv_as_string_pseudo_op=unknown
- # Check if we have .string
- AC_TRY_COMPILE([asm (".string \\"string\\"");],,
- [libffi_cv_as_string_pseudo_op=yes],
- [libffi_cv_as_string_pseudo_op=no])
- ])
- if test "x$libffi_cv_as_string_pseudo_op" = xyes; then
- AC_DEFINE(HAVE_AS_STRING_PSEUDO_OP, 1,
- [Define if your assembler supports .string.])
- fi
-fi
-
-if test x$TARGET = xX86_WIN64; then
- LT_SYS_SYMBOL_USCORE
- if test "x$sys_symbol_underscore" = xyes; then
- AC_DEFINE(SYMBOL_UNDERSCORE, 1, [Define if symbols are underscored.])
- fi
-fi
-
-case "$target" in
- *-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*)
- AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1,
- [Cannot use malloc on this target, so, we revert to
- alternative means])
- ;;
-esac
-
-if test x$TARGET = xX86_64; then
- AC_CACHE_CHECK([assembler supports unwind section type],
- libffi_cv_as_x86_64_unwind_section_type, [
- libffi_cv_as_x86_64_unwind_section_type=yes
- echo '.section .eh_frame,"a",@unwind' > conftest.s
- if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
- libffi_cv_as_x86_64_unwind_section_type=no
- fi
- ])
- if test "x$libffi_cv_as_x86_64_unwind_section_type" = xyes; then
- AC_DEFINE(HAVE_AS_X86_64_UNWIND_SECTION_TYPE, 1,
- [Define if your assembler supports unwind section type.])
- fi
-fi
-
-AC_CACHE_CHECK([whether .eh_frame section should be read-only],
- libffi_cv_ro_eh_frame, [
- libffi_cv_ro_eh_frame=no
- echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
- if $CC $CFLAGS -S -fpic -fexceptions -o conftest.s conftest.c > /dev/null 2>&1; then
- if grep '.section.*eh_frame.*"a"' conftest.s > /dev/null; then
- libffi_cv_ro_eh_frame=yes
- elif grep '.section.*eh_frame.*#alloc' conftest.c \
- | grep -v '#write' > /dev/null; then
- libffi_cv_ro_eh_frame=yes
- fi
- fi
- rm -f conftest.*
- ])
-if test "x$libffi_cv_ro_eh_frame" = xyes; then
- AC_DEFINE(HAVE_RO_EH_FRAME, 1,
- [Define if .eh_frame sections should be read-only.])
- AC_DEFINE(EH_FRAME_FLAGS, "a",
- [Define to the flags needed for the .section .eh_frame directive.])
-else
- AC_DEFINE(EH_FRAME_FLAGS, "aw",
- [Define to the flags needed for the .section .eh_frame directive.])
-fi
-
-AC_CACHE_CHECK([for __attribute__((visibility("hidden")))],
- libffi_cv_hidden_visibility_attribute, [
- echo 'int __attribute__ ((visibility ("hidden"))) foo (void) { return 1; }' > conftest.c
- libffi_cv_hidden_visibility_attribute=no
- if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
- if grep '\.hidden.*foo' conftest.s >/dev/null; then
- libffi_cv_hidden_visibility_attribute=yes
- fi
- fi
- rm -f conftest.*
- ])
-if test $libffi_cv_hidden_visibility_attribute = yes; then
- AC_DEFINE(HAVE_HIDDEN_VISIBILITY_ATTRIBUTE, 1,
- [Define if __attribute__((visibility("hidden"))) is supported.])
-fi
-
-AH_BOTTOM([
-#ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
-#ifdef LIBFFI_ASM
-#define FFI_HIDDEN(name) .hidden name
-#else
-#define FFI_HIDDEN __attribute__ ((visibility ("hidden")))
-#endif
-#else
-#ifdef LIBFFI_ASM
-#define FFI_HIDDEN(name)
-#else
-#define FFI_HIDDEN
-#endif
-#endif
-])
-
-AC_SUBST(TARGET)
-AC_SUBST(TARGETDIR)
-
-AC_SUBST(SHELL)
-
-AC_ARG_ENABLE(debug,
-[ --enable-debug debugging mode],
- if test "$enable_debug" = "yes"; then
- AC_DEFINE(FFI_DEBUG, 1, [Define this if you want extra debugging.])
- fi)
-AM_CONDITIONAL(FFI_DEBUG, test "$enable_debug" = "yes")
-
-AC_ARG_ENABLE(structs,
-[ --disable-structs omit code for struct support],
- if test "$enable_structs" = "no"; then
- AC_DEFINE(FFI_NO_STRUCTS, 1, [Define this is you do not want support for aggregate types.])
- fi)
-
-AC_ARG_ENABLE(raw-api,
-[ --disable-raw-api make the raw api unavailable],
- if test "$enable_raw_api" = "no"; then
- AC_DEFINE(FFI_NO_RAW_API, 1, [Define this is you do not want support for the raw API.])
- fi)
-
-AC_ARG_ENABLE(purify-safety,
-[ --enable-purify-safety purify-safe mode],
- if test "$enable_purify_safety" = "yes"; then
- AC_DEFINE(USING_PURIFY, 1, [Define this if you are using Purify and want to suppress spurious messages.])
- fi)
-
-# These variables are only ever used when we cross-build to X86_WIN32.
-# And we only support this with GCC, so...
-if test x"$GCC" != x"no"; then
- if test -n "$with_cross_host" &&
- test x"$with_cross_host" != x"no"; then
- toolexecdir='$(exec_prefix)/$(target_alias)'
- toolexeclibdir='$(toolexecdir)/lib'
- else
- toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
- toolexeclibdir='$(libdir)'
- fi
- multi_os_directory=`$CC -print-multi-os-directory`
- case $multi_os_directory in
- .) ;; # Avoid trailing /.
- *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
- esac
- AC_SUBST(toolexecdir)
- AC_SUBST(toolexeclibdir)
-fi
-
-if test "${multilib}" = "yes"; then
- multilib_arg="--enable-multilib"
-else
- multilib_arg=
-fi
-
-AC_CONFIG_COMMANDS(include, [test -d include || mkdir include])
-AC_CONFIG_COMMANDS(src, [
-test -d src || mkdir src
-test -d src/$TARGETDIR || mkdir src/$TARGETDIR
-], [TARGETDIR="$TARGETDIR"])
-
-AC_CONFIG_LINKS(include/ffitarget.h:src/$TARGETDIR/ffitarget.h)
-
-AC_CONFIG_FILES(include/Makefile include/ffi.h Makefile testsuite/Makefile man/Makefile libffi.pc)
-
-AC_OUTPUT
View
404 .pc/aix-ibm-xlc/include/ffi.h.in
@@ -1,404 +0,0 @@
-/* -----------------------------------------------------------------*-C-*-
- libffi @VERSION@ - Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- ``Software''), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- DEALINGS IN THE SOFTWARE.
-
- ----------------------------------------------------------------------- */
-
-/* -------------------------------------------------------------------
- The basic API is described in the README file.
-
- The raw API is designed to bypass some of the argument packing
- and unpacking on architectures for which it can be avoided.
-
- The closure API allows interpreted functions to be packaged up
- inside a C function pointer, so that they can be called as C functions,
- with no understanding on the client side that they are interpreted.
- It can also be used in other cases in which it is necessary to package
- up a user specified parameter and a function pointer as a single
- function pointer.
-
- The closure API must be implemented in order to get its functionality,
- e.g. for use by gij. Routines are provided to emulate the raw API
- if the underlying platform doesn't allow faster implementation.
-
- More details on the raw and cloure API can be found in:
-
- http://gcc.gnu.org/ml/java/1999-q3/msg00138.html
-
- and
-
- http://gcc.gnu.org/ml/java/1999-q3/msg00174.html
- -------------------------------------------------------------------- */
-
-#ifndef LIBFFI_H
-#define LIBFFI_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Specify which architecture libffi is configured for. */
-#ifndef @TARGET@
-#define @TARGET@
-#endif
-
-/* ---- System configuration information --------------------------------- */
-
-#include <ffitarget.h>
-
-#ifndef LIBFFI_ASM
-
-#ifdef _MSC_VER
-#define __attribute__(X)
-#endif
-
-#include <stddef.h>
-#include <limits.h>
-
-/* LONG_LONG_MAX is not always defined (not if STRICT_ANSI, for example).
- But we can find it either under the correct ANSI name, or under GNU
- C's internal name. */
-#ifdef LONG_LONG_MAX
-# define FFI_LONG_LONG_MAX LONG_LONG_MAX
-#else
-# ifdef LLONG_MAX
-# define FFI_LONG_LONG_MAX LLONG_MAX
-# else
-# ifdef __GNUC__
-# define FFI_LONG_LONG_MAX __LONG_LONG_MAX__
-# endif
-# endif
-#endif
-
-/* The closure code assumes that this works on pointers, i.e. a size_t */
-/* can hold a pointer. */
-
-typedef struct _ffi_type
-{
- size_t size;
- unsigned short alignment;
- unsigned short type;
- struct _ffi_type **elements;
-} ffi_type;
-
-#ifndef LIBFFI_HIDE_BASIC_TYPES
-#if SCHAR_MAX == 127
-# define ffi_type_uchar ffi_type_uint8
-# define ffi_type_schar ffi_type_sint8
-#else
- #error "char size not supported"
-#endif
-
-#if SHRT_MAX == 32767
-# define ffi_type_ushort ffi_type_uint16
-# define ffi_type_sshort ffi_type_sint16
-#elif SHRT_MAX == 2147483647
-# define ffi_type_ushort ffi_type_uint32
-# define ffi_type_sshort ffi_type_sint32
-#else
- #error "short size not supported"
-#endif
-
-#if INT_MAX == 32767
-# define ffi_type_uint ffi_type_uint16
-# define ffi_type_sint ffi_type_sint16
-#elif INT_MAX == 2147483647
-# define ffi_type_uint ffi_type_uint32
-# define ffi_type_sint ffi_type_sint32
-#elif INT_MAX == 9223372036854775807
-# define ffi_type_uint ffi_type_uint64
-# define ffi_type_sint ffi_type_sint64
-#else
- #error "int size not supported"
-#endif
-
-#if LONG_MAX == 2147483647
-# if FFI_LONG_LONG_MAX != 9223372036854775807
- #error "no 64-bit data type supported"
-# endif
-#elif LONG_MAX != 9223372036854775807
- #error "long size not supported"
-#endif
-
-#if LONG_MAX == 2147483647
-# define ffi_type_ulong ffi_type_uint32
-# define ffi_type_slong ffi_type_sint32
-#elif LONG_MAX == 9223372036854775807
-# define ffi_type_ulong ffi_type_uint64
-# define ffi_type_slong ffi_type_sint64
-#else
- #error "long size not supported"
-#endif
-
-/* These are defined in types.c */
-extern ffi_type ffi_type_void;
-extern ffi_type ffi_type_uint8;
-extern ffi_type ffi_type_sint8;
-extern ffi_type ffi_type_uint16;
-extern ffi_type ffi_type_sint16;
-extern ffi_type ffi_type_uint32;
-extern ffi_type ffi_type_sint32;
-extern ffi_type ffi_type_uint64;
-extern ffi_type ffi_type_sint64;
-extern ffi_type ffi_type_float;
-extern ffi_type ffi_type_double;
-extern ffi_type ffi_type_pointer;
-
-#if @HAVE_LONG_DOUBLE@
-extern ffi_type ffi_type_longdouble;
-#else
-#define ffi_type_longdouble ffi_type_double
-#endif
-#endif /* LIBFFI_HIDE_BASIC_TYPES */
-
-typedef enum {
- FFI_OK = 0,
- FFI_BAD_TYPEDEF,
- FFI_BAD_ABI
-} ffi_status;
-
-typedef unsigned FFI_TYPE;
-
-typedef struct {
- ffi_abi abi;
- unsigned nargs;
- ffi_type **arg_types;
- ffi_type *rtype;
- unsigned bytes;
- unsigned flags;
-#ifdef FFI_EXTRA_CIF_FIELDS
- FFI_EXTRA_CIF_FIELDS;
-#endif
-} ffi_cif;
-
-/* ---- Definitions for the raw API -------------------------------------- */
-
-#ifndef FFI_SIZEOF_ARG
-# if LONG_MAX == 2147483647
-# define FFI_SIZEOF_ARG 4
-# elif LONG_MAX == 9223372036854775807
-# define FFI_SIZEOF_ARG 8
-# endif
-#endif
-
-#ifndef FFI_SIZEOF_JAVA_RAW
-# define FFI_SIZEOF_JAVA_RAW FFI_SIZEOF_ARG
-#endif
-
-typedef union {
- ffi_sarg sint;
- ffi_arg uint;
- float flt;
- char data[FFI_SIZEOF_ARG];
- void* ptr;
-} ffi_raw;
-
-#if FFI_SIZEOF_JAVA_RAW == 4 && FFI_SIZEOF_ARG == 8
-/* This is a special case for mips64/n32 ABI (and perhaps others) where
- sizeof(void *) is 4 and FFI_SIZEOF_ARG is 8. */
-typedef union {
- signed int sint;
- unsigned int uint;
- float flt;
- char data[FFI_SIZEOF_JAVA_RAW];
- void* ptr;
-} ffi_java_raw;
-#else
-typedef ffi_raw ffi_java_raw;
-#endif
-
-
-void ffi_raw_call (ffi_cif *cif,
- void (*fn)(void),
- void *rvalue,
- ffi_raw *avalue);
-
-void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
-void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
-size_t ffi_raw_size (ffi_cif *cif);
-
-/* This is analogous to the raw API, except it uses Java parameter */
-/* packing, even on 64-bit machines. I.e. on 64-bit machines */
-/* longs and doubles are followed by an empty 64-bit word. */
-
-void ffi_java_raw_call (ffi_cif *cif,
- void (*fn)(void),
- void *rvalue,
- ffi_java_raw *avalue);
-
-void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw);
-void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args);
-size_t ffi_java_raw_size (ffi_cif *cif);
-
-/* ---- Definitions for closures ----------------------------------------- */
-
-#if FFI_CLOSURES
-
-#ifdef _MSC_VER
-__declspec(align(8))
-#endif
-typedef struct {
- char tramp[FFI_TRAMPOLINE_SIZE];
- ffi_cif *cif;
- void (*fun)(ffi_cif*,void*,void**,void*);
- void *user_data;
-#ifdef __GNUC__
-} ffi_closure __attribute__((aligned (8)));
-#else
-} ffi_closure;
-#endif
-
-void *ffi_closure_alloc (size_t size, void **code);
-void ffi_closure_free (void *);
-
-ffi_status
-ffi_prep_closure (ffi_closure*,
- ffi_cif *,
- void (*fun)(ffi_cif*,void*,void**,void*),
- void *user_data);
-
-ffi_status
-ffi_prep_closure_loc (ffi_closure*,
- ffi_cif *,
- void (*fun)(ffi_cif*,void*,void**,void*),
- void *user_data,
- void*codeloc);
-
-typedef struct {
- char tramp[FFI_TRAMPOLINE_SIZE];
-
- ffi_cif *cif;
-
-#if !FFI_NATIVE_RAW_API
-
- /* if this is enabled, then a raw closure has the same layout
- as a regular closure. We use this to install an intermediate
- handler to do the transaltion, void** -> ffi_raw*. */
-
- void (*translate_args)(ffi_cif*,void*,void**,void*);
- void *this_closure;
-
-#endif
-
- void (*fun)(ffi_cif*,void*,ffi_raw*,void*);
- void *user_data;
-
-} ffi_raw_closure;
-
-typedef struct {
- char tramp[FFI_TRAMPOLINE_SIZE];
-
- ffi_cif *cif;
-
-#if !FFI_NATIVE_RAW_API
-
- /* if this is enabled, then a raw closure has the same layout
- as a regular closure. We use this to install an intermediate
- handler to do the transaltion, void** -> ffi_raw*. */
-
- void (*translate_args)(ffi_cif*,void*,void**,void*);
- void *this_closure;
-
-#endif
-
- void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*);
- void *user_data;
-
-} ffi_java_raw_closure;
-
-ffi_status
-ffi_prep_raw_closure (ffi_raw_closure*,
- ffi_cif *cif,
- void (*fun)(ffi_cif*,void*,ffi_raw*,void*),
- void *user_data);
-
-ffi_status
-ffi_prep_raw_closure_loc (ffi_raw_closure*,
- ffi_cif *cif,
- void (*fun)(ffi_cif*,void*,ffi_raw*,void*),
- void *user_data,
- void *codeloc);
-
-ffi_status
-ffi_prep_java_raw_closure (ffi_java_raw_closure*,
- ffi_cif *cif,
- void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
- void *user_data);
-
-ffi_status
-ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*,
- ffi_cif *cif,
- void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
- void *user_data,
- void *codeloc);
-
-#endif /* FFI_CLOSURES */
-
-/* ---- Public interface definition -------------------------------------- */
-
-ffi_status ffi_prep_cif(ffi_cif *cif,
- ffi_abi abi,
- unsigned int nargs,
- ffi_type *rtype,
- ffi_type **atypes);
-
-void ffi_call(ffi_cif *cif,
- void (*fn)(void),
- void *rvalue,
- void **avalue);
-
-/* Useful for eliminating compiler warnings */
-#define FFI_FN(f) ((void (*)(void))f)
-
-/* ---- Definitions shared with assembly code ---------------------------- */
-
-#endif
-
-/* If these change, update src/mips/ffitarget.h. */
-#define FFI_TYPE_VOID 0
-#define FFI_TYPE_INT 1
-#define FFI_TYPE_FLOAT 2
-#define FFI_TYPE_DOUBLE 3
-#if @HAVE_LONG_DOUBLE@
-#define FFI_TYPE_LONGDOUBLE 4
-#else
-#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
-#endif
-#define FFI_TYPE_UINT8 5
-#define FFI_TYPE_SINT8 6
-#define FFI_TYPE_UINT16 7
-#define FFI_TYPE_SINT16 8
-#define FFI_TYPE_UINT32 9
-#define FFI_TYPE_SINT32 10
-#define FFI_TYPE_UINT64 11
-#define FFI_TYPE_SINT64 12
-#define FFI_TYPE_STRUCT 13
-#define FFI_TYPE_POINTER 14
-
-/* This should always refer to the last type code (for sanity checks) */
-#define FFI_TYPE_LAST FFI_TYPE_POINTER
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
View
324 .pc/aix-ibm-xlc/src/powerpc/aix.S
@@ -1,324 +0,0 @@
-/* -----------------------------------------------------------------------
- aix.S - Copyright (c) 2002,2009 Free Software Foundation, Inc.
- based on darwin.S by John Hornkvist
-
- PowerPC Assembly glue.
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- ``Software''), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR
- OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
- ----------------------------------------------------------------------- */
-
- .set r0,0
- .set r1,1
- .set r2,2
- .set r3,3
- .set r4,4
- .set r5,5
- .set r6,6
- .set r7,7
- .set r8,8
- .set r9,9
- .set r10,10
- .set r11,11
- .set r12,12
- .set r13,13
- .set r14,14
- .set r15,15
- .set r16,16
- .set r17,17
- .set r18,18
- .set r19,19
- .set r20,20
- .set r21,21
- .set r22,22
- .set r23,23
- .set r24,24
- .set r25,25
- .set r26,26
- .set r27,27
- .set r28,28
- .set r29,29
- .set r30,30
- .set r31,31
- .set f0,0
- .set f1,1
- .set f2,2
- .set f3,3
- .set f4,4
- .set f5,5
- .set f6,6
- .set f7,7
- .set f8,8
- .set f9,9
- .set f10,10
- .set f11,11
- .set f12,12
- .set f13,13
- .set f14,14
- .set f15,15
- .set f16,16
- .set f17,17
- .set f18,18
- .set f19,19
- .set f20,20
- .set f21,21
-
-#define LIBFFI_ASM
-#include <fficonfig.h>
-#include <ffi.h>
-#define JUMPTARGET(name) name
-#define L(x) x
- .file "aix.S"
- .toc
-
- /* void ffi_call_AIX(extended_cif *ecif, unsigned long bytes,
- * unsigned int flags, unsigned int *rvalue,
- * void (*fn)(),
- * void (*prep_args)(extended_cif*, unsigned *const));
- * r3=ecif, r4=bytes, r5=flags, r6=rvalue, r7=fn, r8=prep_args
- */
-
-.csect .text[PR]
- .align 2
- .globl ffi_call_AIX
- .globl .ffi_call_AIX
-.csect ffi_call_AIX[DS]
-ffi_call_AIX:
-#ifdef __64BIT__
- .llong .ffi_call_AIX, TOC[tc0], 0
- .csect .text[PR]
-.ffi_call_AIX:
- /* Save registers we use. */
- mflr r0
-
- std r28,-32(r1)
- std r29,-24(r1)
- std r30,-16(r1)
- std r31, -8(r1)
-
- std r0, 16(r1)
- mr r28, r1 /* our AP. */
- stdux r1, r1, r4
-
- /* Save arguments over call... */
- mr r31, r5 /* flags, */
- mr r30, r6 /* rvalue, */
- mr r29, r7 /* function address. */
- std r2, 40(r1)
-
- /* Call ffi_prep_args. */
- mr r4, r1
- bl .ffi_prep_args
-
- /* Now do the call. */
- ld r0, 0(r29)
- ld r2, 8(r29)
- ld r11, 16(r29)
- /* Set up cr1 with bits 4-7 of the flags. */
- mtcrf 0x40, r31
- mtctr r0
- /* Load all those argument registers. */
- // We have set up a nice stack frame, just load it into registers.
- ld r3, 40+(1*8)(r1)
- ld r4, 40+(2*8)(r1)
- ld r5, 40+(3*8)(r1)
- ld r6, 40+(4*8)(r1)
- nop
- ld r7, 40+(5*8)(r1)
- ld r8, 40+(6*8)(r1)
- ld r9, 40+(7*8)(r1)
- ld r10,40+(8*8)(r1)
-
-L1:
- /* Load all the FP registers. */
- bf 6,L2 // 2f + 0x18
- lfd f1,-32-(13*8)(r28)
- lfd f2,-32-(12*8)(r28)
- lfd f3,-32-(11*8)(r28)
- lfd f4,-32-(10*8)(r28)
- nop
- lfd f5,-32-(9*8)(r28)
- lfd f6,-32-(8*8)(r28)
- lfd f7,-32-(7*8)(r28)
- lfd f8,-32-(6*8)(r28)
- nop
- lfd f9,-32-(5*8)(r28)
- lfd f10,-32-(4*8)(r28)
- lfd f11,-32-(3*8)(r28)
- lfd f12,-32-(2*8)(r28)
- nop
- lfd f13,-32-(1*8)(r28)
-
-L2:
- /* Make the call. */
- bctrl
- ld r2, 40(r1)
-
- /* Now, deal with the return value. */
- mtcrf 0x01, r31
-
- bt 30, L(done_return_value)
- bt 29, L(fp_return_value)
- std r3, 0(r30)
-
- /* Fall through... */
-
-L(done_return_value):
- /* Restore the registers we used and return. */
- mr r1, r28
- ld r0, 16(r28)
- ld r28, -32(r1)
- mtlr r0
- ld r29, -24(r1)
- ld r30, -16(r1)
- ld r31, -8(r1)
- blr
-
-L(fp_return_value):
- bf 28, L(float_return_value)
- stfd f1, 0(r30)
- bf 31, L(done_return_value)
- stfd f2, 8(r30)
- b L(done_return_value)
-L(float_return_value):
- stfs f1, 0(r30)
- b L(done_return_value)
-
-#else /* ! __64BIT__ */
-
- .long .ffi_call_AIX, TOC[tc0], 0
- .csect .text[PR]
-.ffi_call_AIX:
- /* Save registers we use. */
- mflr r0
-
- stw r28,-16(r1)
- stw r29,-12(r1)
- stw r30, -8(r1)
- stw r31, -4(r1)
-
- stw r0, 8(r1)
- mr r28, r1 /* out AP. */
- stwux r1, r1, r4
-
- /* Save arguments over call... */
- mr r31, r5 /* flags, */
- mr r30, r6 /* rvalue, */
- mr r29, r7 /* function address, */
- stw r2, 20(r1)
-
- /* Call ffi_prep_args. */
- mr r4, r1
- bl .ffi_prep_args
-
- /* Now do the call. */
- lwz r0, 0(r29)
- lwz r2, 4(r29)
- lwz r11, 8(r29)
- /* Set up cr1 with bits 4-7 of the flags. */
- mtcrf 0x40, r31
- mtctr r0
- /* Load all those argument registers. */
- // We have set up a nice stack frame, just load it into registers.
- lwz r3, 20+(1*4)(r1)
- lwz r4, 20+(2*4)(r1)
- lwz r5, 20+(3*4)(r1)
- lwz r6, 20+(4*4)(r1)
- nop
- lwz r7, 20+(5*4)(r1)
- lwz r8, 20+(6*4)(r1)
- lwz r9, 20+(7*4)(r1)
- lwz r10,20+(8*4)(r1)
-
-L1:
- /* Load all the FP registers. */
- bf 6,L2 // 2f + 0x18
- lfd f1,-16-(13*8)(r28)
- lfd f2,-16-(12*8)(r28)
- lfd f3,-16-(11*8)(r28)
- lfd f4,-16-(10*8)(r28)
- nop
- lfd f5,-16-(9*8)(r28)
- lfd f6,-16-(8*8)(r28)
- lfd f7,-16-(7*8)(r28)
- lfd f8,-16-(6*8)(r28)
- nop
- lfd f9,-16-(5*8)(r28)
- lfd f10,-16-(4*8)(r28)
- lfd f11,-16-(3*8)(r28)
- lfd f12,-16-(2*8)(r28)
- nop
- lfd f13,-16-(1*8)(r28)
-
-L2:
- /* Make the call. */
- bctrl
- lwz r2, 20(r1)
-
- /* Now, deal with the return value. */
- mtcrf 0x01, r31
-
- bt 30, L(done_return_value)
- bt 29, L(fp_return_value)
- stw r3, 0(r30)
- bf 28, L(done_return_value)
- stw r4, 4(r30)
-
- /* Fall through... */
-
-L(done_return_value):
- /* Restore the registers we used and return. */
- mr r1, r28
- lwz r0, 8(r28)
- lwz r28,-16(r1)
- mtlr r0
- lwz r29,-12(r1)
- lwz r30, -8(r1)
- lwz r31, -4(r1)
- blr
-
-L(fp_return_value):
- bf 28, L(float_return_value)
- stfd f1, 0(r30)
- b L(done_return_value)
-L(float_return_value):
- stfs f1, 0(r30)
- b L(done_return_value)
-#endif
- .long 0
- .byte 0,0,0,1,128,4,0,0
-//END(ffi_call_AIX)
-
-.csect .text[PR]
- .align 2
- .globl ffi_call_DARWIN
- .globl .ffi_call_DARWIN
-.csect ffi_call_DARWIN[DS]
-ffi_call_DARWIN:
-#ifdef __64BIT__
- .llong .ffi_call_DARWIN, TOC[tc0], 0
-#else
- .long .ffi_call_DARWIN, TOC[tc0], 0
-#endif
- .csect .text[PR]
-.ffi_call_DARWIN:
- blr
- .long 0
- .byte 0,0,0,0,0,0,0,0
-//END(ffi_call_DARWIN)
View
443 .pc/aix-ibm-xlc/src/powerpc/aix_closure.S
@@ -1,443 +0,0 @@
-/* -----------------------------------------------------------------------
- aix_closure.S - Copyright (c) 2002, 2003, 2009 Free Software Foundation, Inc.
- based on darwin_closure.S
-
- PowerPC Assembly glue.
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- ``Software''), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR
- OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
- ----------------------------------------------------------------------- */
-
- .set r0,0
- .set r1,1
- .set r2,2
- .set r3,3
- .set r4,4
- .set r5,5
- .set r6,6
- .set r7,7
- .set r8,8
- .set r9,9
- .set r10,10
- .set r11,11
- .set r12,12
- .set r13,13
- .set r14,14
- .set r15,15
- .set r16,16
- .set r17,17
- .set r18,18
- .set r19,19
- .set r20,20
- .set r21,21
- .set r22,22
- .set r23,23
- .set r24,24
- .set r25,25
- .set r26,26
- .set r27,27
- .set r28,28
- .set r29,29
- .set r30,30
- .set r31,31
- .set f0,0
- .set f1,1
- .set f2,2
- .set f3,3
- .set f4,4
- .set f5,5
- .set f6,6
- .set f7,7
- .set f8,8
- .set f9,9
- .set f10,10
- .set f11,11
- .set f12,12
- .set f13,13
- .set f14,14
- .set f15,15
- .set f16,16
- .set f17,17
- .set f18,18
- .set f19,19
- .set f20,20
- .set f21,21
-
-#define LIBFFI_ASM
-#define JUMPTARGET(name) name
-#define L(x) x
- .file "aix_closure.S"
- .toc
-LC..60:
- .tc L..60[TC],L..60
- .csect .text[PR]
- .align 2
-
-.csect .text[PR]
- .align 2
- .globl ffi_closure_ASM
- .globl .ffi_closure_ASM
-.csect ffi_closure_ASM[DS]
-ffi_closure_ASM:
-#ifdef __64BIT__
- .llong .ffi_closure_ASM, TOC[tc0], 0
- .csect .text[PR]
-.ffi_closure_ASM:
-/* we want to build up an area for the parameters passed */
-/* in registers (both floating point and integer) */
-
- /* we store gpr 3 to gpr 10 (aligned to 4)
- in the parents outgoing area */
- std r3, 48+(0*8)(r1)
- std r4, 48+(1*8)(r1)
- std r5, 48+(2*8)(r1)
- std r6, 48+(3*8)(r1)
- mflr r0
-
- std r7, 48+(4*8)(r1)
- std r8, 48+(5*8)(r1)
- std r9, 48+(6*8)(r1)
- std r10, 48+(7*8)(r1)
- std r0, 16(r1) /* save the return address */
-
-
- /* 48 Bytes (Linkage Area) */
- /* 64 Bytes (params) */
- /* 16 Bytes (result) */
- /* 104 Bytes (13*8 from FPR) */
- /* 8 Bytes (alignment) */
- /* 240 Bytes */
-
- stdu r1, -240(r1) /* skip over caller save area
- keep stack aligned to 16 */
-
- /* next save fpr 1 to fpr 13 (aligned to 8) */
- stfd f1, 128+(0*8)(r1)
- stfd f2, 128+(1*8)(r1)
- stfd f3, 128+(2*8)(r1)
- stfd f4, 128+(3*8)(r1)
- stfd f5, 128+(4*8)(r1)
- stfd f6, 128+(5*8)(r1)
- stfd f7, 128+(6*8)(r1)
- stfd f8, 128+(7*8)(r1)
- stfd f9, 128+(8*8)(r1)
- stfd f10, 128+(9*8)(r1)
- stfd f11, 128+(10*8)(r1)
- stfd f12, 128+(11*8)(r1)
- stfd f13, 128+(12*8)(r1)
-
- /* set up registers for the routine that actually does the work */
- /* get the context pointer from the trampoline */
- mr r3, r11
-
- /* now load up the pointer to the result storage */
- addi r4, r1, 112
-
- /* now load up the pointer to the saved gpr registers */
- addi r5, r1, 288
-
- /* now load up the pointer to the saved fpr registers */
- addi r6, r1, 128
-
- /* make the call */
- bl .ffi_closure_helper_DARWIN
- nop
-
- /* now r3 contains the return type */
- /* so use it to look up in a table */
- /* so we know how to deal with each type */
-
- /* look up the proper starting point in table */
- /* by using return type as offset */
- ld r4, LC..60(2) /* get address of jump table */
- sldi r3, r3, 4 /* now multiply return type by 16 */
- ld r0, 240+16(r1) /* load return address */
- add r3, r3, r4 /* add contents of table to table address */
- mtctr r3
- bctr /* jump to it */
-
-/* Each fragment must be exactly 16 bytes long (4 instructions).
- Align to 16 byte boundary for cache and dispatch efficiency. */
- .align 4
-
-L..60:
-/* case FFI_TYPE_VOID */
- mtlr r0
- addi r1, r1, 240
- blr
- nop
-
-/* case FFI_TYPE_INT */
- lwa r3, 112+4(r1)
- mtlr r0
- addi r1, r1, 240
- blr
-
-/* case FFI_TYPE_FLOAT */
- lfs f1, 112+0(r1)
- mtlr r0
- addi r1, r1, 240
- blr
-
-/* case FFI_TYPE_DOUBLE */
- lfd f1, 112+0(r1)
- mtlr r0
- addi r1, r1, 240
- blr
-
-/* case FFI_TYPE_LONGDOUBLE */
- lfd f1, 112+0(r1)
- mtlr r0
- lfd f2, 112+8(r1)
- b L..finish
-
-/* case FFI_TYPE_UINT8 */
- lbz r3, 112+7(r1)
- mtlr r0
- addi r1, r1, 240
- blr
-
-/* case FFI_TYPE_SINT8 */
- lbz r3, 112+7(r1)
- mtlr r0
- extsb r3, r3
- b L..finish
-
-/* case FFI_TYPE_UINT16 */
- lhz r3, 112+6(r1)
- mtlr r0
-L..finish:
- addi r1, r1, 240
- blr
-
-/* case FFI_TYPE_SINT16 */
- lha r3, 112+6(r1)
- mtlr r0
- addi r1, r1, 240
- blr
-
-/* case FFI_TYPE_UINT32 */
- lwz r3, 112+4(r1)
- mtlr r0
- addi r1, r1, 240
- blr
-
-/* case FFI_TYPE_SINT32 */
- lwa r3, 112+4(r1)
- mtlr r0
- addi r1, r1, 240
- blr
-
-/* case FFI_TYPE_UINT64 */
- ld r3, 112+0(r1)
- mtlr r0
- addi r1, r1, 240
- blr
-
-/* case FFI_TYPE_SINT64 */
- ld r3, 112+0(r1)
- mtlr r0
- addi r1, r1, 240
- blr
-
-/* case FFI_TYPE_STRUCT */
- mtlr r0
- addi r1, r1, 240
- blr
- nop
-
-/* case FFI_TYPE_POINTER */
- ld r3, 112+0(r1)
- mtlr r0
- addi r1, r1, 240
- blr
-
-#else /* ! __64BIT__ */
-
- .long .ffi_closure_ASM, TOC[tc0], 0
- .csect .text[PR]
-.ffi_closure_ASM:
-/* we want to build up an area for the parameters passed */
-/* in registers (both floating point and integer) */
-
- /* we store gpr 3 to gpr 10 (aligned to 4)
- in the parents outgoing area */
- stw r3, 24+(0*4)(r1)
- stw r4, 24+(1*4)(r1)
- stw r5, 24+(2*4)(r1)
- stw r6, 24+(3*4)(r1)
- mflr r0
-
- stw r7, 24+(4*4)(r1)
- stw r8, 24+(5*4)(r1)
- stw r9, 24+(6*4)(r1)
- stw r10, 24+(7*4)(r1)
- stw r0, 8(r1)
-
- /* 24 Bytes (Linkage Area) */
- /* 32 Bytes (params) */
- /* 16 Bytes (result) */
- /* 104 Bytes (13*8 from FPR) */
- /* 176 Bytes */
-
- stwu r1, -176(r1) /* skip over caller save area
- keep stack aligned to 16 */
-
- /* next save fpr 1 to fpr 13 (aligned to 8) */
- stfd f1, 72+(0*8)(r1)
- stfd f2, 72+(1*8)(r1)
- stfd f3, 72+(2*8)(r1)
- stfd f4, 72+(3*8)(r1)
- stfd f5, 72+(4*8)(r1)
- stfd f6, 72+(5*8)(r1)
- stfd f7, 72+(6*8)(r1)
- stfd f8, 72+(7*8)(r1)
- stfd f9, 72+(8*8)(r1)
- stfd f10, 72+(9*8)(r1)
- stfd f11, 72+(10*8)(r1)
- stfd f12, 72+(11*8)(r1)
- stfd f13, 72+(12*8)(r1)
-
- /* set up registers for the routine that actually does the work */
- /* get the context pointer from the trampoline */
- mr r3, r11
-
- /* now load up the pointer to the result storage */
- addi r4, r1, 56
-
- /* now load up the pointer to the saved gpr registers */
- addi r5, r1, 200
-
- /* now load up the pointer to the saved fpr registers */
- addi r6, r1, 72
-
- /* make the call */
- bl .ffi_closure_helper_DARWIN
- nop
-
- /* now r3 contains the return type */
- /* so use it to look up in a table */
- /* so we know how to deal with each type */
-
- /* look up the proper starting point in table */
- /* by using return type as offset */
- lwz r4, LC..60(2) /* get address of jump table */
- slwi r3, r3, 4 /* now multiply return type by 4 */
- lwz r0, 176+8(r1) /* load return address */
- add r3, r3, r4 /* add contents of table to table address */
- mtctr r3
- bctr /* jump to it */
-
-/* Each fragment must be exactly 16 bytes long (4 instructions).
- Align to 16 byte boundary for cache and dispatch efficiency. */
- .align 4
-
-L..60:
-/* case FFI_TYPE_VOID */
- mtlr r0
- addi r1, r1, 176
- blr
- nop
-
-/* case FFI_TYPE_INT */
- lwz r3, 56+0(r1)
- mtlr r0
- addi r1, r1, 176
- blr
-
-/* case FFI_TYPE_FLOAT */
- lfs f1, 56+0(r1)
- mtlr r0
- addi r1, r1, 176
- blr
-
-/* case FFI_TYPE_DOUBLE */
- lfd f1, 56+0(r1)
- mtlr r0
- addi r1, r1, 176
- blr
-
-/* case FFI_TYPE_LONGDOUBLE */
- lfd f1, 56+0(r1)
- mtlr r0
- lfd f2, 56+8(r1)
- b L..finish
-
-/* case FFI_TYPE_UINT8 */
- lbz r3, 56+3(r1)
- mtlr r0
- addi r1, r1, 176
- blr
-
-/* case FFI_TYPE_SINT8 */
- lbz r3, 56+3(r1)
- mtlr r0
- extsb r3, r3
- b L..finish
-
-/* case FFI_TYPE_UINT16 */
- lhz r3, 56+2(r1)
- mtlr r0
- addi r1, r1, 176
- blr
-
-/* case FFI_TYPE_SINT16 */
- lha r3, 56+2(r1)
- mtlr r0
- addi r1, r1, 176
- blr
-
-/* case FFI_TYPE_UINT32 */
- lwz r3, 56+0(r1)
- mtlr r0
- addi r1, r1, 176
- blr
-
-/* case FFI_TYPE_SINT32 */
- lwz r3, 56+0(r1)
- mtlr r0
- addi r1, r1, 176
- blr
-
-/* case FFI_TYPE_UINT64 */
- lwz r3, 56+0(r1)
- mtlr r0
- lwz r4, 56+4(r1)
- b L..finish
-
-/* case FFI_TYPE_SINT64 */
- lwz r3, 56+0(r1)
- mtlr r0
- lwz r4, 56+4(r1)
- b L..finish
-
-/* case FFI_TYPE_STRUCT */
- mtlr r0
- addi r1, r1, 176
- blr
- nop
-
-/* case FFI_TYPE_POINTER */
- lwz r3, 56+0(r1)
- mtlr r0
-L..finish:
- addi r1, r1, 176
- blr
-#endif
-/* END(ffi_closure_ASM) */
View
0  .pc/alpha/.timestamp
No changes.
View
4,749 .pc/alpha/ChangeLog
0 additions, 4,749 deletions not shown
View
284 .pc/alpha/src/alpha/ffi.c
@@ -1,284 +0,0 @@
-/* -----------------------------------------------------------------------
- ffi.c - Copyright (c) 1998, 2001, 2007, 2008 Red Hat, Inc.
-
- Alpha Foreign Function Interface
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- ``Software''), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- DEALINGS IN THE SOFTWARE.
- ----------------------------------------------------------------------- */
-
-#include <ffi.h>
-#include <ffi_common.h>
-#include <stdlib.h>
-
-/* Force FFI_TYPE_LONGDOUBLE to be different than FFI_TYPE_DOUBLE;
- all further uses in this file will refer to the 128-bit type. */
-#if defined(__LONG_DOUBLE_128__)
-# if FFI_TYPE_LONGDOUBLE != 4
-# error FFI_TYPE_LONGDOUBLE out of date
-# endif
-#else
-# undef FFI_TYPE_LONGDOUBLE
-# define FFI_TYPE_LONGDOUBLE 4
-#endif
-
-extern void ffi_call_osf(void *, unsigned long, unsigned, void *, void (*)(void))
- FFI_HIDDEN;
-extern void ffi_closure_osf(void) FFI_HIDDEN;
-
-
-ffi_status
-ffi_prep_cif_machdep(ffi_cif *cif)
-{
- /* Adjust cif->bytes to represent a minimum 6 words for the temporary
- register argument loading area. */
- if (cif->bytes < 6*FFI_SIZEOF_ARG)
- cif->bytes = 6*FFI_SIZEOF_ARG;
-
- /* Set the return type flag */
- switch (cif->rtype->type)
- {
- case FFI_TYPE_STRUCT:
- case FFI_TYPE_FLOAT:
- case FFI_TYPE_DOUBLE:
- cif->flags = cif->rtype->type;
- break;
-
- case FFI_TYPE_LONGDOUBLE:
- /* 128-bit long double is returned in memory, like a struct. */
- cif->flags = FFI_TYPE_STRUCT;
- break;
-
- default:
- cif->flags = FFI_TYPE_INT;
- break;
- }
-
- return FFI_OK;
-}
-
-
-void
-ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
-{
- unsigned long *stack, *argp;
- long i, avn;
- ffi_type **arg_types;
-
- /* If the return value is a struct and we don't have a return
- value address then we need to make one. */
- if (rvalue == NULL && cif->flags == FFI_TYPE_STRUCT)
- rvalue = alloca(cif->rtype->size);
-
- /* Allocate the space for the arguments, plus 4 words of temp
- space for ffi_call_osf. */
- argp = stack = alloca(cif->bytes + 4*FFI_SIZEOF_ARG);
-
- if (cif->flags == FFI_TYPE_STRUCT)
- *(void **) argp++ = rvalue;
-
- i = 0;
- avn = cif->nargs;
- arg_types = cif->arg_types;
-
- while (i < avn)
- {
- size_t size = (*arg_types)->size;
-
- switch ((*arg_types)->type)
- {
- case FFI_TYPE_SINT8:
- *(SINT64 *) argp = *(SINT8 *)(* avalue);
- break;
-
- case FFI_TYPE_UINT8:
- *(SINT64 *) argp = *(UINT8 *)(* avalue);
- break;
-
- case FFI_TYPE_SINT16:
- *(SINT64 *) argp = *(SINT16 *)(* avalue);
- break;
-
- case FFI_TYPE_UINT16:
- *(SINT64 *) argp = *(UINT16 *)(* avalue);
- break;
-
- case FFI_TYPE_SINT32:
- case FFI_TYPE_UINT32:
- /* Note that unsigned 32-bit quantities are sign extended. */
- *(SINT64 *) argp = *(SINT32 *)(* avalue);
- break;
-
- case FFI_TYPE_SINT64:
- case FFI_TYPE_UINT64:
- case FFI_TYPE_POINTER:
- *(UINT64 *) argp = *(UINT64 *)(* avalue);
- break;
-
- case FFI_TYPE_FLOAT:
- if (argp - stack < 6)
- {
- /* Note the conversion -- all the fp regs are loaded as
- doubles. The in-register format is the same. */
- *(double *) argp = *(float *)(* avalue);
- }
- else
- *(float *) argp = *(float *)(* avalue);
- break;
-
- case FFI_TYPE_DOUBLE:
- *(double *) argp = *(double *)(* avalue);
- break;
-
- case FFI_TYPE_LONGDOUBLE:
- /* 128-bit long double is passed by reference. */
- *(long double **) argp = (long double *)(* avalue);
- size = sizeof (long double *);
- break;
-
- case FFI_TYPE_STRUCT:
- memcpy(argp, *avalue, (*arg_types)->size);
- break;
-
- default:
- FFI_ASSERT(0);
- }
-
- argp += ALIGN(size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
- i++, arg_types++, avalue++;
- }
-
- ffi_call_osf(stack, cif->bytes, cif->flags, rvalue, fn);
-}
-
-
-ffi_status
-ffi_prep_closure_loc (ffi_closure* closure,
- ffi_cif* cif,
- void (*fun)(ffi_cif*, void*, void**, void*),
- void *user_data,
- void *codeloc)
-{
- unsigned int *tramp;
-
- tramp = (unsigned int *) &closure->tramp[0];
- tramp[0] = 0x47fb0401; /* mov $27,$1 */
- tramp[1] = 0xa77b0010; /* ldq $27,16($27) */
- tramp[2] = 0x6bfb0000; /* jmp $31,($27),0 */
- tramp[3] = 0x47ff041f; /* nop */
- *(void **) &tramp[4] = ffi_closure_osf;
-
- closure->cif = cif;
- closure->fun = fun;
- closure->user_data = user_data;
-
- /* Flush the Icache.
-
- Tru64 UNIX as doesn't understand the imb mnemonic, so use call_pal
- instead, since both Compaq as and gas can handle it.
-
- 0x86 is PAL_imb in Tru64 UNIX <alpha/pal.h>. */
- asm volatile ("call_pal 0x86" : : : "memory");
-
- return FFI_OK;
-}
-
-
-long FFI_HIDDEN
-ffi_closure_osf_inner(ffi_closure *closure, void *rvalue, unsigned long *argp)
-{
- ffi_cif *cif;
- void **avalue;
- ffi_type **arg_types;
- long i, avn, argn;
-
- cif = closure->cif;
- avalue = alloca(cif->nargs * sizeof(void *));
-
- argn = 0;
-
- /* Copy the caller's structure return address to that the closure
- returns the data directly to the caller. */
- if (cif->flags == FFI_TYPE_STRUCT)
- {
- rvalue = (void *) argp[0];
- argn = 1;
- }
-
- i = 0;
- avn = cif->nargs;
- arg_types = cif->arg_types;
-
- /* Grab the addresses of the arguments from the stack frame. */
- while (i < avn)
- {
- size_t size = arg_types[i]->size;
-
- switch (arg_types[i]->type)
- {
- case FFI_TYPE_SINT8:
- case FFI_TYPE_UINT8:
- case FFI_TYPE_SINT16:
- case FFI_TYPE_UINT16:
- case FFI_TYPE_SINT32:
- case FFI_TYPE_UINT32:
- case FFI_TYPE_SINT64:
- case FFI_TYPE_UINT64:
- case FFI_TYPE_POINTER:
- case FFI_TYPE_STRUCT:
- avalue[i] = &argp[argn];
- break;
-
- case FFI_TYPE_FLOAT:
- if (argn < 6)
- {
- /* Floats coming from registers need conversion from double
- back to float format. */
- *(float *)&argp[argn - 6] = *(double *)&argp[argn - 6];
- avalue[i] = &argp[argn - 6];
- }
- else
- avalue[i] = &argp[argn];
- break;
-
- case FFI_TYPE_DOUBLE:
- avalue[i] = &argp[argn - (argn < 6 ? 6 : 0)];
- break;
-
- case FFI_TYPE_LONGDOUBLE:
- /* 128-bit long double is passed by reference. */
- avalue[i] = (long double *) argp[argn];
- size = sizeof (long double *);
- break;
-
- default:
- abort ();
- }
-
- argn += ALIGN(size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
- i++;
- }
-
- /* Invoke the closure. */
- closure->fun (cif, rvalue, avalue, closure->user_data);
-
- /* Tell ffi_closure_osf how to perform return type promotions. */
- return cif->rtype->type;
-}
View
0  .pc/amiga/.timestamp
No changes.
View
4,744 .pc/amiga/ChangeLog
0 additions, 4,744 deletions not shown
View
345 .pc/amiga/README
@@ -1,345 +0,0 @@
-Status
-======
-
-libffi-3.0.11 was released on *****************. Check the libffi web
-page for updates: <URL:http://sourceware.org/libffi/>.
-
-
-What is libffi?
-===============
-
-Compilers for high level languages generate code that follow certain
-conventions. These conventions are necessary, in part, for separate
-compilation to work. One such convention is the "calling
-convention". The "calling convention" is essentially a set of
-assumptions made by the compiler about where function arguments will
-be found on entry to a function. A "calling convention" also specifies
-where the return value for a function is found.
-
-Some programs may not know at the time of compilation what arguments
-are to be passed to a function. For instance, an interpreter may be
-told at run-time about the number and types of arguments used to call
-a given function. Libffi can be used in such programs to provide a
-bridge from the interpreter program to compiled code.
-
-The libffi library provides a portable, high level programming
-interface to various calling conventions. This allows a programmer to
-call any function specified by a call interface description at run
-time.
-
-FFI stands for Foreign Function Interface. A foreign function
-interface is the popular name for the interface that allows code
-written in one language to call code written in another language. The
-libffi library really only provides the lowest, machine dependent
-layer of a fully featured foreign function interface. A layer must
-exist above libffi that handles type conversions for values passed
-between the two languages.
-
-
-Supported Platforms
-===================
-
-Libffi has been ported to many different platforms.
-For specific configuration details and testing status, please
-refer to the wiki page here:
-
- http://www.moxielogic.org/wiki/index.php?title=Libffi_3.0.11
-
-At the time of release, the following basic configurations have been
-tested:
-
-|--------------+------------------|
-| Architecture | Operating System |
-|--------------+------------------|
-| Alpha | Linux |
-| Alpha | Tru64 |
-| ARM | Linux |
-| ARM | iOS |
-| AVR32 | Linux |
-| HPPA | HPUX |
-| IA-64 | Linux |
-| M68K | RTEMS |
-| MIPS | IRIX |
-| MIPS | Linux |
-| MIPS | RTEMS |
-| MIPS64 | Linux |
-| PowerPC | Linux |
-| PowerPC | Mac OSX |
-| PowerPC | FreeBSD |
-| PowerPC64 | Linux |
-| S390 | Linux |
-| S390X | Linux |
-| SPARC | Linux |
-| SPARC | Solaris |
-| SPARC64 | Linux |
-| SPARC64 | FreeBSD |
-| X86 | FreeBSD |
-| X86 | Interix |
-| X86 | kFreeBSD |
-| X86 | Linux |
-| X86 | Mac OSX |
-| X86 | OpenBSD |
-| X86 | OS/2 |
-| X86 | Solaris |
-| X86 | Windows/Cygwin |
-| X86 | Windows/MingW |
-| X86-64 | FreeBSD |
-| X86-64 | Linux |
-| X86-64 | OpenBSD |
-| X86-64 | Windows/MingW |
-|--------------+------------------|
-
-Please send additional platform test results to
-libffi-discuss@sourceware.org and feel free to update the wiki page
-above.
-
-Installing libffi
-=================
-
-First you must configure the distribution for your particular
-system. Go to the directory you wish to build libffi in and run the
-"configure" program found in the root directory of the libffi source
-distribution.
-
-You may want to tell configure where to install the libffi library and
-header files. To do that, use the --prefix configure switch. Libffi
-will install under /usr/local by default.
-
-If you want to enable extra run-time debugging checks use the the
---enable-debug configure switch. This is useful when your program dies
-mysteriously while using libffi.
-
-Another useful configure switch is --enable-purify-safety. Using this
-will add some extra code which will suppress certain warnings when you
-are using Purify with libffi. Only use this switch when using
-Purify, as it will slow down the library.
-
-It's also possible to build libffi on Windows platforms with
-Microsoft's Visual C++ compiler. In this case, use the msvcc.sh
-wrapper script during configuration like so:
-
-path/to/configure CC=path/to/msvcc.sh LD=link CPP=\"cl -nologo -EP\"
-
-For 64-bit Windows builds, use CC="path/to/msvcc.sh -m64".
-You may also need to specify --build appropriately. When building with MSVC
-under a MingW environment, you may need to remove the line in configure
-that sets 'fix_srcfile_path' to a 'cygpath' command. ('cygpath' is not
-present in MingW, and is not required when using MingW-style paths.)
-
-For iOS builds, refer to the build-ios.sh script for guidance.
-
-Configure has many other options. Use "configure --help" to see them all.
-
-Once configure has finished, type "make". Note that you must be using
-GNU make. You can ftp GNU make from prep.ai.mit.edu:/pub/gnu.
-
-To ensure that libffi is working as advertised, type "make check".
-This will require that you have DejaGNU installed.
-
-To install the library and header files, type "make install".
-
-
-History
-=======
-
-See the ChangeLog files for details.
-
-3.0.11 MMM-DD-YY
- ??????????
-
-3.0.10 Aug-23-11
- Add support for Apple's iOS.
- Add support for ARM VFP ABI.
- Add RTEMS support for MIPS and M68K.
- Fix instruction cache clearing problems on
- ARM and SPARC.
- Fix the N64 build on mips-sgi-irix6.5.
- Enable builds with Microsoft's compiler.
- Enable x86 builds with Oracle's Solaris compiler.
- Fix support for calling code compiled with Oracle's Sparc
- Solaris compiler.
- Testsuite fixes for Tru64 Unix.
- Additional platform support.
-
-3.0.9 Dec-31-09
- Add AVR32 and win64 ports. Add ARM softfp support.
- Many fixes for AIX, Solaris, HP-UX, *BSD.
- Several PowerPC and x86-64 bug fixes.
- Build DLL for windows.
-
-3.0.8 Dec-19-08
- Add *BSD, BeOS, and PA-Linux support.
-
-3.0.7 Nov-11-08
- Fix for ppc FreeBSD.
- (thanks to Andreas Tobler)
-
-3.0.6 Jul-17-08
- Fix for closures on sh.
- Mark the sh/sh64 stack as non-executable.
- (both thanks to Kaz Kojima)
-
-3.0.5 Apr-3-08
- Fix libffi.pc file.
- Fix #define ARM for IcedTea users.
- Fix x86 closure bug.
-
-3.0.4 Feb-24-08
- Fix x86 OpenBSD configury.
-
-3.0.3 Feb-22-08
- Enable x86 OpenBSD thanks to Thomas Heller, and
- x86-64 FreeBSD thanks to Björn König and Andreas Tobler.
- Clean up test instruction in README.
-
-3.0.2 Feb-21-08
- Improved x86 FreeBSD support.
- Thanks to Björn König.
-
-3.0.1 Feb-15-08
- Fix instruction cache flushing bug on MIPS.
- Thanks to David Daney.
-
-3.0.0 Feb-15-08
- Many changes, mostly thanks to the GCC project.
- Cygnus Solutions is now Red Hat.
-
- [10 years go by...]
-
-1.20 Oct-5-98
- Raffaele Sena produces ARM port.
-
-1.19 Oct-5-98
- Fixed x86 long double and long long return support.
- m68k bug fixes from Andreas Schwab.
- Patch for DU assembler compatibility for the Alpha from Richard
- Henderson.
-
-1.18 Apr-17-98
- Bug fixes and MIPS configuration changes.
-
-1.17 Feb-24-98
- Bug fixes and m68k port from Andreas Schwab. PowerPC port from
- Geoffrey Keating. Various bug x86, Sparc and MIPS bug fixes.
-
-1.16 Feb-11-98
- Richard Henderson produces Alpha port.
-
-1.15 Dec-4-97
- Fixed an n32 ABI bug. New libtool, auto* support.
-
-1.14 May-13-97
- libtool is now used to generate shared and static libraries.
- Fixed a minor portability problem reported by Russ McManus
- <mcmanr@eq.gs.com>.
-
-1.13 Dec-2-96
- Added --enable-purify-safety to keep Purify from complaining
- about certain low level code.
- Sparc fix for calling functions with < 6 args.
- Linux x86 a.out fix.
-
-1.12 Nov-22-96
- Added missing ffi_type_void, needed for supporting void return
- types. Fixed test case for non MIPS machines. Cygnus Support
- is now Cygnus Solutions.
-
-1.11 Oct-30-96
- Added notes about GNU make.
-
-1.10 Oct-29-96
- Added configuration fix for non GNU compilers.
-
-1.09 Oct-29-96
- Added --enable-debug configure switch. Clean-ups based on LCLint
- feedback. ffi_mips.h is always installed. Many configuration
- fixes. Fixed ffitest.c for sparc builds.
-
-1.08 Oct-15-96
- Fixed n32 problem. Many clean-ups.
-
-1.07 Oct-14-96
- Gordon Irlam rewrites v8.S again. Bug fixes.
-
-1.06 Oct-14-96
- Gordon Irlam improved the sparc port.
-
-1.05 Oct-14-96
- Interface changes based on feedback.
-
-1.04 Oct-11-96
- Sparc port complete (modulo struct passing bug).
-
-1.03 Oct-10-96
- Passing struct args, and returning struct values works for
- all architectures/calling conventions. Expanded tests.
-
-1.02 Oct-9-96
- Added SGI n32 support. Fixed bugs in both o32 and Linux support.
- Added "make test".
-
-1.01 Oct-8-96
- Fixed float passing bug in mips version. Restructured some
- of the code. Builds cleanly with SGI tools.
-
-1.00 Oct-7-96
- First release. No public announcement.
-
-
-Authors & Credits
-=================
-
-libffi was originally written by Anthony Green <green@redhat.com>.
-
-The developers of the GNU Compiler Collection project have made
-innumerable valuable contributions. See the ChangeLog file for
-details.
-
-Some of the ideas behind libffi were inspired by Gianni Mariani's free
-gencall library for Silicon Graphics machines.
-
-The closure mechanism was designed and implemented by Kresten Krab
-Thorup.
-
-Major processor architecture ports were contributed by the following
-developers:
-
-alpha Richard Henderson
-arm Raffaele Sena
-cris Simon Posnjak, Hans-Peter Nilsson
-frv Anthony Green
-ia64 Hans Boehm
-m32r Kazuhiro Inaoka
-m68k Andreas Schwab
-mips Anthony Green, Casey Marshall
-mips64 David Daney
-pa Randolph Chung, Dave Anglin, Andreas Tobler
-powerpc Geoffrey Keating, Andreas Tobler,
- David Edelsohn, John Hornkvist
-powerpc64 Jakub Jelinek
-s390 Gerhard Tonn, Ulrich Weigand
-sh Kaz Kojima
-sh64 Kaz Kojima
-sparc Anthony Green, Gordon Irlam
-x86 Anthony Green, Jon Beniston
-x86-64 Bo Thorsen
-
-Jesper Skov and Andrew Haley both did more than their fair share of
-stepping through the code and tracking down bugs.
-
-Thanks also to Tom Tromey for bug fixes, documentation and
-configuration help.
-
-Thanks to Jim Blandy, who provided some useful feedback on the libffi
-interface.
-
-Andreas Tobler has done a tremendous amount of work on the testsuite.
-
-Alex Oliva solved the executable page problem for SElinux.
-
-The list above is almost certainly incomplete and inaccurate. I'm
-happy to make corrections or additions upon request.
-
-If you have a problem, or have found a bug, please send a note to the
-author at green@moxielogic.com, or the project mailing list at
-libffi-discuss@sourceware.org.
View
16,062 .pc/amiga/configure
0 additions, 16,062 deletions not shown
View
499 .pc/amiga/configure.ac
@@ -1,499 +0,0 @@
-dnl Process this with autoconf to create configure
-
-AC_PREREQ(2.63)
-
-AC_INIT([libffi], [3.0.11-rc2], [http://github.com/atgreen/libffi/issues])
-AC_CONFIG_HEADERS([fficonfig.h])
-
-AC_CANONICAL_SYSTEM
-target_alias=${target_alias-$host_alias}
-
-. ${srcdir}/configure.host
-
-AX_ENABLE_BUILDDIR
-
-AM_INIT_AUTOMAKE
-
-# The same as in boehm-gc and libstdc++. Have to borrow it from there.
-# We must force CC to /not/ be precious variables; otherwise
-# the wrong, non-multilib-adjusted value will be used in multilibs.
-# As a side effect, we have to subst CFLAGS ourselves.
-# Also save and restore CFLAGS, since AC_PROG_CC will come up with
-# defaults of its own if none are provided.
-
-m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
-m4_define([_AC_ARG_VAR_PRECIOUS],[])
-save_CFLAGS=$CFLAGS
-AC_PROG_CC
-CFLAGS=$save_CFLAGS
-m4_undefine([_AC_ARG_VAR_PRECIOUS])
-m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
-
-AC_SUBST(CFLAGS)
-
-AM_PROG_AS
-AM_PROG_CC_C_O
-AC_PROG_LIBTOOL
-AC_CONFIG_MACRO_DIR([m4])
-
-AX_CC_MAXOPT
-AX_CFLAGS_WARN_ALL
-if test "x$GCC" = "xyes"; then
- CFLAGS="$CFLAGS -fexceptions"
-fi
-
-AM_MAINTAINER_MODE
-
-AC_CHECK_HEADERS(sys/mman.h)
-AC_CHECK_FUNCS(mmap)
-AC_FUNC_MMAP_BLACKLIST
-
-dnl The -no-testsuite modules omit the test subdir.
-AM_CONDITIONAL(TESTSUBDIR, test -d $srcdir/testsuite)
-
-TARGETDIR="unknown"
-case "$host" in
- alpha*-*-*)
- TARGET=ALPHA; TARGETDIR=alpha;
- # Support 128-bit long double, changeable via command-line switch.
- HAVE_LONG_DOUBLE='defined(__LONG_DOUBLE_128__)'
- ;;
-
- arm*-*-*)
- TARGET=ARM; TARGETDIR=arm
- ;;
-
- amd64-*-freebsd* | amd64-*-openbsd*)
- TARGET=X86_64; TARGETDIR=x86
- ;;
-
- amd64-*-freebsd*)
- TARGET=X86_64; TARGETDIR=x86
- ;;
-
- avr32*-*-*)
- TARGET=AVR32; TARGETDIR=avr32
- ;;
-
- cris-*-*)
- TARGET=LIBFFI_CRIS; TARGETDIR=cris
- ;;
-
- frv-*-*)
- TARGET=FRV; TARGETDIR=frv
- ;;
-
- hppa*-*-linux* | parisc*-*-linux* | hppa*-*-openbsd*)
- TARGET=PA_LINUX; TARGETDIR=pa
- ;;
- hppa*64-*-hpux*)
- TARGET=PA64_HPUX; TARGETDIR=pa
- ;;
- hppa*-*-hpux*)
- TARGET=PA_HPUX; TARGETDIR=pa
- ;;
-
- i?86-*-freebsd* | i?86-*-openbsd*)
- TARGET=X86_FREEBSD; TARGETDIR=x86
- ;;
- i?86-win32* | i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix*)
- TARGET=X86_WIN32; TARGETDIR=x86
- # All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
- # We must also check with_cross_host to decide if this is a native
- # or cross-build and select where to install dlls appropriately.
- if test -n "$with_cross_host" &&
- test x"$with_cross_host" != x"no"; then
- AM_LTLDFLAGS='-no-undefined -bindir "$(toolexeclibdir)"';
- else
- AM_LTLDFLAGS='-no-undefined -bindir "$(bindir)"';
- fi
- ;;
- i?86-*-darwin*)
- TARGET=X86_DARWIN; TARGETDIR=x86
- ;;
- i?86-*-solaris2.1[[0-9]]*)
- TARGET=X86_64; TARGETDIR=x86
- ;;
- i?86-*-*)
- TARGET=X86_64; TARGETDIR=x86
- ;;
-
- ia64*-*-*)