3.0.9rc8
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
stand-alone
|
||||
avr32
|
||||
snow-leopard
|
||||
sgi-mips
|
||||
fix-docs
|
||||
fix-huge_struct-test
|
||||
windows
|
||||
undefine_AC_ARG_VAR_PRECIOUS
|
||||
powerpc-fixes
|
||||
fix-huge_struct-on-solaris
|
||||
|
||||
@@ -1,574 +0,0 @@
|
||||
2009-06-16 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* testsuite/libffi.call/cls_align_sint64.c,
|
||||
testsuite/libffi.call/cls_align_uint64.c,
|
||||
testsuite/libffi.call/cls_longdouble_va.c,
|
||||
testsuite/libffi.call/cls_ulonglong.c,
|
||||
testsuite/libffi.call/return_ll1.c,
|
||||
testsuite/libffi.call/stret_medium2.c: Fix printf format
|
||||
specifiers.
|
||||
* testsuite/libffi.call/huge_struct.c: Ad x86 XFAILs.
|
||||
* testsuite/libffi.call/float2.c: Fix dg-excess-errors.
|
||||
* testsuite/libffi.call/ffitest.h,
|
||||
testsuite/libffi.special/ffitestcxx.h (PRIdLL, PRIuLL): Define.
|
||||
|
||||
2009-06-12 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* testsuite/libffi.call/cls_align_sint64.c,
|
||||
testsuite/libffi.call/cls_align_uint64.c,
|
||||
testsuite/libffi.call/cls_ulonglong.c,
|
||||
testsuite/libffi.call/return_ll1.c,
|
||||
testsuite/libffi.call/stret_medium2.c: Fix printf format
|
||||
specifiers.
|
||||
testsuite/libffi.special/unwindtest.cc: include stdint.h.
|
||||
|
||||
2009-06-11 Timothy Wall <twall@users.sf.net>
|
||||
|
||||
* Makefile.am,
|
||||
configure.ac,
|
||||
include/ffi.h.in,
|
||||
include/ffi_common.h,
|
||||
src/closures.c,
|
||||
src/dlmalloc.c,
|
||||
src/x86/ffi.c,
|
||||
src/x86/ffitarget.h,
|
||||
src/x86/win64.S (new),
|
||||
README: Added win64 support (mingw or MSVC)
|
||||
* Makefile.in,
|
||||
include/Makefile.in,
|
||||
man/Makefile.in,
|
||||
testsuite/Makefile.in,
|
||||
configure,
|
||||
aclocal.m4: Regenerated
|
||||
* ltcf-c.sh: properly escape cygwin/w32 path
|
||||
* man/ffi_call.3: Clarify size requirements for return value.
|
||||
* src/x86/ffi64.c: Fix filename in comment.
|
||||
* src/x86/win32.S: Remove unused extern.
|
||||
|
||||
* testsuite/libffi.call/closure_fn0.c,
|
||||
testsuite/libffi.call/closure_fn1.c,
|
||||
testsuite/libffi.call/closure_fn2.c,
|
||||
testsuite/libffi.call/closure_fn3.c,
|
||||
testsuite/libffi.call/closure_fn4.c,
|
||||
testsuite/libffi.call/closure_fn5.c,
|
||||
testsuite/libffi.call/closure_fn6.c,
|
||||
testsuite/libffi.call/closure_stdcall.c,
|
||||
testsuite/libffi.call/cls_12byte.c,
|
||||
testsuite/libffi.call/cls_16byte.c,
|
||||
testsuite/libffi.call/cls_18byte.c,
|
||||
testsuite/libffi.call/cls_19byte.c,
|
||||
testsuite/libffi.call/cls_1_1byte.c,
|
||||
testsuite/libffi.call/cls_20byte.c,
|
||||
testsuite/libffi.call/cls_20byte1.c,
|
||||
testsuite/libffi.call/cls_24byte.c,
|
||||
testsuite/libffi.call/cls_2byte.c,
|
||||
testsuite/libffi.call/cls_3_1byte.c,
|
||||
testsuite/libffi.call/cls_3byte1.c,
|
||||
testsuite/libffi.call/cls_3byte2.c,
|
||||
testsuite/libffi.call/cls_4_1byte.c,
|
||||
testsuite/libffi.call/cls_4byte.c,
|
||||
testsuite/libffi.call/cls_5_1_byte.c,
|
||||
testsuite/libffi.call/cls_5byte.c,
|
||||
testsuite/libffi.call/cls_64byte.c,
|
||||
testsuite/libffi.call/cls_6_1_byte.c,
|
||||
testsuite/libffi.call/cls_6byte.c,
|
||||
testsuite/libffi.call/cls_7_1_byte.c,
|
||||
testsuite/libffi.call/cls_7byte.c,
|
||||
testsuite/libffi.call/cls_8byte.c,
|
||||
testsuite/libffi.call/cls_9byte1.c,
|
||||
testsuite/libffi.call/cls_9byte2.c,
|
||||
testsuite/libffi.call/cls_align_double.c,
|
||||
testsuite/libffi.call/cls_align_float.c,
|
||||
testsuite/libffi.call/cls_align_longdouble.c,
|
||||
testsuite/libffi.call/cls_align_longdouble_split.c,
|
||||
testsuite/libffi.call/cls_align_longdouble_split2.c,
|
||||
testsuite/libffi.call/cls_align_pointer.c,
|
||||
testsuite/libffi.call/cls_align_sint16.c,
|
||||
testsuite/libffi.call/cls_align_sint32.c,
|
||||
testsuite/libffi.call/cls_align_sint64.c,
|
||||
testsuite/libffi.call/cls_align_uint16.c,
|
||||
testsuite/libffi.call/cls_align_uint32.c,
|
||||
testsuite/libffi.call/cls_align_uint64.c,
|
||||
testsuite/libffi.call/cls_dbls_struct.c,
|
||||
testsuite/libffi.call/cls_double.c,
|
||||
testsuite/libffi.call/cls_double_va.c,
|
||||
testsuite/libffi.call/cls_float.c,
|
||||
testsuite/libffi.call/cls_longdouble.c,
|
||||
testsuite/libffi.call/cls_longdouble_va.c,
|
||||
testsuite/libffi.call/cls_multi_schar.c,
|
||||
testsuite/libffi.call/cls_multi_sshort.c,
|
||||
testsuite/libffi.call/cls_multi_sshortchar.c,
|
||||
testsuite/libffi.call/cls_multi_uchar.c,
|
||||
testsuite/libffi.call/cls_multi_ushort.c,
|
||||
testsuite/libffi.call/cls_multi_ushortchar.c,
|
||||
testsuite/libffi.call/cls_pointer.c,
|
||||
testsuite/libffi.call/cls_pointer_stack.c,
|
||||
testsuite/libffi.call/cls_schar.c,
|
||||
testsuite/libffi.call/cls_sint.c,
|
||||
testsuite/libffi.call/cls_sshort.c,
|
||||
testsuite/libffi.call/cls_uchar.c,
|
||||
testsuite/libffi.call/cls_uint.c,
|
||||
testsuite/libffi.call/cls_ulonglong.c,
|
||||
testsuite/libffi.call/cls_ushort.c,
|
||||
testsuite/libffi.call/err_bad_abi.c,
|
||||
testsuite/libffi.call/err_bad_typedef.c,
|
||||
testsuite/libffi.call/float2.c,
|
||||
testsuite/libffi.call/huge_struct.c,
|
||||
testsuite/libffi.call/nested_struct.c,
|
||||
testsuite/libffi.call/nested_struct1.c,
|
||||
testsuite/libffi.call/nested_struct10.c,
|
||||
testsuite/libffi.call/nested_struct2.c,
|
||||
testsuite/libffi.call/nested_struct3.c,
|
||||
testsuite/libffi.call/nested_struct4.c,
|
||||
testsuite/libffi.call/nested_struct5.c,
|
||||
testsuite/libffi.call/nested_struct6.c,
|
||||
testsuite/libffi.call/nested_struct7.c,
|
||||
testsuite/libffi.call/nested_struct8.c,
|
||||
testsuite/libffi.call/nested_struct9.c,
|
||||
testsuite/libffi.call/problem1.c,
|
||||
testsuite/libffi.call/return_ldl.c,
|
||||
testsuite/libffi.call/return_ll1.c,
|
||||
testsuite/libffi.call/stret_large.c,
|
||||
testsuite/libffi.call/stret_large2.c,
|
||||
testsuite/libffi.call/stret_medium.c,
|
||||
testsuite/libffi.call/stret_medium2.c,
|
||||
testsuite/libffi.special/unwindtest.cc: use ffi_closure_alloc instead
|
||||
of checking for MMAP. Use intptr_t instead of long casts.
|
||||
|
||||
2009-06-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* src/powerpc/ffitarget.h: Fix misapplied merge from gcc.
|
||||
|
||||
2009-06-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* src/mips/o32.S,
|
||||
src/mips/n32.S: Fix licence formatting.
|
||||
|
||||
2009-06-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* src/x86/darwin.S: Fix licence formatting.
|
||||
src/x86/win32.S: Likewise.
|
||||
src/sh64/sysv.S: Likewise.
|
||||
src/sh/sysv.S: Likewise.
|
||||
|
||||
2009-06-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* src/sh64/ffi.c: Remove lint directives. Was missing from merge
|
||||
of Andreas Tobler's patch from 2006-04-22.
|
||||
|
||||
2009-06-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* src/sh/ffi.c: Apply missing hunk from Alexandre Oliva's patch of
|
||||
2007-03-07.
|
||||
|
||||
2008-12-26 Timothy Wall <twall@users.sf.net>
|
||||
|
||||
* testsuite/libffi.call/cls_longdouble.c,
|
||||
testsuite/libffi.call/cls_longdouble_va.c,
|
||||
testsuite/libffi.call/cls_align_longdouble.c,
|
||||
testsuite/libffi.call/cls_align_longdouble_split.c,
|
||||
testsuite/libffi.call/cls_align_longdouble_split2.c: mark expected
|
||||
failures on x86_64 cygwin/mingw.
|
||||
|
||||
2008-12-22 Timothy Wall <twall@users.sf.net>
|
||||
|
||||
* testsuite/libffi.call/closure_fn0.c,
|
||||
testsuite/libffi.call/closure_fn1.c,
|
||||
testsuite/libffi.call/closure_fn2.c,
|
||||
testsuite/libffi.call/closure_fn3.c,
|
||||
testsuite/libffi.call/closure_fn4.c,
|
||||
testsuite/libffi.call/closure_fn5.c,
|
||||
testsuite/libffi.call/closure_fn6.c,
|
||||
testsuite/libffi.call/closure_loc_fn0.c,
|
||||
testsuite/libffi.call/closure_stdcall.c,
|
||||
testsuite/libffi.call/cls_align_pointer.c,
|
||||
testsuite/libffi.call/cls_pointer.c,
|
||||
testsuite/libffi.call/cls_pointer_stack.c: use portable cast from
|
||||
pointer to integer (intptr_t).
|
||||
* testsuite/libffi.call/cls_longdouble.c: disable for win64.
|
||||
|
||||
2008-12-19 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 3.0.8.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* libtool-version: Increment revision.
|
||||
* README: Update for new release.
|
||||
|
||||
2008-11-11 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 3.0.7.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* libtool-version: Increment revision.
|
||||
* README: Update for new release.
|
||||
|
||||
2008-08-25 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* src/powerpc/ffitarget.h (ffi_abi): Add FFI_LINUX and
|
||||
FFI_LINUX_SOFT_FLOAT to the POWERPC_FREEBSD enum.
|
||||
Add note about flag bits used for FFI_SYSV_TYPE_SMALL_STRUCT.
|
||||
Adjust copyright notice.
|
||||
* src/powerpc/ffi.c: Add two new flags to indicate if we have one
|
||||
register or two register to use for FFI_SYSV structs.
|
||||
(ffi_prep_cif_machdep): Pass the right register flag introduced above.
|
||||
(ffi_closure_helper_SYSV): Fix the return type for
|
||||
FFI_SYSV_TYPE_SMALL_STRUCT. Comment.
|
||||
Adjust copyright notice.
|
||||
|
||||
2008-07-24 Anthony Green <green@redhat.com>
|
||||
|
||||
* testsuite/libffi.call/cls_dbls_struct.c,
|
||||
testsuite/libffi.call/cls_double_va.c,
|
||||
testsuite/libffi.call/cls_longdouble.c,
|
||||
testsuite/libffi.call/cls_longdouble_va.c,
|
||||
testsuite/libffi.call/cls_pointer.c,
|
||||
testsuite/libffi.call/cls_pointer_stack.c,
|
||||
testsuite/libffi.call/err_bad_abi.c: Clean up failures from
|
||||
compiler warnings.
|
||||
|
||||
2008-07-17 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 3.0.6.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* libtool-version: Increment revision. Add documentation.
|
||||
* README: Update for new release.
|
||||
|
||||
2008-07-16 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||
|
||||
* src/sh/ffi.c (ffi_prep_closure_loc): Turn INSN into an unsigned
|
||||
int.
|
||||
|
||||
2008-07-16 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||
|
||||
* src/sh/sysv.S: Add .note.GNU-stack on Linux.
|
||||
* src/sh64/sysv.S: Likewise.
|
||||
|
||||
2008-04-03 Anthony Green <green@redhat.com>
|
||||
|
||||
* libffi.pc.in (Libs): Add -L${libdir}.
|
||||
* configure.ac: Bump version to 3.0.5.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* libtool-version: Increment revision.
|
||||
* README: Update for new release.
|
||||
|
||||
2008-04-03 Anthony Green <green@redhat.com>
|
||||
Xerces Ranby <xerxes@zafena.se>
|
||||
|
||||
* include/ffi.h.in: Wrap definition of target architecture to
|
||||
protect from double definitions.
|
||||
|
||||
2008-03-22 Moriyoshi Koizumi <moriyoshi@gmail.com>
|
||||
|
||||
* src/x86/ffi.c (ffi_prep_closure_loc): Fix for bug revealed in
|
||||
closure_loc_fn0.c.
|
||||
* testsuite/libffi.call/closure_loc_fn0.c (closure_loc_test_fn0):
|
||||
New test.
|
||||
|
||||
2008-03-04 Anthony Green <green@redhat.com>
|
||||
Blake Chaffin
|
||||
hos@tamanegi.org
|
||||
|
||||
* testsuite/libffi.call/cls_align_longdouble_split2.c
|
||||
testsuite/libffi.call/cls_align_longdouble_split.c
|
||||
testsuite/libffi.call/cls_dbls_struct.c
|
||||
testsuite/libffi.call/cls_double_va.c
|
||||
testsuite/libffi.call/cls_longdouble.c
|
||||
testsuite/libffi.call/cls_longdouble_va.c
|
||||
testsuite/libffi.call/cls_pointer.c
|
||||
testsuite/libffi.call/cls_pointer_stack.c
|
||||
testsuite/libffi.call/err_bad_abi.c
|
||||
testsuite/libffi.call/err_bad_typedef.c
|
||||
testsuite/libffi.call/huge_struct.c
|
||||
testsuite/libffi.call/stret_large2.c
|
||||
testsuite/libffi.call/stret_large.c
|
||||
testsuite/libffi.call/stret_medium2.c
|
||||
testsuite/libffi.call/stret_medium.c: New tests from Apple.
|
||||
|
||||
2008-02-26 Jakub Jelinek <jakub@redhat.com>
|
||||
Anthony Green <green@redhat.com>
|
||||
|
||||
* src/alpha/osf.S: Add .note.GNU-stack on Linux.
|
||||
* src/s390/sysv.S: Likewise.
|
||||
* src/powerpc/linux64.S: Likewise.
|
||||
* src/powerpc/linux64_closure.S: Likewise.
|
||||
* src/powerpc/ppc_closure.S: Likewise.
|
||||
* src/powerpc/sysv.S: Likewise.
|
||||
* src/x86/unix64.S: Likewise.
|
||||
* src/x86/sysv.S: Likewise.
|
||||
* src/sparc/v8.S: Likewise.
|
||||
* src/sparc/v9.S: Likewise.
|
||||
* src/m68k/sysv.S: Likewise.
|
||||
* src/ia64/unix.S: Likewise.
|
||||
* src/arm/sysv.S: Likewise.
|
||||
|
||||
2008-02-26 Anthony Green <green@redhat.com>
|
||||
Thomas Heller <theller@ctypes.org>
|
||||
|
||||
* src/x86/ffi.c (ffi_closure_SYSV_inner): Change C++ comment to C
|
||||
comment.
|
||||
|
||||
2008-02-26 Anthony Green <green@redhat.org>
|
||||
Thomas Heller <theller@ctypes.org>
|
||||
|
||||
* include/ffi.h.in: Change void (*)() to void (*)(void).
|
||||
|
||||
2008-02-26 Anthony Green <green@redhat.org>
|
||||
Thomas Heller <theller@ctypes.org>
|
||||
|
||||
* src/alpha/ffi.c: Change void (*)() to void (*)(void).
|
||||
src/alpha/osf.S, src/arm/ffi.c, src/frv/ffi.c, src/ia64/ffi.c,
|
||||
src/ia64/unix.S, src/java_raw_api.c, src/m32r/ffi.c,
|
||||
src/mips/ffi.c, src/pa/ffi.c, src/pa/hpux32.S, src/pa/linux.S,
|
||||
src/powerpc/ffi.c, src/powerpc/ffi_darwin.c, src/raw_api.c,
|
||||
src/s390/ffi.c, src/sh/ffi.c, src/sh64/ffi.c, src/sparc/ffi.c,
|
||||
src/x86/ffi.c, src/x86/unix64.S, src/x86/darwin64.S,
|
||||
src/x86/ffi64.c: Ditto.
|
||||
|
||||
2008-02-24 Anthony Green <green@redhat.org>
|
||||
|
||||
* configure.ac: Accept openbsd*, not just openbsd.
|
||||
Bump version to 3.0.4.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* libtool-version: Increment revision.
|
||||
* README: Update for new release.
|
||||
|
||||
2008-02-22 Anthony Green <green@redhat.com>
|
||||
|
||||
* README: Clean up list of tested platforms.
|
||||
|
||||
2008-02-22 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 3.0.3.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* libtool-version: Increment revision.
|
||||
* README: Update for new release. Clean up test docs.
|
||||
|
||||
2008-02-22 Bjoern Koenig <bkoenig@alpha-tierchen.de>
|
||||
Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* configure.ac: Add amd64-*-freebsd* target.
|
||||
* configure: Regenerate.
|
||||
|
||||
2008-02-22 Thomas Heller <theller@ctypes.org>
|
||||
|
||||
* configure.ac: Add x86 OpenBSD support.
|
||||
* configure: Rebuilt.
|
||||
|
||||
2008-02-21 Thomas Heller <theller@ctypes.org>
|
||||
|
||||
* README: Change "make test" to "make check".
|
||||
|
||||
2008-02-21 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 3.0.2.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* libtool-version: Increment revision.
|
||||
* README: Update for new release.
|
||||
|
||||
2008-02-21 Björn König <bkoenig@alpha-tierchen.de>
|
||||
|
||||
* src/x86/freebsd.S: New file.
|
||||
* configure.ac: Add x86 FreeBSD support.
|
||||
* Makefile.am: Ditto.
|
||||
|
||||
2008-02-15 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 3.0.1.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* libtool-version: Increment revision.
|
||||
* README: Update for new release.
|
||||
|
||||
2008-02-15 David Daney <ddaney@avtrex.com>
|
||||
|
||||
* src/mips/ffi.c: Remove extra '>' from include directive.
|
||||
(ffi_prep_closure_loc): Use clear_location instead of tramp.
|
||||
|
||||
2008-02-15 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 3.0.0.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
|
||||
2008-02-15 David Daney <ddaney@avtrex.com>
|
||||
|
||||
* src/mips/ffi.c (USE__BUILTIN___CLEAR_CACHE):
|
||||
Define (conditionally), and use it to include cachectl.h.
|
||||
(ffi_prep_closure_loc): Fix cache flushing.
|
||||
* src/mips/ffitarget.h (_ABIN32, _ABI64, _ABIO32): Define.
|
||||
|
||||
2008-02-15 Anthony Green <green@redhat.com>
|
||||
|
||||
* man/ffi_call.3, man/ffi_prep_cif.3, man/ffi.3:
|
||||
Update dates and remove all references to ffi_prep_closure.
|
||||
* configure.ac: Bump version to 2.99.9.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
|
||||
2008-02-15 Anthony Green <green@redhat.com>
|
||||
|
||||
* man/ffi_prep_closure.3: Delete.
|
||||
* man/Makefile.am (EXTRA_DIST): Remove ffi_prep_closure.3.
|
||||
(man_MANS): Ditto.
|
||||
* man/Makefile.in: Rebuilt.
|
||||
* configure.ac: Bump version to 2.99.8.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 2.99.7.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* include/ffi.h.in LICENSE src/debug.c src/closures.c
|
||||
src/ffitest.c src/s390/sysv.S src/s390/ffitarget.h
|
||||
src/types.c src/m68k/ffitarget.h src/raw_api.c src/frv/ffi.c
|
||||
src/frv/ffitarget.h src/sh/ffi.c src/sh/sysv.S
|
||||
src/sh/ffitarget.h src/powerpc/ffitarget.h src/pa/ffi.c
|
||||
src/pa/ffitarget.h src/pa/linux.S src/java_raw_api.c
|
||||
src/cris/ffitarget.h src/x86/ffi.c src/x86/sysv.S
|
||||
src/x86/unix64.S src/x86/win32.S src/x86/ffitarget.h
|
||||
src/x86/ffi64.c src/x86/darwin.S src/ia64/ffi.c
|
||||
src/ia64/ffitarget.h src/ia64/ia64_flags.h src/ia64/unix.S
|
||||
src/sparc/ffi.c src/sparc/v9.S src/sparc/ffitarget.h
|
||||
src/sparc/v8.S src/alpha/ffi.c src/alpha/ffitarget.h
|
||||
src/alpha/osf.S src/sh64/ffi.c src/sh64/sysv.S
|
||||
src/sh64/ffitarget.h src/mips/ffi.c src/mips/ffitarget.h
|
||||
src/mips/n32.S src/mips/o32.S src/arm/ffi.c src/arm/sysv.S
|
||||
src/arm/ffitarget.h src/prep_cif.c: Update license text.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* README: Update tested platforms.
|
||||
* configure.ac: Bump version to 2.99.6.
|
||||
* configure: Rebuilt.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 2.99.5.
|
||||
* configure: Rebuilt.
|
||||
* Makefile.am (EXTRA_DIST): Add darwin64.S
|
||||
* Makefile.in: Rebuilt.
|
||||
* testsuite/lib/libffi-dg.exp: Remove libstdc++ bits from GCC tree.
|
||||
* LICENSE: Update WARRANTY.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* libffi.pc.in (libdir): Fix libdir definition.
|
||||
* configure.ac: Bump version to 2.99.4.
|
||||
* configure: Rebuilt.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* README: Update.
|
||||
* libffi.info: New file.
|
||||
* doc/stamp-vti: New file.
|
||||
* configure.ac: Bump version to 2.99.3.
|
||||
* configure: Rebuilt.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* Makefile.am (SUBDIRS): Add man dir.
|
||||
* Makefile.in: Rebuilt.
|
||||
* configure.ac: Create Makefile.
|
||||
* configure: Rebuilt.
|
||||
* man/ffi_call.3 man/ffi_prep_cif.3 man/ffi_prep_closure.3
|
||||
man/Makefile.am man/Makefile.in: New files.
|
||||
|
||||
2008-02-14 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* aclocal.m4, Makefile.in, configure, fficonfig.h.in: Rebuilt.
|
||||
* mdate-sh, texinfo.tex: New files.
|
||||
* Makefile.am (info_TEXINFOS): New variable.
|
||||
* doc/libffi.texi: New file.
|
||||
* doc/version.texi: Likewise.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* Makefile.am (AM_CFLAGS): Don't compile with -D$(TARGET).
|
||||
(lib_LTLIBRARIES): Define.
|
||||
(toolexeclib_LIBRARIES): Undefine.
|
||||
* Makefile.in: Rebuilt.
|
||||
* configure.ac: Reset version to 2.99.1.
|
||||
* configure.in: Rebuilt.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* libffi.pc.in: Use @PACKAGE_NAME@ and @PACKAGE_VERSION@.
|
||||
* configure.ac: Reset version to 2.99.1.
|
||||
* configure.in: Rebuilt.
|
||||
* Makefile.am (EXTRA_DIST): Add ChangeLog.libffi.
|
||||
* Makefile.in: Rebuilt.
|
||||
* LICENSE: Update copyright notice.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* include/Makefile.am (nodist_includes_HEADERS): Define. Don't
|
||||
distribute ffitarget.h or ffi.h from the build include dir.
|
||||
* Makefile.in: Rebuilt.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* include/Makefile.am (includesdir): Install headers under libdir.
|
||||
(pkgconfigdir): Define. Install libffi.pc.
|
||||
* include/Makefile.in: Rebuilt.
|
||||
* libffi.pc.in: Create.
|
||||
* libtool-version: Increment CURRENT
|
||||
* configure.ac: Add libffi.pc.in
|
||||
* configure: Rebuilt.
|
||||
|
||||
2008-02-03 Anthony Green <green@redhat.com>
|
||||
|
||||
* include/Makefile.am (includesdir): Fix header install with
|
||||
DESTDIR.
|
||||
* include/Makefile.in: Rebuilt.
|
||||
|
||||
2008-02-03 Timothy Wall <twall@users.sf.net>
|
||||
|
||||
* src/x86/ffi.c (FFI_INIT_TRAMPOLINE_STDCALL): Calculate jump return
|
||||
offset based on code pointer, not data pointer.
|
||||
|
||||
2008-02-01 Anthony Green <green@redhat.com>
|
||||
|
||||
* include/Makefile.am: Fix header installs.
|
||||
* Makefile.am: Ditto.
|
||||
* include/Makefile.in: Rebuilt.
|
||||
* Makefile.in: Ditto.
|
||||
|
||||
2008-02-01 Anthony Green <green@redhat.com>
|
||||
|
||||
* src/x86/ffi.c (FFI_INIT_TRAMPOLINE_STDCALL,
|
||||
FFI_INIT_TRAMPOLINE): Revert my broken changes to twall's last
|
||||
patch.
|
||||
|
||||
2008-01-31 Anthony Green <green@redhat.com>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Add missing files.
|
||||
* testsuite/Makefile.am: Ditto.
|
||||
* Makefile.in, testsuite/Makefile.in: Rebuilt.
|
||||
|
||||
2008-01-31 Timothy Wall <twall@users.sf.net>
|
||||
|
||||
* testsuite/libffi.call/closure_stdcall.c: Add test for stdcall
|
||||
closures.
|
||||
* src/x86/ffitarget.h: Increase size of trampoline for stdcall
|
||||
closures.
|
||||
* src/x86/win32.S: Add assembly for stdcall closure.
|
||||
* src/x86/ffi.c: Initialize stdcall closure trampoline.
|
||||
|
||||
2008-01-30 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR libffi/34612
|
||||
* src/x86/sysv.S (ffi_closure_SYSV): Pop 4 byte from stack when
|
||||
returning struct.
|
||||
|
||||
* testsuite/libffi.call/call.exp: Add "-O2 -fomit-frame-pointer"
|
||||
tests.
|
||||
|
||||
2008-01-30 Anthony Green <green@redhat.com>
|
||||
|
||||
* Makefile.am, include/Makefile.am: Move headers to
|
||||
libffi_la_SOURCES for new automake.
|
||||
* Makefile.in, include/Makefile.in: Rebuilt.
|
||||
|
||||
* testsuite/lib/wrapper.exp: Copied from gcc tree to allow for
|
||||
execution outside of gcc tree.
|
||||
* testsuite/lib/target-libpath.exp: Ditto.
|
||||
|
||||
* testsuite/lib/libffi-dg.exp: Many changes to allow for execution
|
||||
outside of gcc tree.
|
||||
|
||||
@@ -1,183 +0,0 @@
|
||||
## Process this with automake to create Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign subdir-objects
|
||||
|
||||
SUBDIRS = include testsuite man
|
||||
|
||||
EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \
|
||||
src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \
|
||||
src/arm/ffi.c src/arm/sysv.S src/arm/ffitarget.h \
|
||||
src/cris/ffi.c src/cris/sysv.S src/cris/ffitarget.h \
|
||||
src/ia64/ffi.c src/ia64/ffitarget.h src/ia64/ia64_flags.h \
|
||||
src/ia64/unix.S \
|
||||
src/mips/ffi.c src/mips/n32.S src/mips/o32.S \
|
||||
src/mips/ffitarget.h \
|
||||
src/m32r/ffi.c src/m32r/sysv.S src/m32r/ffitarget.h \
|
||||
src/m68k/ffi.c src/m68k/sysv.S src/m68k/ffitarget.h \
|
||||
src/powerpc/ffi.c src/powerpc/sysv.S \
|
||||
src/powerpc/linux64.S src/powerpc/linux64_closure.S \
|
||||
src/powerpc/ppc_closure.S src/powerpc/asm.h \
|
||||
src/powerpc/aix.S src/powerpc/darwin.S \
|
||||
src/powerpc/aix_closure.S src/powerpc/darwin_closure.S \
|
||||
src/powerpc/ffi_darwin.c src/powerpc/ffitarget.h \
|
||||
src/s390/ffi.c src/s390/sysv.S src/s390/ffitarget.h \
|
||||
src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h \
|
||||
src/sh64/ffi.c src/sh64/sysv.S src/sh64/ffitarget.h \
|
||||
src/sparc/v8.S src/sparc/v9.S src/sparc/ffitarget.h \
|
||||
src/sparc/ffi.c src/x86/darwin64.S \
|
||||
src/x86/ffi.c src/x86/sysv.S src/x86/win32.S src/x86/win64.S \
|
||||
src/x86/darwin.S src/x86/freebsd.S \
|
||||
src/x86/ffi64.c src/x86/unix64.S src/x86/ffitarget.h \
|
||||
src/pa/ffitarget.h src/pa/ffi.c src/pa/linux.S src/pa/hpux32.S \
|
||||
src/frv/ffi.c src/frv/eabi.S src/frv/ffitarget.h src/dlmalloc.c \
|
||||
libtool-version ChangeLog.libffi m4/libtool.m4 \
|
||||
m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4
|
||||
|
||||
info_TEXINFOS = doc/libffi.texi
|
||||
|
||||
## ################################################################
|
||||
|
||||
##
|
||||
## This section is for make and multilib madness.
|
||||
##
|
||||
|
||||
# Work around what appears to be a GNU make bug handling MAKEFLAGS
|
||||
# values defined in terms of make variables, as is the case for CC and
|
||||
# friends when we are called from the top level Makefile.
|
||||
AM_MAKEFLAGS = \
|
||||
"AR_FLAGS=$(AR_FLAGS)" \
|
||||
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
|
||||
"CFLAGS=$(CFLAGS)" \
|
||||
"CXXFLAGS=$(CXXFLAGS)" \
|
||||
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
|
||||
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
|
||||
"INSTALL=$(INSTALL)" \
|
||||
"INSTALL_DATA=$(INSTALL_DATA)" \
|
||||
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
|
||||
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
|
||||
"JC1FLAGS=$(JC1FLAGS)" \
|
||||
"LDFLAGS=$(LDFLAGS)" \
|
||||
"LIBCFLAGS=$(LIBCFLAGS)" \
|
||||
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
|
||||
"MAKE=$(MAKE)" \
|
||||
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
|
||||
"PICFLAG=$(PICFLAG)" \
|
||||
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
|
||||
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
|
||||
"SHELL=$(SHELL)" \
|
||||
"exec_prefix=$(exec_prefix)" \
|
||||
"infodir=$(infodir)" \
|
||||
"libdir=$(libdir)" \
|
||||
"prefix=$(prefix)" \
|
||||
"AR=$(AR)" \
|
||||
"AS=$(AS)" \
|
||||
"CC=$(CC)" \
|
||||
"CXX=$(CXX)" \
|
||||
"LD=$(LD)" \
|
||||
"NM=$(NM)" \
|
||||
"RANLIB=$(RANLIB)" \
|
||||
"DESTDIR=$(DESTDIR)"
|
||||
|
||||
MAKEOVERRIDES=
|
||||
|
||||
ACLOCAL_AMFLAGS=$(ACLOCAL_AMFLAGS) -I m4
|
||||
|
||||
lib_LTLIBRARIES = libffi.la
|
||||
noinst_LTLIBRARIES = libffi_convenience.la
|
||||
|
||||
libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c \
|
||||
src/raw_api.c src/java_raw_api.c src/closures.c
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libffi.pc
|
||||
|
||||
nodist_libffi_la_SOURCES =
|
||||
|
||||
if MIPS
|
||||
nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
|
||||
endif
|
||||
if X86
|
||||
nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S
|
||||
endif
|
||||
if X86_FREEBSD
|
||||
nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/freebsd.S
|
||||
endif
|
||||
if X86_WIN32
|
||||
nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win32.S
|
||||
endif
|
||||
if X86_WIN64
|
||||
nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win64.S
|
||||
endif
|
||||
if X86_DARWIN
|
||||
nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S
|
||||
endif
|
||||
if SPARC
|
||||
nodist_libffi_la_SOURCES += src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
|
||||
endif
|
||||
if ALPHA
|
||||
nodist_libffi_la_SOURCES += src/alpha/ffi.c src/alpha/osf.S
|
||||
endif
|
||||
if IA64
|
||||
nodist_libffi_la_SOURCES += src/ia64/ffi.c src/ia64/unix.S
|
||||
endif
|
||||
if M32R
|
||||
nodist_libffi_la_SOURCES += src/m32r/sysv.S src/m32r/ffi.c
|
||||
endif
|
||||
if M68K
|
||||
nodist_libffi_la_SOURCES += src/m68k/ffi.c src/m68k/sysv.S
|
||||
endif
|
||||
if POWERPC
|
||||
nodist_libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S
|
||||
endif
|
||||
if POWERPC_AIX
|
||||
nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
|
||||
endif
|
||||
if POWERPC_DARWIN
|
||||
nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
|
||||
endif
|
||||
if POWERPC_FREEBSD
|
||||
nodist_libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
|
||||
endif
|
||||
if ARM
|
||||
nodist_libffi_la_SOURCES += src/arm/sysv.S src/arm/ffi.c
|
||||
endif
|
||||
if LIBFFI_CRIS
|
||||
nodist_libffi_la_SOURCES += src/cris/sysv.S src/cris/ffi.c
|
||||
endif
|
||||
if FRV
|
||||
nodist_libffi_la_SOURCES += src/frv/eabi.S src/frv/ffi.c
|
||||
endif
|
||||
if S390
|
||||
nodist_libffi_la_SOURCES += src/s390/sysv.S src/s390/ffi.c
|
||||
endif
|
||||
if X86_64
|
||||
nodist_libffi_la_SOURCES += src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
|
||||
endif
|
||||
if SH
|
||||
nodist_libffi_la_SOURCES += src/sh/sysv.S src/sh/ffi.c
|
||||
endif
|
||||
if SH64
|
||||
nodist_libffi_la_SOURCES += src/sh64/sysv.S src/sh64/ffi.c
|
||||
endif
|
||||
if PA_LINUX
|
||||
nodist_libffi_la_SOURCES += src/pa/linux.S src/pa/ffi.c
|
||||
endif
|
||||
if PA_HPUX
|
||||
nodist_libffi_la_SOURCES += src/pa/hpux32.S src/pa/ffi.c
|
||||
endif
|
||||
|
||||
libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
|
||||
nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
|
||||
|
||||
AM_CFLAGS = -Wall -g -fexceptions
|
||||
|
||||
libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
|
||||
AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
|
||||
AM_CCASFLAGS = $(AM_CPPFLAGS)
|
||||
|
||||
# No install-html or install-pdf support in automake yet
|
||||
.PHONY: install-html install-pdf
|
||||
install-html:
|
||||
install-pdf:
|
||||
|
||||
17247
.pc/avr32/configure
vendored
17247
.pc/avr32/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,389 +0,0 @@
|
||||
dnl Process this with autoconf to create configure
|
||||
|
||||
AC_PREREQ(2.63)
|
||||
|
||||
AC_INIT([libffi], [3.0.9rc7], [http://gcc.gnu.org/bugs.html])
|
||||
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.
|
||||
|
||||
m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
|
||||
m4_define([_AC_ARG_VAR_PRECIOUS],[])
|
||||
AC_PROG_CC
|
||||
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, changable via command-line switch.
|
||||
HAVE_LONG_DOUBLE='defined(__LONG_DOUBLE_128__)'
|
||||
;;
|
||||
|
||||
arm*-*-*)
|
||||
TARGET=ARM; TARGETDIR=arm
|
||||
;;
|
||||
|
||||
amd64-*-freebsd*)
|
||||
TARGET=X86_64; TARGETDIR=x86
|
||||
;;
|
||||
|
||||
amd64-*-freebsd*)
|
||||
TARGET=X86_64; TARGETDIR=x86
|
||||
;;
|
||||
|
||||
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*)
|
||||
TARGET=X86_WIN32; TARGETDIR=x86
|
||||
;;
|
||||
i?86-*-darwin*)
|
||||
TARGET=X86_DARWIN; TARGETDIR=x86
|
||||
;;
|
||||
i?86-*-solaris2.1[[0-9]]*)
|
||||
TARGET=X86_64; TARGETDIR=x86
|
||||
;;
|
||||
i?86-*-*)
|
||||
TARGET=X86; TARGETDIR=x86
|
||||
;;
|
||||
|
||||
ia64*-*-*)
|
||||
TARGET=IA64; TARGETDIR=ia64
|
||||
;;
|
||||
|
||||
m32r*-*-*)
|
||||
TARGET=M32R; TARGETDIR=m32r
|
||||
;;
|
||||
|
||||
m68k-*-*)
|
||||
TARGET=M68K; TARGETDIR=m68k
|
||||
;;
|
||||
|
||||
mips-sgi-irix5.* | mips-sgi-irix6.*)
|
||||
TARGET=MIPS; TARGETDIR=mips
|
||||
;;
|
||||
mips*-*-linux*)
|
||||
TARGET=MIPS; TARGETDIR=mips
|
||||
;;
|
||||
|
||||
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
|
||||
;;
|
||||
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
|
||||
;;
|
||||
|
||||
x86_64-*-*)
|
||||
TARGET=X86_64; TARGETDIR=x86
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(AM_RUNTESTFLAGS)
|
||||
|
||||
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(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(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
|
||||
|
||||
AC_CACHE_CHECK([assembler .cfi pseudo-op support],
|
||||
libffi_cv_as_cfi_pseudo_op, [
|
||||
libffi_cv_as_cfi_pseudo_op=unknown
|
||||
AC_TRY_COMPILE([asm (".cfi_startproc\n\t.cfi_endproc");],,
|
||||
[libffi_cv_as_cfi_pseudo_op=yes],
|
||||
[libffi_cv_as_cfi_pseudo_op=no])
|
||||
])
|
||||
if test "x$libffi_cv_as_cfi_pseudo_op" = xyes; then
|
||||
AC_DEFINE(HAVE_AS_CFI_PSEUDO_OP, 1,
|
||||
[Define if your assembler supports .cfi_* directives.])
|
||||
fi
|
||||
|
||||
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=yes
|
||||
echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s
|
||||
if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
|
||||
libffi_cv_as_x86_pcrel=no
|
||||
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
|
||||
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)
|
||||
|
||||
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)
|
||||
|
||||
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)
|
||||
|
||||
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
|
||||
@@ -1,615 +0,0 @@
|
||||
2009-10-23 Frank Everdij <f.p.x.everdij@tudelft.nl>
|
||||
|
||||
* include/ffi.h.in: Placed '__GNUC__' ifdef around
|
||||
'__attribute__((aligned(8)))' in ffi_closure, fixes compile for
|
||||
IRIX MIPSPro c99.
|
||||
* include/ffi_common.h: Added '__sgi' define to non
|
||||
'__attribute__((__mode__()))' integer typedefs.
|
||||
* src/mips/ffi.c (ffi_call, ffi_closure_mips_inner_O32,
|
||||
ffi_closure_mips_inner_N32): Added 'defined(_MIPSEB)' to BE check.
|
||||
(ffi_closure_mips_inner_O32, ffi_closure_mips_inner_N32): Added
|
||||
FFI_LONGDOUBLE support and alignment(N32 only).
|
||||
* src/mips/ffitarget.h: Corrected '#include <sgidefs.h>' for IRIX and
|
||||
fixed non '__attribute__((__mode__()))' integer typedefs.
|
||||
* src/mips/n32.S: Put '#ifdef linux' around '.abicalls' and '.eh_frame'
|
||||
since they are Linux/GNU Assembler specific.
|
||||
|
||||
2009-12-25 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* fficonfig.h.in: Rebuilt again.
|
||||
* src/closures.c: Remove the FFI_MMAP_EXEC_WRIT definition for
|
||||
Solaris/x86.
|
||||
|
||||
2009-10-27 Abdulaziz Ghuloum <aghuloum@gmail.com>
|
||||
|
||||
* configure.ac (FFI_MMAP_EXEC_WRIT): Define for snow
|
||||
leopard (i?86-apple-darwin10*).
|
||||
* configure: Rebuilt.
|
||||
* fficonfig.h.in: Rebuilt.
|
||||
* src/closures.c (dlmmap): Define version for snow leopard.
|
||||
|
||||
2009-10-05 Bradley Smith <brad@brad-smith.co.uk>
|
||||
|
||||
* configure.ac, Makefile.am, src/avr32/ffi.c,
|
||||
src/avr32/ffitarget.h,
|
||||
src/avr32/sysv.S: Add AVR32 port.
|
||||
* testsuite/libffi.call/cls_dbls_struct.c,
|
||||
testsuite/libffi.call/cls_double_va.c,
|
||||
testsuite/libffi.call/cls_longdouble_va.c,
|
||||
testsuite/libffi.call/huge_struct.c: Mark expected failures on
|
||||
AVR32.
|
||||
|
||||
2009-06-16 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* testsuite/libffi.call/cls_align_sint64.c,
|
||||
testsuite/libffi.call/cls_align_uint64.c,
|
||||
testsuite/libffi.call/cls_longdouble_va.c,
|
||||
testsuite/libffi.call/cls_ulonglong.c,
|
||||
testsuite/libffi.call/return_ll1.c,
|
||||
testsuite/libffi.call/stret_medium2.c: Fix printf format
|
||||
specifiers.
|
||||
* testsuite/libffi.call/huge_struct.c: Ad x86 XFAILs.
|
||||
* testsuite/libffi.call/float2.c: Fix dg-excess-errors.
|
||||
* testsuite/libffi.call/ffitest.h,
|
||||
testsuite/libffi.special/ffitestcxx.h (PRIdLL, PRIuLL): Define.
|
||||
|
||||
2009-06-12 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* testsuite/libffi.call/cls_align_sint64.c,
|
||||
testsuite/libffi.call/cls_align_uint64.c,
|
||||
testsuite/libffi.call/cls_ulonglong.c,
|
||||
testsuite/libffi.call/return_ll1.c,
|
||||
testsuite/libffi.call/stret_medium2.c: Fix printf format
|
||||
specifiers.
|
||||
testsuite/libffi.special/unwindtest.cc: include stdint.h.
|
||||
|
||||
2009-06-11 Timothy Wall <twall@users.sf.net>
|
||||
|
||||
* Makefile.am,
|
||||
configure.ac,
|
||||
include/ffi.h.in,
|
||||
include/ffi_common.h,
|
||||
src/closures.c,
|
||||
src/dlmalloc.c,
|
||||
src/x86/ffi.c,
|
||||
src/x86/ffitarget.h,
|
||||
src/x86/win64.S (new),
|
||||
README: Added win64 support (mingw or MSVC)
|
||||
* Makefile.in,
|
||||
include/Makefile.in,
|
||||
man/Makefile.in,
|
||||
testsuite/Makefile.in,
|
||||
configure,
|
||||
aclocal.m4: Regenerated
|
||||
* ltcf-c.sh: properly escape cygwin/w32 path
|
||||
* man/ffi_call.3: Clarify size requirements for return value.
|
||||
* src/x86/ffi64.c: Fix filename in comment.
|
||||
* src/x86/win32.S: Remove unused extern.
|
||||
|
||||
* testsuite/libffi.call/closure_fn0.c,
|
||||
testsuite/libffi.call/closure_fn1.c,
|
||||
testsuite/libffi.call/closure_fn2.c,
|
||||
testsuite/libffi.call/closure_fn3.c,
|
||||
testsuite/libffi.call/closure_fn4.c,
|
||||
testsuite/libffi.call/closure_fn5.c,
|
||||
testsuite/libffi.call/closure_fn6.c,
|
||||
testsuite/libffi.call/closure_stdcall.c,
|
||||
testsuite/libffi.call/cls_12byte.c,
|
||||
testsuite/libffi.call/cls_16byte.c,
|
||||
testsuite/libffi.call/cls_18byte.c,
|
||||
testsuite/libffi.call/cls_19byte.c,
|
||||
testsuite/libffi.call/cls_1_1byte.c,
|
||||
testsuite/libffi.call/cls_20byte.c,
|
||||
testsuite/libffi.call/cls_20byte1.c,
|
||||
testsuite/libffi.call/cls_24byte.c,
|
||||
testsuite/libffi.call/cls_2byte.c,
|
||||
testsuite/libffi.call/cls_3_1byte.c,
|
||||
testsuite/libffi.call/cls_3byte1.c,
|
||||
testsuite/libffi.call/cls_3byte2.c,
|
||||
testsuite/libffi.call/cls_4_1byte.c,
|
||||
testsuite/libffi.call/cls_4byte.c,
|
||||
testsuite/libffi.call/cls_5_1_byte.c,
|
||||
testsuite/libffi.call/cls_5byte.c,
|
||||
testsuite/libffi.call/cls_64byte.c,
|
||||
testsuite/libffi.call/cls_6_1_byte.c,
|
||||
testsuite/libffi.call/cls_6byte.c,
|
||||
testsuite/libffi.call/cls_7_1_byte.c,
|
||||
testsuite/libffi.call/cls_7byte.c,
|
||||
testsuite/libffi.call/cls_8byte.c,
|
||||
testsuite/libffi.call/cls_9byte1.c,
|
||||
testsuite/libffi.call/cls_9byte2.c,
|
||||
testsuite/libffi.call/cls_align_double.c,
|
||||
testsuite/libffi.call/cls_align_float.c,
|
||||
testsuite/libffi.call/cls_align_longdouble.c,
|
||||
testsuite/libffi.call/cls_align_longdouble_split.c,
|
||||
testsuite/libffi.call/cls_align_longdouble_split2.c,
|
||||
testsuite/libffi.call/cls_align_pointer.c,
|
||||
testsuite/libffi.call/cls_align_sint16.c,
|
||||
testsuite/libffi.call/cls_align_sint32.c,
|
||||
testsuite/libffi.call/cls_align_sint64.c,
|
||||
testsuite/libffi.call/cls_align_uint16.c,
|
||||
testsuite/libffi.call/cls_align_uint32.c,
|
||||
testsuite/libffi.call/cls_align_uint64.c,
|
||||
testsuite/libffi.call/cls_dbls_struct.c,
|
||||
testsuite/libffi.call/cls_double.c,
|
||||
testsuite/libffi.call/cls_double_va.c,
|
||||
testsuite/libffi.call/cls_float.c,
|
||||
testsuite/libffi.call/cls_longdouble.c,
|
||||
testsuite/libffi.call/cls_longdouble_va.c,
|
||||
testsuite/libffi.call/cls_multi_schar.c,
|
||||
testsuite/libffi.call/cls_multi_sshort.c,
|
||||
testsuite/libffi.call/cls_multi_sshortchar.c,
|
||||
testsuite/libffi.call/cls_multi_uchar.c,
|
||||
testsuite/libffi.call/cls_multi_ushort.c,
|
||||
testsuite/libffi.call/cls_multi_ushortchar.c,
|
||||
testsuite/libffi.call/cls_pointer.c,
|
||||
testsuite/libffi.call/cls_pointer_stack.c,
|
||||
testsuite/libffi.call/cls_schar.c,
|
||||
testsuite/libffi.call/cls_sint.c,
|
||||
testsuite/libffi.call/cls_sshort.c,
|
||||
testsuite/libffi.call/cls_uchar.c,
|
||||
testsuite/libffi.call/cls_uint.c,
|
||||
testsuite/libffi.call/cls_ulonglong.c,
|
||||
testsuite/libffi.call/cls_ushort.c,
|
||||
testsuite/libffi.call/err_bad_abi.c,
|
||||
testsuite/libffi.call/err_bad_typedef.c,
|
||||
testsuite/libffi.call/float2.c,
|
||||
testsuite/libffi.call/huge_struct.c,
|
||||
testsuite/libffi.call/nested_struct.c,
|
||||
testsuite/libffi.call/nested_struct1.c,
|
||||
testsuite/libffi.call/nested_struct10.c,
|
||||
testsuite/libffi.call/nested_struct2.c,
|
||||
testsuite/libffi.call/nested_struct3.c,
|
||||
testsuite/libffi.call/nested_struct4.c,
|
||||
testsuite/libffi.call/nested_struct5.c,
|
||||
testsuite/libffi.call/nested_struct6.c,
|
||||
testsuite/libffi.call/nested_struct7.c,
|
||||
testsuite/libffi.call/nested_struct8.c,
|
||||
testsuite/libffi.call/nested_struct9.c,
|
||||
testsuite/libffi.call/problem1.c,
|
||||
testsuite/libffi.call/return_ldl.c,
|
||||
testsuite/libffi.call/return_ll1.c,
|
||||
testsuite/libffi.call/stret_large.c,
|
||||
testsuite/libffi.call/stret_large2.c,
|
||||
testsuite/libffi.call/stret_medium.c,
|
||||
testsuite/libffi.call/stret_medium2.c,
|
||||
testsuite/libffi.special/unwindtest.cc: use ffi_closure_alloc instead
|
||||
of checking for MMAP. Use intptr_t instead of long casts.
|
||||
|
||||
2009-06-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* src/powerpc/ffitarget.h: Fix misapplied merge from gcc.
|
||||
|
||||
2009-06-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* src/mips/o32.S,
|
||||
src/mips/n32.S: Fix licence formatting.
|
||||
|
||||
2009-06-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* src/x86/darwin.S: Fix licence formatting.
|
||||
src/x86/win32.S: Likewise.
|
||||
src/sh64/sysv.S: Likewise.
|
||||
src/sh/sysv.S: Likewise.
|
||||
|
||||
2009-06-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* src/sh64/ffi.c: Remove lint directives. Was missing from merge
|
||||
of Andreas Tobler's patch from 2006-04-22.
|
||||
|
||||
2009-06-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* src/sh/ffi.c: Apply missing hunk from Alexandre Oliva's patch of
|
||||
2007-03-07.
|
||||
|
||||
2008-12-26 Timothy Wall <twall@users.sf.net>
|
||||
|
||||
* testsuite/libffi.call/cls_longdouble.c,
|
||||
testsuite/libffi.call/cls_longdouble_va.c,
|
||||
testsuite/libffi.call/cls_align_longdouble.c,
|
||||
testsuite/libffi.call/cls_align_longdouble_split.c,
|
||||
testsuite/libffi.call/cls_align_longdouble_split2.c: mark expected
|
||||
failures on x86_64 cygwin/mingw.
|
||||
|
||||
2008-12-22 Timothy Wall <twall@users.sf.net>
|
||||
|
||||
* testsuite/libffi.call/closure_fn0.c,
|
||||
testsuite/libffi.call/closure_fn1.c,
|
||||
testsuite/libffi.call/closure_fn2.c,
|
||||
testsuite/libffi.call/closure_fn3.c,
|
||||
testsuite/libffi.call/closure_fn4.c,
|
||||
testsuite/libffi.call/closure_fn5.c,
|
||||
testsuite/libffi.call/closure_fn6.c,
|
||||
testsuite/libffi.call/closure_loc_fn0.c,
|
||||
testsuite/libffi.call/closure_stdcall.c,
|
||||
testsuite/libffi.call/cls_align_pointer.c,
|
||||
testsuite/libffi.call/cls_pointer.c,
|
||||
testsuite/libffi.call/cls_pointer_stack.c: use portable cast from
|
||||
pointer to integer (intptr_t).
|
||||
* testsuite/libffi.call/cls_longdouble.c: disable for win64.
|
||||
|
||||
2008-12-19 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 3.0.8.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* libtool-version: Increment revision.
|
||||
* README: Update for new release.
|
||||
|
||||
2008-11-11 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 3.0.7.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* libtool-version: Increment revision.
|
||||
* README: Update for new release.
|
||||
|
||||
2008-08-25 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* src/powerpc/ffitarget.h (ffi_abi): Add FFI_LINUX and
|
||||
FFI_LINUX_SOFT_FLOAT to the POWERPC_FREEBSD enum.
|
||||
Add note about flag bits used for FFI_SYSV_TYPE_SMALL_STRUCT.
|
||||
Adjust copyright notice.
|
||||
* src/powerpc/ffi.c: Add two new flags to indicate if we have one
|
||||
register or two register to use for FFI_SYSV structs.
|
||||
(ffi_prep_cif_machdep): Pass the right register flag introduced above.
|
||||
(ffi_closure_helper_SYSV): Fix the return type for
|
||||
FFI_SYSV_TYPE_SMALL_STRUCT. Comment.
|
||||
Adjust copyright notice.
|
||||
|
||||
2008-07-24 Anthony Green <green@redhat.com>
|
||||
|
||||
* testsuite/libffi.call/cls_dbls_struct.c,
|
||||
testsuite/libffi.call/cls_double_va.c,
|
||||
testsuite/libffi.call/cls_longdouble.c,
|
||||
testsuite/libffi.call/cls_longdouble_va.c,
|
||||
testsuite/libffi.call/cls_pointer.c,
|
||||
testsuite/libffi.call/cls_pointer_stack.c,
|
||||
testsuite/libffi.call/err_bad_abi.c: Clean up failures from
|
||||
compiler warnings.
|
||||
|
||||
2008-07-17 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 3.0.6.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* libtool-version: Increment revision. Add documentation.
|
||||
* README: Update for new release.
|
||||
|
||||
2008-07-16 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||
|
||||
* src/sh/ffi.c (ffi_prep_closure_loc): Turn INSN into an unsigned
|
||||
int.
|
||||
|
||||
2008-07-16 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||
|
||||
* src/sh/sysv.S: Add .note.GNU-stack on Linux.
|
||||
* src/sh64/sysv.S: Likewise.
|
||||
|
||||
2008-04-03 Anthony Green <green@redhat.com>
|
||||
|
||||
* libffi.pc.in (Libs): Add -L${libdir}.
|
||||
* configure.ac: Bump version to 3.0.5.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* libtool-version: Increment revision.
|
||||
* README: Update for new release.
|
||||
|
||||
2008-04-03 Anthony Green <green@redhat.com>
|
||||
Xerces Ranby <xerxes@zafena.se>
|
||||
|
||||
* include/ffi.h.in: Wrap definition of target architecture to
|
||||
protect from double definitions.
|
||||
|
||||
2008-03-22 Moriyoshi Koizumi <moriyoshi@gmail.com>
|
||||
|
||||
* src/x86/ffi.c (ffi_prep_closure_loc): Fix for bug revealed in
|
||||
closure_loc_fn0.c.
|
||||
* testsuite/libffi.call/closure_loc_fn0.c (closure_loc_test_fn0):
|
||||
New test.
|
||||
|
||||
2008-03-04 Anthony Green <green@redhat.com>
|
||||
Blake Chaffin
|
||||
hos@tamanegi.org
|
||||
|
||||
* testsuite/libffi.call/cls_align_longdouble_split2.c
|
||||
testsuite/libffi.call/cls_align_longdouble_split.c
|
||||
testsuite/libffi.call/cls_dbls_struct.c
|
||||
testsuite/libffi.call/cls_double_va.c
|
||||
testsuite/libffi.call/cls_longdouble.c
|
||||
testsuite/libffi.call/cls_longdouble_va.c
|
||||
testsuite/libffi.call/cls_pointer.c
|
||||
testsuite/libffi.call/cls_pointer_stack.c
|
||||
testsuite/libffi.call/err_bad_abi.c
|
||||
testsuite/libffi.call/err_bad_typedef.c
|
||||
testsuite/libffi.call/huge_struct.c
|
||||
testsuite/libffi.call/stret_large2.c
|
||||
testsuite/libffi.call/stret_large.c
|
||||
testsuite/libffi.call/stret_medium2.c
|
||||
testsuite/libffi.call/stret_medium.c: New tests from Apple.
|
||||
|
||||
2008-02-26 Jakub Jelinek <jakub@redhat.com>
|
||||
Anthony Green <green@redhat.com>
|
||||
|
||||
* src/alpha/osf.S: Add .note.GNU-stack on Linux.
|
||||
* src/s390/sysv.S: Likewise.
|
||||
* src/powerpc/linux64.S: Likewise.
|
||||
* src/powerpc/linux64_closure.S: Likewise.
|
||||
* src/powerpc/ppc_closure.S: Likewise.
|
||||
* src/powerpc/sysv.S: Likewise.
|
||||
* src/x86/unix64.S: Likewise.
|
||||
* src/x86/sysv.S: Likewise.
|
||||
* src/sparc/v8.S: Likewise.
|
||||
* src/sparc/v9.S: Likewise.
|
||||
* src/m68k/sysv.S: Likewise.
|
||||
* src/ia64/unix.S: Likewise.
|
||||
* src/arm/sysv.S: Likewise.
|
||||
|
||||
2008-02-26 Anthony Green <green@redhat.com>
|
||||
Thomas Heller <theller@ctypes.org>
|
||||
|
||||
* src/x86/ffi.c (ffi_closure_SYSV_inner): Change C++ comment to C
|
||||
comment.
|
||||
|
||||
2008-02-26 Anthony Green <green@redhat.org>
|
||||
Thomas Heller <theller@ctypes.org>
|
||||
|
||||
* include/ffi.h.in: Change void (*)() to void (*)(void).
|
||||
|
||||
2008-02-26 Anthony Green <green@redhat.org>
|
||||
Thomas Heller <theller@ctypes.org>
|
||||
|
||||
* src/alpha/ffi.c: Change void (*)() to void (*)(void).
|
||||
src/alpha/osf.S, src/arm/ffi.c, src/frv/ffi.c, src/ia64/ffi.c,
|
||||
src/ia64/unix.S, src/java_raw_api.c, src/m32r/ffi.c,
|
||||
src/mips/ffi.c, src/pa/ffi.c, src/pa/hpux32.S, src/pa/linux.S,
|
||||
src/powerpc/ffi.c, src/powerpc/ffi_darwin.c, src/raw_api.c,
|
||||
src/s390/ffi.c, src/sh/ffi.c, src/sh64/ffi.c, src/sparc/ffi.c,
|
||||
src/x86/ffi.c, src/x86/unix64.S, src/x86/darwin64.S,
|
||||
src/x86/ffi64.c: Ditto.
|
||||
|
||||
2008-02-24 Anthony Green <green@redhat.org>
|
||||
|
||||
* configure.ac: Accept openbsd*, not just openbsd.
|
||||
Bump version to 3.0.4.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* libtool-version: Increment revision.
|
||||
* README: Update for new release.
|
||||
|
||||
2008-02-22 Anthony Green <green@redhat.com>
|
||||
|
||||
* README: Clean up list of tested platforms.
|
||||
|
||||
2008-02-22 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 3.0.3.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* libtool-version: Increment revision.
|
||||
* README: Update for new release. Clean up test docs.
|
||||
|
||||
2008-02-22 Bjoern Koenig <bkoenig@alpha-tierchen.de>
|
||||
Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* configure.ac: Add amd64-*-freebsd* target.
|
||||
* configure: Regenerate.
|
||||
|
||||
2008-02-22 Thomas Heller <theller@ctypes.org>
|
||||
|
||||
* configure.ac: Add x86 OpenBSD support.
|
||||
* configure: Rebuilt.
|
||||
|
||||
2008-02-21 Thomas Heller <theller@ctypes.org>
|
||||
|
||||
* README: Change "make test" to "make check".
|
||||
|
||||
2008-02-21 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 3.0.2.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* libtool-version: Increment revision.
|
||||
* README: Update for new release.
|
||||
|
||||
2008-02-21 Björn König <bkoenig@alpha-tierchen.de>
|
||||
|
||||
* src/x86/freebsd.S: New file.
|
||||
* configure.ac: Add x86 FreeBSD support.
|
||||
* Makefile.am: Ditto.
|
||||
|
||||
2008-02-15 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 3.0.1.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* libtool-version: Increment revision.
|
||||
* README: Update for new release.
|
||||
|
||||
2008-02-15 David Daney <ddaney@avtrex.com>
|
||||
|
||||
* src/mips/ffi.c: Remove extra '>' from include directive.
|
||||
(ffi_prep_closure_loc): Use clear_location instead of tramp.
|
||||
|
||||
2008-02-15 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 3.0.0.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
|
||||
2008-02-15 David Daney <ddaney@avtrex.com>
|
||||
|
||||
* src/mips/ffi.c (USE__BUILTIN___CLEAR_CACHE):
|
||||
Define (conditionally), and use it to include cachectl.h.
|
||||
(ffi_prep_closure_loc): Fix cache flushing.
|
||||
* src/mips/ffitarget.h (_ABIN32, _ABI64, _ABIO32): Define.
|
||||
|
||||
2008-02-15 Anthony Green <green@redhat.com>
|
||||
|
||||
* man/ffi_call.3, man/ffi_prep_cif.3, man/ffi.3:
|
||||
Update dates and remove all references to ffi_prep_closure.
|
||||
* configure.ac: Bump version to 2.99.9.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
|
||||
2008-02-15 Anthony Green <green@redhat.com>
|
||||
|
||||
* man/ffi_prep_closure.3: Delete.
|
||||
* man/Makefile.am (EXTRA_DIST): Remove ffi_prep_closure.3.
|
||||
(man_MANS): Ditto.
|
||||
* man/Makefile.in: Rebuilt.
|
||||
* configure.ac: Bump version to 2.99.8.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 2.99.7.
|
||||
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
|
||||
* include/ffi.h.in LICENSE src/debug.c src/closures.c
|
||||
src/ffitest.c src/s390/sysv.S src/s390/ffitarget.h
|
||||
src/types.c src/m68k/ffitarget.h src/raw_api.c src/frv/ffi.c
|
||||
src/frv/ffitarget.h src/sh/ffi.c src/sh/sysv.S
|
||||
src/sh/ffitarget.h src/powerpc/ffitarget.h src/pa/ffi.c
|
||||
src/pa/ffitarget.h src/pa/linux.S src/java_raw_api.c
|
||||
src/cris/ffitarget.h src/x86/ffi.c src/x86/sysv.S
|
||||
src/x86/unix64.S src/x86/win32.S src/x86/ffitarget.h
|
||||
src/x86/ffi64.c src/x86/darwin.S src/ia64/ffi.c
|
||||
src/ia64/ffitarget.h src/ia64/ia64_flags.h src/ia64/unix.S
|
||||
src/sparc/ffi.c src/sparc/v9.S src/sparc/ffitarget.h
|
||||
src/sparc/v8.S src/alpha/ffi.c src/alpha/ffitarget.h
|
||||
src/alpha/osf.S src/sh64/ffi.c src/sh64/sysv.S
|
||||
src/sh64/ffitarget.h src/mips/ffi.c src/mips/ffitarget.h
|
||||
src/mips/n32.S src/mips/o32.S src/arm/ffi.c src/arm/sysv.S
|
||||
src/arm/ffitarget.h src/prep_cif.c: Update license text.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* README: Update tested platforms.
|
||||
* configure.ac: Bump version to 2.99.6.
|
||||
* configure: Rebuilt.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.ac: Bump version to 2.99.5.
|
||||
* configure: Rebuilt.
|
||||
* Makefile.am (EXTRA_DIST): Add darwin64.S
|
||||
* Makefile.in: Rebuilt.
|
||||
* testsuite/lib/libffi-dg.exp: Remove libstdc++ bits from GCC tree.
|
||||
* LICENSE: Update WARRANTY.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* libffi.pc.in (libdir): Fix libdir definition.
|
||||
* configure.ac: Bump version to 2.99.4.
|
||||
* configure: Rebuilt.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* README: Update.
|
||||
* libffi.info: New file.
|
||||
* doc/stamp-vti: New file.
|
||||
* configure.ac: Bump version to 2.99.3.
|
||||
* configure: Rebuilt.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* Makefile.am (SUBDIRS): Add man dir.
|
||||
* Makefile.in: Rebuilt.
|
||||
* configure.ac: Create Makefile.
|
||||
* configure: Rebuilt.
|
||||
* man/ffi_call.3 man/ffi_prep_cif.3 man/ffi_prep_closure.3
|
||||
man/Makefile.am man/Makefile.in: New files.
|
||||
|
||||
2008-02-14 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* aclocal.m4, Makefile.in, configure, fficonfig.h.in: Rebuilt.
|
||||
* mdate-sh, texinfo.tex: New files.
|
||||
* Makefile.am (info_TEXINFOS): New variable.
|
||||
* doc/libffi.texi: New file.
|
||||
* doc/version.texi: Likewise.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* Makefile.am (AM_CFLAGS): Don't compile with -D$(TARGET).
|
||||
(lib_LTLIBRARIES): Define.
|
||||
(toolexeclib_LIBRARIES): Undefine.
|
||||
* Makefile.in: Rebuilt.
|
||||
* configure.ac: Reset version to 2.99.1.
|
||||
* configure.in: Rebuilt.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* libffi.pc.in: Use @PACKAGE_NAME@ and @PACKAGE_VERSION@.
|
||||
* configure.ac: Reset version to 2.99.1.
|
||||
* configure.in: Rebuilt.
|
||||
* Makefile.am (EXTRA_DIST): Add ChangeLog.libffi.
|
||||
* Makefile.in: Rebuilt.
|
||||
* LICENSE: Update copyright notice.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* include/Makefile.am (nodist_includes_HEADERS): Define. Don't
|
||||
distribute ffitarget.h or ffi.h from the build include dir.
|
||||
* Makefile.in: Rebuilt.
|
||||
|
||||
2008-02-14 Anthony Green <green@redhat.com>
|
||||
|
||||
* include/Makefile.am (includesdir): Install headers under libdir.
|
||||
(pkgconfigdir): Define. Install libffi.pc.
|
||||
* include/Makefile.in: Rebuilt.
|
||||
* libffi.pc.in: Create.
|
||||
* libtool-version: Increment CURRENT
|
||||
* configure.ac: Add libffi.pc.in
|
||||
* configure: Rebuilt.
|
||||
|
||||
2008-02-03 Anthony Green <green@redhat.com>
|
||||
|
||||
* include/Makefile.am (includesdir): Fix header install with
|
||||
DESTDIR.
|
||||
* include/Makefile.in: Rebuilt.
|
||||
|
||||
2008-02-03 Timothy Wall <twall@users.sf.net>
|
||||
|
||||
* src/x86/ffi.c (FFI_INIT_TRAMPOLINE_STDCALL): Calculate jump return
|
||||
offset based on code pointer, not data pointer.
|
||||
|
||||
2008-02-01 Anthony Green <green@redhat.com>
|
||||
|
||||
* include/Makefile.am: Fix header installs.
|
||||
* Makefile.am: Ditto.
|
||||
* include/Makefile.in: Rebuilt.
|
||||
* Makefile.in: Ditto.
|
||||
|
||||
2008-02-01 Anthony Green <green@redhat.com>
|
||||
|
||||
* src/x86/ffi.c (FFI_INIT_TRAMPOLINE_STDCALL,
|
||||
FFI_INIT_TRAMPOLINE): Revert my broken changes to twall's last
|
||||
patch.
|
||||
|
||||
2008-01-31 Anthony Green <green@redhat.com>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Add missing files.
|
||||
* testsuite/Makefile.am: Ditto.
|
||||
* Makefile.in, testsuite/Makefile.in: Rebuilt.
|
||||
|
||||
2008-01-31 Timothy Wall <twall@users.sf.net>
|
||||
|
||||
* testsuite/libffi.call/closure_stdcall.c: Add test for stdcall
|
||||
closures.
|
||||
* src/x86/ffitarget.h: Increase size of trampoline for stdcall
|
||||
closures.
|
||||
* src/x86/win32.S: Add assembly for stdcall closure.
|
||||
* src/x86/ffi.c: Initialize stdcall closure trampoline.
|
||||
|
||||
2008-01-30 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR libffi/34612
|
||||
* src/x86/sysv.S (ffi_closure_SYSV): Pop 4 byte from stack when
|
||||
returning struct.
|
||||
|
||||
* testsuite/libffi.call/call.exp: Add "-O2 -fomit-frame-pointer"
|
||||
tests.
|
||||
|
||||
2008-01-30 Anthony Green <green@redhat.com>
|
||||
|
||||
* Makefile.am, include/Makefile.am: Move headers to
|
||||
libffi_la_SOURCES for new automake.
|
||||
* Makefile.in, include/Makefile.in: Rebuilt.
|
||||
|
||||
* testsuite/lib/wrapper.exp: Copied from gcc tree to allow for
|
||||
execution outside of gcc tree.
|
||||
* testsuite/lib/target-libpath.exp: Ditto.
|
||||
|
||||
* testsuite/lib/libffi-dg.exp: Many changes to allow for execution
|
||||
outside of gcc tree.
|
||||
|
||||
@@ -1,541 +0,0 @@
|
||||
\input texinfo @c -*-texinfo-*-
|
||||
@c %**start of header
|
||||
@setfilename libffi.info
|
||||
@settitle libffi
|
||||
@setchapternewpage off
|
||||
@c %**end of header
|
||||
|
||||
@c Merge the standard indexes into a single one.
|
||||
@syncodeindex fn cp
|
||||
@syncodeindex vr cp
|
||||
@syncodeindex ky cp
|
||||
@syncodeindex pg cp
|
||||
@syncodeindex tp cp
|
||||
|
||||
@include version.texi
|
||||
|
||||
@copying
|
||||
|
||||
This manual is for Libffi, a portable foreign-function interface
|
||||
library.
|
||||
|
||||
Copyright @copyright{} 2008 Red Hat, Inc.
|
||||
|
||||
@quotation
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version. A copy of the license is included in the
|
||||
section entitled ``GNU General Public License''.
|
||||
|
||||
@end quotation
|
||||
@end copying
|
||||
|
||||
@dircategory
|
||||
@direntry
|
||||
* libffi: (libffi). Portable foreign-function interface library.
|
||||
@end direntry
|
||||
|
||||
@titlepage
|
||||
@title Libffi
|
||||
@page
|
||||
@vskip 0pt plus 1filll
|
||||
@insertcopying
|
||||
@end titlepage
|
||||
|
||||
|
||||
@ifnottex
|
||||
@node Top
|
||||
@top libffi
|
||||
|
||||
@insertcopying
|
||||
|
||||
@menu
|
||||
* Introduction:: What is libffi?
|
||||
* Using libffi:: How to use libffi.
|
||||
* Missing Features:: Things libffi can't do.
|
||||
* Index:: Index.
|
||||
@end menu
|
||||
|
||||
@end ifnottex
|
||||
|
||||
|
||||
@node Introduction
|
||||
@chapter 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 @dfn{calling
|
||||
convention}. The calling convention is 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. The calling convention is also
|
||||
sometimes called the @dfn{ABI} or @dfn{Application Binary Interface}.
|
||||
@cindex calling convention
|
||||
@cindex ABI
|
||||
@cindex Application Binary Interface
|
||||
|
||||
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. @samp{Libffi} can be used in such programs to
|
||||
provide a bridge from the interpreter program to compiled code.
|
||||
|
||||
The @samp{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.
|
||||
|
||||
@acronym{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 @samp{libffi} library really only provides the lowest, machine
|
||||
dependent layer of a fully featured foreign function interface. A
|
||||
layer must exist above @samp{libffi} that handles type conversions for
|
||||
values passed between the two languages.
|
||||
@cindex FFI
|
||||
@cindex Foreign Function Interface
|
||||
|
||||
|
||||
@node Using libffi
|
||||
@chapter Using libffi
|
||||
|
||||
@menu
|
||||
* The Basics:: The basic libffi API.
|
||||
* Simple Example:: A simple example.
|
||||
* Types:: libffi type descriptions.
|
||||
* Multiple ABIs:: Different passing styles on one platform.
|
||||
* The Closure API:: Writing a generic function.
|
||||
@end menu
|
||||
|
||||
|
||||
@node The Basics
|
||||
@section The Basics
|
||||
|
||||
@samp{Libffi} assumes that you have a pointer to the function you wish
|
||||
to call and that you know the number and types of arguments to pass
|
||||
it, as well as the return type of the function.
|
||||
|
||||
The first thing you must do is create an @code{ffi_cif} object that
|
||||
matches the signature of the function you wish to call. This is a
|
||||
separate step because it is common to make multiple calls using a
|
||||
single @code{ffi_cif}. The @dfn{cif} in @code{ffi_cif} stands for
|
||||
Call InterFace. To prepare a call interface object, use the function
|
||||
@code{ffi_prep_cif}.
|
||||
@cindex cif
|
||||
|
||||
@findex ffi_prep_cif
|
||||
@defun ffi_status ffi_prep_cif (ffi_cif *@var{cif}, ffi_abi @var{abi}, unsigned int @var{nargs}, ffi_type *@var{rtype}, ffi_type **@var{argtypes})
|
||||
This initializes @var{cif} according to the given parameters.
|
||||
|
||||
@var{abi} is the ABI to use; normally @code{FFI_DEFAULT_ABI} is what
|
||||
you want. @ref{Multiple ABIs} for more information.
|
||||
|
||||
@var{nargs} is the number of arguments that this function accepts.
|
||||
@samp{libffi} does not yet handle varargs functions; see @ref{Missing
|
||||
Features} for more information.
|
||||
|
||||
@var{rtype} is a pointer to an @code{ffi_type} structure that
|
||||
describes the return type of the function. @xref{Types}.
|
||||
|
||||
@var{argtypes} is a vector of @code{ffi_type} pointers.
|
||||
@var{argtypes} must have @var{nargs} elements. If @var{nargs} is 0,
|
||||
this argument is ignored.
|
||||
|
||||
@code{ffi_prep_cif} returns a @code{libffi} status code, of type
|
||||
@code{ffi_status}. This will be either @code{FFI_OK} if everything
|
||||
worked properly; @code{FFI_BAD_TYPEDEF} if one of the @code{ffi_type}
|
||||
objects is incorrect; or @code{FFI_BAD_ABI} if the @var{abi} parameter
|
||||
is invalid.
|
||||
@end defun
|
||||
|
||||
|
||||
To call a function using an initialized @code{ffi_cif}, use the
|
||||
@code{ffi_call} function:
|
||||
|
||||
@findex ffi_call
|
||||
@defun void ffi_call (ffi_cif *@var{cif}, void *@var{fn}, void *@var{rvalue}, void **@var{avalues})
|
||||
This calls the function @var{fn} according to the description given in
|
||||
@var{cif}. @var{cif} must have already been prepared using
|
||||
@code{ffi_prep_cif}.
|
||||
|
||||
@var{rvalue} is a pointer to a chunk of memory that will hold the
|
||||
result of the function call. This must be large enough to hold the
|
||||
result and must be suitably aligned; it is the caller's responsibility
|
||||
to ensure this. If @var{cif} declares that the function returns
|
||||
@code{void} (using @code{ffi_type_void}), then @var{rvalue} is
|
||||
ignored. If @var{rvalue} is @samp{NULL}, then the return value is
|
||||
discarded.
|
||||
|
||||
@var{avalues} is a vector of @code{void *} pointers that point to the
|
||||
memory locations holding the argument values for a call. If @var{cif}
|
||||
declares that the function has no arguments (i.e., @var{nargs} was 0),
|
||||
then @var{avalues} is ignored.
|
||||
@end defun
|
||||
|
||||
|
||||
@node Simple Example
|
||||
@section Simple Example
|
||||
|
||||
Here is a trivial example that calls @code{puts} a few times.
|
||||
|
||||
@example
|
||||
#include <stdio.h>
|
||||
#include <ffi.h>
|
||||
|
||||
int main()
|
||||
@{
|
||||
ffi_cif cif;
|
||||
ffi_type *args[1];
|
||||
void *values[1];
|
||||
char *s;
|
||||
int rc;
|
||||
|
||||
/* Initialize the argument info vectors */
|
||||
args[0] = &ffi_type_pointer;
|
||||
values[0] = &s;
|
||||
|
||||
/* Initialize the cif */
|
||||
if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
|
||||
&ffi_type_uint, args) == FFI_OK)
|
||||
@{
|
||||
s = "Hello World!";
|
||||
ffi_call(&cif, puts, &rc, values);
|
||||
/* rc now holds the result of the call to puts */
|
||||
|
||||
/* values holds a pointer to the function's arg, so to
|
||||
call puts() again all we need to do is change the
|
||||
value of s */
|
||||
s = "This is cool!";
|
||||
ffi_call(&cif, puts, &rc, values);
|
||||
@}
|
||||
|
||||
return 0;
|
||||
@}
|
||||
@end example
|
||||
|
||||
|
||||
@node Types
|
||||
@section Types
|
||||
|
||||
@menu
|
||||
* Primitive Types:: Built-in types.
|
||||
* Structures:: Structure types.
|
||||
* Type Example:: Structure type example.
|
||||
@end menu
|
||||
|
||||
@node Primitive Types
|
||||
@subsection Primitive Types
|
||||
|
||||
@code{Libffi} provides a number of built-in type descriptors that can
|
||||
be used to describe argument and return types:
|
||||
|
||||
@table @code
|
||||
@item ffi_type_void
|
||||
@tindex ffi_type_void
|
||||
The type @code{void}. This cannot be used for argument types, only
|
||||
for return values.
|
||||
|
||||
@item ffi_type_uint8
|
||||
@tindex ffi_type_uint8
|
||||
An unsigned, 8-bit integer type.
|
||||
|
||||
@item ffi_type_sint8
|
||||
@tindex ffi_type_sint8
|
||||
A signed, 8-bit integer type.
|
||||
|
||||
@item ffi_type_uint16
|
||||
@tindex ffi_type_uint16
|
||||
An unsigned, 16-bit integer type.
|
||||
|
||||
@item ffi_type_sint16
|
||||
@tindex ffi_type_sint16
|
||||
A signed, 16-bit integer type.
|
||||
|
||||
@item ffi_type_uint32
|
||||
@tindex ffi_type_uint32
|
||||
An unsigned, 32-bit integer type.
|
||||
|
||||
@item ffi_type_sint32
|
||||
@tindex ffi_type_sint32
|
||||
A signed, 32-bit integer type.
|
||||
|
||||
@item ffi_type_uint64
|
||||
@tindex ffi_type_uint64
|
||||
An unsigned, 64-bit integer type.
|
||||
|
||||
@item ffi_type_sint64
|
||||
@tindex ffi_type_sint64
|
||||
A signed, 64-bit integer type.
|
||||
|
||||
@item ffi_type_float
|
||||
@tindex ffi_type_float
|
||||
The C @code{float} type.
|
||||
|
||||
@item ffi_type_double
|
||||
@tindex ffi_type_double
|
||||
The C @code{double} type.
|
||||
|
||||
@item ffi_type_uchar
|
||||
@tindex ffi_type_uchar
|
||||
The C @code{unsigned char} type.
|
||||
|
||||
@item ffi_type_schar
|
||||
@tindex ffi_type_schar
|
||||
The C @code{signed char} type. (Note that there is not an exact
|
||||
equivalent to the C @code{char} type in @code{libffi}; ordinarily you
|
||||
should either use @code{ffi_type_schar} or @code{ffi_type_uchar}
|
||||
depending on whether @code{char} is signed.)
|
||||
|
||||
@item ffi_type_ushort
|
||||
@tindex ffi_type_ushort
|
||||
The C @code{unsigned short} type.
|
||||
|
||||
@item ffi_type_sshort
|
||||
@tindex ffi_type_sshort
|
||||
The C @code{short} type.
|
||||
|
||||
@item ffi_type_uint
|
||||
@tindex ffi_type_uint
|
||||
The C @code{unsigned int} type.
|
||||
|
||||
@item ffi_type_sint
|
||||
@tindex ffi_type_sint
|
||||
The C @code{int} type.
|
||||
|
||||
@item ffi_type_ulong
|
||||
@tindex ffi_type_ulong
|
||||
The C @code{unsigned long} type.
|
||||
|
||||
@item ffi_type_slong
|
||||
@tindex ffi_type_slong
|
||||
The C @code{long} type.
|
||||
|
||||
@item ffi_type_longdouble
|
||||
@tindex ffi_type_longdouble
|
||||
On platforms that have a C @code{long double} type, this is defined.
|
||||
On other platforms, it is not.
|
||||
|
||||
@item ffi_type_pointer
|
||||
@tindex ffi_type_pointer
|
||||
A generic @code{void *} pointer. You should use this for all
|
||||
pointers, regardless of their real type.
|
||||
@end table
|
||||
|
||||
Each of these is of type @code{ffi_type}, so you must take the address
|
||||
when passing to @code{ffi_prep_cif}.
|
||||
|
||||
|
||||
@node Structures
|
||||
@subsection Structures
|
||||
|
||||
Although @samp{libffi} has no special support for unions or
|
||||
bit-fields, it is perfectly happy passing structures back and forth.
|
||||
You must first describe the structure to @samp{libffi} by creating a
|
||||
new @code{ffi_type} object for it.
|
||||
|
||||
@tindex ffi_type
|
||||
@deftp ffi_type
|
||||
The @code{ffi_type} has the following members:
|
||||
@table @code
|
||||
@item size_t size
|
||||
This is set by @code{libffi}; you should initialize it to zero.
|
||||
|
||||
@item unsigned short alignment
|
||||
This is set by @code{libffi}; you should initialize it to zero.
|
||||
|
||||
@item unsigned short type
|
||||
For a structure, this should be set to @code{FFI_TYPE_STRUCT}.
|
||||
|
||||
@item ffi_type **elements
|
||||
This is a @samp{NULL}-terminated array of pointers to @code{ffi_type}
|
||||
objects. There is one element per field of the struct.
|
||||
@end table
|
||||
@end deftp
|
||||
|
||||
|
||||
@node Type Example
|
||||
@subsection Type Example
|
||||
|
||||
The following example initializes a @code{ffi_type} object
|
||||
representing the @code{tm} struct from Linux's @file{time.h}.
|
||||
|
||||
Here is how the struct is defined:
|
||||
|
||||
@example
|
||||
struct tm @{
|
||||
int tm_sec;
|
||||
int tm_min;
|
||||
int tm_hour;
|
||||
int tm_mday;
|
||||
int tm_mon;
|
||||
int tm_year;
|
||||
int tm_wday;
|
||||
int tm_yday;
|
||||
int tm_isdst;
|
||||
/* Those are for future use. */
|
||||
long int __tm_gmtoff__;
|
||||
__const char *__tm_zone__;
|
||||
@};
|
||||
@end example
|
||||
|
||||
Here is the corresponding code to describe this struct to
|
||||
@code{libffi}:
|
||||
|
||||
@example
|
||||
@{
|
||||
ffi_type tm_type;
|
||||
ffi_type *tm_type_elements[12];
|
||||
int i;
|
||||
|
||||
tm_type.size = tm_type.alignment = 0;
|
||||
tm_type.elements = &tm_type_elements;
|
||||
|
||||
for (i = 0; i < 9; i++)
|
||||
tm_type_elements[i] = &ffi_type_sint;
|
||||
|
||||
tm_type_elements[9] = &ffi_type_slong;
|
||||
tm_type_elements[10] = &ffi_type_pointer;
|
||||
tm_type_elements[11] = NULL;
|
||||
|
||||
/* tm_type can now be used to represent tm argument types and
|
||||
return types for ffi_prep_cif() */
|
||||
@}
|
||||
@end example
|
||||
|
||||
|
||||
@node Multiple ABIs
|
||||
@section Multiple ABIs
|
||||
|
||||
A given platform may provide multiple different ABIs at once. For
|
||||
instance, the x86 platform has both @samp{stdcall} and @samp{fastcall}
|
||||
functions.
|
||||
|
||||
@code{libffi} provides some support for this. However, this is
|
||||
necessarily platform-specific.
|
||||
|
||||
@c FIXME: document the platforms
|
||||
|
||||
@node The Closure API
|
||||
@section The Closure API
|
||||
|
||||
@code{libffi} also provides a way to write a generic function -- a
|
||||
function that can accept and decode any combination of arguments.
|
||||
This can be useful when writing an interpreter, or to provide wrappers
|
||||
for arbitrary functions.
|
||||
|
||||
This facility is called the @dfn{closure API}. Closures are not
|
||||
supported on all platforms; you can check the @code{FFI_CLOSURES}
|
||||
define to determine whether they are supported on the current
|
||||
platform.
|
||||
@cindex closures
|
||||
@cindex closure API
|
||||
@findex FFI_CLOSURES
|
||||
|
||||
Because closures work by assembling a tiny function at runtime, they
|
||||
require special allocation on platforms that have a non-executable
|
||||
heap. Memory management for closures is handled by a pair of
|
||||
functions:
|
||||
|
||||
@findex ffi_closure_alloca
|
||||
@defun void *ffi_closure_alloc (size_t @var{size}, void **@var{code})
|
||||
Allocate a chunk of memory holding @var{size} bytes. This returns a
|
||||
pointer to the writable address, and sets *@var{code} to the
|
||||
corresponding executable address.
|
||||
|
||||
@var{size} should be sufficient to hold a @code{ffi_closure} object.
|
||||
@end defun
|
||||
|
||||
@findex ffi_closure_free
|
||||
@defun void ffi_closure_free (void *@var{writable})
|
||||
Free memory allocated using @code{ffi_closure_alloc}. The argument is
|
||||
the writable address that was returned.
|
||||
@end defun
|
||||
|
||||
|
||||
Once you have allocated the memory for a closure, you must construct a
|
||||
@code{ffi_cif} describing the function call. Finally you can prepare
|
||||
the closure function:
|
||||
|
||||
@findex ffi_prep_closure_loc
|
||||
@defun ffi_status ffi_prep_closure_loc (ffi_closure *@var{closure}, ffi_cif *@var{cif}, void (*@var{fun}) (ffi_cif *@var{cif}, void *@var{ret}, void **@var{args}, void *@var{user_data}), void *@var{user_data}, void *@var{codeloc})
|
||||
Prepare a closure function.
|
||||
|
||||
@var{closure} is the address of a @code{ffi_closure} object; this is
|
||||
the writable address returned by @code{ffi_closure_alloc}.
|
||||
|
||||
@var{cif} is the @code{ffi_cif} describing the function parameters.
|
||||
|
||||
@var{user_data} is an arbitrary datum that is passed, uninterpreted,
|
||||
to your closure function.
|
||||
|
||||
@var{codeloc} is the executable address returned by
|
||||
@code{ffi_closure_alloc}.
|
||||
|
||||
@var{fun} is the function which will be called when the closure is
|
||||
invoked. It is called with the arguments:
|
||||
@table @var
|
||||
@item cif
|
||||
The @code{ffi_cif} passed to @code{ffi_prep_closure_loc}.
|
||||
|
||||
@item ret
|
||||
A pointer to the memory used for the function's return value.
|
||||
@var{fun} must fill this, unless the function is declared as returning
|
||||
@code{void}.
|
||||
@c FIXME: is this NULL for void-returning functions?
|
||||
|
||||
@item args
|
||||
A vector of pointers to memory holding the arguments to the function.
|
||||
|
||||
@item user_data
|
||||
The same @var{user_data} that was passed to
|
||||
@code{ffi_prep_closure_loc}.
|
||||
@end table
|
||||
|
||||
@code{ffi_prep_closure_loc} will return @code{FFI_OK} if everything
|
||||
went ok, and something else on error.
|
||||
@c FIXME: what?
|
||||
|
||||
After calling @code{ffi_prep_closure_loc}, you can cast @var{codeloc}
|
||||
to the appropriate pointer-to-function type.
|
||||
@end defun
|
||||
|
||||
@c FIXME: example
|
||||
|
||||
You may see old code referring to @code{ffi_prep_closure}. This
|
||||
function is deprecated, as it cannot handle the need for separate
|
||||
writable and executable addresses.
|
||||
|
||||
|
||||
@node Missing Features
|
||||
@chapter Missing Features
|
||||
|
||||
@code{libffi} is missing a few features. We welcome patches to add
|
||||
support for these.
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
There is no support for calling varargs functions. This may work on
|
||||
some platforms, depending on how the ABI is defined, but it is not
|
||||
reliable.
|
||||
|
||||
@item
|
||||
There is no support for bit fields in structures.
|
||||
|
||||
@item
|
||||
The closure API is
|
||||
|
||||
@item
|
||||
The ``raw'' API is undocumented.
|
||||
@c argument promotion?
|
||||
@c unions?
|
||||
@c anything else?
|
||||
@end itemize
|
||||
|
||||
|
||||
@node Index
|
||||
@unnumbered Index
|
||||
|
||||
@printindex cp
|
||||
|
||||
@bye
|
||||
@@ -1,103 +0,0 @@
|
||||
.Dd February 15, 2008
|
||||
.Dt ffi_call 3
|
||||
.Sh NAME
|
||||
.Nm ffi_call
|
||||
.Nd Invoke a foreign function.
|
||||
.Sh SYNOPSIS
|
||||
.In ffi.h
|
||||
.Ft void
|
||||
.Fo ffi_call
|
||||
.Fa "ffi_cif *cif"
|
||||
.Fa "void (*fn)(void)"
|
||||
.Fa "void *rvalue"
|
||||
.Fa "void **avalue"
|
||||
.Fc
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm ffi_call
|
||||
function provides a simple mechanism for invoking a function without
|
||||
requiring knowledge of the function's interface at compile time.
|
||||
.Fa fn
|
||||
is called with the values retrieved from the pointers in the
|
||||
.Fa avalue
|
||||
array. The return value from
|
||||
.Fa fn
|
||||
is placed in storage pointed to by
|
||||
.Fa rvalue .
|
||||
.Fa cif
|
||||
contains information describing the data types, sizes and alignments of the
|
||||
arguments to and return value from
|
||||
.Fa fn ,
|
||||
and must be initialized with
|
||||
.Nm ffi_prep_cif
|
||||
before it is used with
|
||||
.Nm ffi_call .
|
||||
.Pp
|
||||
.Fa rvalue
|
||||
must point to storage that is sizeof(ffi_arg) or larger for non-floating point
|
||||
types. For smaller-sized return value types, the
|
||||
.Nm ffi_arg
|
||||
or
|
||||
.Nm ffi_sarg
|
||||
integral type must be used to hold
|
||||
the return value.
|
||||
.Sh EXAMPLES
|
||||
.Bd -literal
|
||||
#include <ffi/ffi.h>
|
||||
#include <stdio.h>
|
||||
|
||||
unsigned char
|
||||
foo(unsigned int, float);
|
||||
|
||||
int
|
||||
main(int argc, const char **argv)
|
||||
{
|
||||
ffi_cif cif;
|
||||
ffi_type *arg_types[2];
|
||||
void *arg_values[2];
|
||||
ffi_status status;
|
||||
|
||||
// Because the return value from foo() is smaller than sizeof(long), it
|
||||
// must be passed as ffi_arg or ffi_sarg.
|
||||
ffi_arg result;
|
||||
|
||||
// Specify the data type of each argument. Available types are defined
|
||||
// in <ffi/ffi.h>.
|
||||
arg_types[0] = &ffi_type_uint;
|
||||
arg_types[1] = &ffi_type_float;
|
||||
|
||||
// Prepare the ffi_cif structure.
|
||||
if ((status = ffi_prep_cif(&cif, FFI_DEFAULT_ABI,
|
||||
2, &ffi_type_uint8, arg_types)) != FFI_OK)
|
||||
{
|
||||
// Handle the ffi_status error.
|
||||
}
|
||||
|
||||
// Specify the values of each argument.
|
||||
unsigned int arg1 = 42;
|
||||
float arg2 = 5.1;
|
||||
|
||||
arg_values[0] = &arg1;
|
||||
arg_values[1] = &arg2;
|
||||
|
||||
// Invoke the function.
|
||||
ffi_call(&cif, FFI_FN(foo), &result, arg_values);
|
||||
|
||||
// The ffi_arg 'result' now contains the unsigned char returned from foo(),
|
||||
// which can be accessed by a typecast.
|
||||
printf("result is %hhu", (unsigned char)result);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// The target function.
|
||||
unsigned char
|
||||
foo(unsigned int x, float y)
|
||||
{
|
||||
unsigned char result = x - y;
|
||||
return result;
|
||||
}
|
||||
.Ed
|
||||
.Sh SEE ALSO
|
||||
.Xr ffi 3 ,
|
||||
.Xr ffi_prep_cif 3
|
||||
@@ -1,3 +1,34 @@
|
||||
2009-12-26 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/powerpc/ffi.c (ffi_prep_args_SYSV): Advance intarg_count
|
||||
when a float argument is passed in memory.
|
||||
(ffi_closure_helper_SYSV): Mark general registers as used up when
|
||||
a 64bit or soft-float long double argument is passed in memory.
|
||||
|
||||
2009-12-25 Samuli Suominen <ssuominen@gentoo.org>
|
||||
|
||||
* configure.ac: Undefine _AC_ARG_VAR_PRECIOUS for autoconf 2.64.
|
||||
* configure: Rebuilt.
|
||||
* fficonfig.h.in: Rebuilt.
|
||||
|
||||
2009-12-25 Carlo Bramini <carlo.bramix@libero.it>
|
||||
|
||||
* configure.ac (AM_LTLDFLAGS): Define for windows hosts.
|
||||
* Makefile.am (libffi_la_LDFLAGS): Add AM_LTLDFLAGS.
|
||||
* configure: Rebuilt.
|
||||
* Makefile.in: Rebuilt.
|
||||
|
||||
2009-12-24 Anthony Green <green@redhat.com>
|
||||
|
||||
* testsuite/libffi.call/huge_struct.c: Fix printf format, and
|
||||
don't xfail x86 Linux.
|
||||
* testsuite/libffi.call/huge_struct.c: Don't xfail mips.
|
||||
* testsuite/libffi.call/cls_pointer.c: Ditto.
|
||||
* testsuite/libffi.call/cls_pointer_stack.c: Ditto.
|
||||
* testsuite/libffi.call/cls_longdouble_va.c: Ditto.
|
||||
* testsuite/libffi.call/cls_longdouble.c: Ditto.
|
||||
* testsuite/libffi.call/cls_double_va.c: Ditto.
|
||||
|
||||
2009-12-25 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* fficonfig.h.in: Rebuilt again.
|
||||
@@ -12,17 +43,6 @@
|
||||
* fficonfig.h.in: Rebuilt.
|
||||
* src/closures.c (dlmmap): Define version for snow leopard.
|
||||
|
||||
2009-10-05 Bradley Smith <brad@brad-smith.co.uk>
|
||||
|
||||
* configure.ac, Makefile.am, src/avr32/ffi.c,
|
||||
src/avr32/ffitarget.h,
|
||||
src/avr32/sysv.S: Add AVR32 port.
|
||||
* testsuite/libffi.call/cls_dbls_struct.c,
|
||||
testsuite/libffi.call/cls_double_va.c,
|
||||
testsuite/libffi.call/cls_longdouble_va.c,
|
||||
testsuite/libffi.call/huge_struct.c: Mark expected failures on
|
||||
AVR32.
|
||||
|
||||
2009-06-16 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* testsuite/libffi.call/cls_align_sint64.c,
|
||||
@@ -0,0 +1,344 @@
|
||||
/* Area: ffi_call, closure_call
|
||||
Purpose: Check large structure returns.
|
||||
Limitations: none.
|
||||
PR: none.
|
||||
Originator: Blake Chaffin 6/18/2007
|
||||
*/
|
||||
|
||||
/* { dg-excess-errors "" { target avr32-*-* x86_64-*-mingw* x86_64-*-cygwin* } } */
|
||||
/* { dg-do run { xfail arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
/* { dg-options -mlong-double-128 { target powerpc64*-*-* } } */
|
||||
/* { dg-output "" { xfail avr32-*-* x86_64-*-mingw* x86_64-*-cygwin* } } */
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct BigStruct{
|
||||
uint8_t a;
|
||||
int8_t b;
|
||||
uint16_t c;
|
||||
int16_t d;
|
||||
uint32_t e;
|
||||
int32_t f;
|
||||
uint64_t g;
|
||||
int64_t h;
|
||||
float i;
|
||||
double j;
|
||||
long double k;
|
||||
char* l;
|
||||
uint8_t m;
|
||||
int8_t n;
|
||||
uint16_t o;
|
||||
int16_t p;
|
||||
uint32_t q;
|
||||
int32_t r;
|
||||
uint64_t s;
|
||||
int64_t t;
|
||||
float u;
|
||||
double v;
|
||||
long double w;
|
||||
char* x;
|
||||
uint8_t y;
|
||||
int8_t z;
|
||||
uint16_t aa;
|
||||
int16_t bb;
|
||||
uint32_t cc;
|
||||
int32_t dd;
|
||||
uint64_t ee;
|
||||
int64_t ff;
|
||||
float gg;
|
||||
double hh;
|
||||
long double ii;
|
||||
char* jj;
|
||||
uint8_t kk;
|
||||
int8_t ll;
|
||||
uint16_t mm;
|
||||
int16_t nn;
|
||||
uint32_t oo;
|
||||
int32_t pp;
|
||||
uint64_t qq;
|
||||
int64_t rr;
|
||||
float ss;
|
||||
double tt;
|
||||
long double uu;
|
||||
char* vv;
|
||||
uint8_t ww;
|
||||
int8_t xx;
|
||||
} BigStruct;
|
||||
|
||||
BigStruct
|
||||
test_large_fn(
|
||||
uint8_t ui8_1,
|
||||
int8_t si8_1,
|
||||
uint16_t ui16_1,
|
||||
int16_t si16_1,
|
||||
uint32_t ui32_1,
|
||||
int32_t si32_1,
|
||||
uint64_t ui64_1,
|
||||
int64_t si64_1,
|
||||
float f_1,
|
||||
double d_1,
|
||||
long double ld_1,
|
||||
char* p_1,
|
||||
uint8_t ui8_2,
|
||||
int8_t si8_2,
|
||||
uint16_t ui16_2,
|
||||
int16_t si16_2,
|
||||
uint32_t ui32_2,
|
||||
int32_t si32_2,
|
||||
uint64_t ui64_2,
|
||||
int64_t si64_2,
|
||||
float f_2,
|
||||
double d_2,
|
||||
long double ld_2,
|
||||
char* p_2,
|
||||
uint8_t ui8_3,
|
||||
int8_t si8_3,
|
||||
uint16_t ui16_3,
|
||||
int16_t si16_3,
|
||||
uint32_t ui32_3,
|
||||
int32_t si32_3,
|
||||
uint64_t ui64_3,
|
||||
int64_t si64_3,
|
||||
float f_3,
|
||||
double d_3,
|
||||
long double ld_3,
|
||||
char* p_3,
|
||||
uint8_t ui8_4,
|
||||
int8_t si8_4,
|
||||
uint16_t ui16_4,
|
||||
int16_t si16_4,
|
||||
uint32_t ui32_4,
|
||||
int32_t si32_4,
|
||||
uint64_t ui64_4,
|
||||
int64_t si64_4,
|
||||
float f_4,
|
||||
double d_4,
|
||||
long double ld_4,
|
||||
char* p_4,
|
||||
uint8_t ui8_5,
|
||||
int8_t si8_5)
|
||||
{
|
||||
BigStruct retVal = {
|
||||
ui8_1 + 1, si8_1 + 1, ui16_1 + 1, si16_1 + 1, ui32_1 + 1, si32_1 + 1,
|
||||
ui64_1 + 1, si64_1 + 1, f_1 + 1, d_1 + 1, ld_1 + 1, (char*)((intptr_t)p_1 + 1),
|
||||
ui8_2 + 2, si8_2 + 2, ui16_2 + 2, si16_2 + 2, ui32_2 + 2, si32_2 + 2,
|
||||
ui64_2 + 2, si64_2 + 2, f_2 + 2, d_2 + 2, ld_2 + 2, (char*)((intptr_t)p_2 + 2),
|
||||
ui8_3 + 3, si8_3 + 3, ui16_3 + 3, si16_3 + 3, ui32_3 + 3, si32_3 + 3,
|
||||
ui64_3 + 3, si64_3 + 3, f_3 + 3, d_3 + 3, ld_3 + 3, (char*)((intptr_t)p_3 + 3),
|
||||
ui8_4 + 4, si8_4 + 4, ui16_4 + 4, si16_4 + 4, ui32_4 + 4, si32_4 + 4,
|
||||
ui64_4 + 4, si64_4 + 4, f_4 + 4, d_4 + 4, ld_4 + 4, (char*)((intptr_t)p_4 + 4),
|
||||
ui8_5 + 5, si8_5 + 5};
|
||||
|
||||
printf("%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p %hhu %hhd: "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p %hhu %hhd\n",
|
||||
ui8_1, si8_1, ui16_1, si16_1, ui32_1, si32_1, ui64_1, si64_1, f_1, d_1, ld_1, p_1,
|
||||
ui8_2, si8_2, ui16_2, si16_2, ui32_2, si32_2, ui64_2, si64_2, f_2, d_2, ld_2, p_2,
|
||||
ui8_3, si8_3, ui16_3, si16_3, ui32_3, si32_3, ui64_3, si64_3, f_3, d_3, ld_3, p_3,
|
||||
ui8_4, si8_4, ui16_4, si16_4, ui32_4, si32_4, ui64_4, si64_4, f_4, d_4, ld_4, p_4, ui8_5, si8_5,
|
||||
retVal.a, retVal.b, retVal.c, retVal.d, retVal.e, retVal.f,
|
||||
retVal.g, retVal.h, retVal.i, retVal.j, retVal.k, retVal.l,
|
||||
retVal.m, retVal.n, retVal.o, retVal.p, retVal.q, retVal.r,
|
||||
retVal.s, retVal.t, retVal.u, retVal.v, retVal.w, retVal.x,
|
||||
retVal.y, retVal.z, retVal.aa, retVal.bb, retVal.cc, retVal.dd,
|
||||
retVal.ee, retVal.ff, retVal.gg, retVal.hh, retVal.ii, retVal.jj,
|
||||
retVal.kk, retVal.ll, retVal.mm, retVal.nn, retVal.oo, retVal.pp,
|
||||
retVal.qq, retVal.rr, retVal.ss, retVal.tt, retVal.uu, retVal.vv, retVal.ww, retVal.xx);
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
static void
|
||||
cls_large_fn(ffi_cif* cif __UNUSED__, void* resp, void** args, void* userdata __UNUSED__)
|
||||
{
|
||||
uint8_t ui8_1 = *(uint8_t*)args[0];
|
||||
int8_t si8_1 = *(int8_t*)args[1];
|
||||
uint16_t ui16_1 = *(uint16_t*)args[2];
|
||||
int16_t si16_1 = *(int16_t*)args[3];
|
||||
uint32_t ui32_1 = *(uint32_t*)args[4];
|
||||
int32_t si32_1 = *(int32_t*)args[5];
|
||||
uint64_t ui64_1 = *(uint64_t*)args[6];
|
||||
int64_t si64_1 = *(int64_t*)args[7];
|
||||
float f_1 = *(float*)args[8];
|
||||
double d_1 = *(double*)args[9];
|
||||
long double ld_1 = *(long double*)args[10];
|
||||
char* p_1 = *(char**)args[11];
|
||||
uint8_t ui8_2 = *(uint8_t*)args[12];
|
||||
int8_t si8_2 = *(int8_t*)args[13];
|
||||
uint16_t ui16_2 = *(uint16_t*)args[14];
|
||||
int16_t si16_2 = *(int16_t*)args[15];
|
||||
uint32_t ui32_2 = *(uint32_t*)args[16];
|
||||
int32_t si32_2 = *(int32_t*)args[17];
|
||||
uint64_t ui64_2 = *(uint64_t*)args[18];
|
||||
int64_t si64_2 = *(int64_t*)args[19];
|
||||
float f_2 = *(float*)args[20];
|
||||
double d_2 = *(double*)args[21];
|
||||
long double ld_2 = *(long double*)args[22];
|
||||
char* p_2 = *(char**)args[23];
|
||||
uint8_t ui8_3 = *(uint8_t*)args[24];
|
||||
int8_t si8_3 = *(int8_t*)args[25];
|
||||
uint16_t ui16_3 = *(uint16_t*)args[26];
|
||||
int16_t si16_3 = *(int16_t*)args[27];
|
||||
uint32_t ui32_3 = *(uint32_t*)args[28];
|
||||
int32_t si32_3 = *(int32_t*)args[29];
|
||||
uint64_t ui64_3 = *(uint64_t*)args[30];
|
||||
int64_t si64_3 = *(int64_t*)args[31];
|
||||
float f_3 = *(float*)args[32];
|
||||
double d_3 = *(double*)args[33];
|
||||
long double ld_3 = *(long double*)args[34];
|
||||
char* p_3 = *(char**)args[35];
|
||||
uint8_t ui8_4 = *(uint8_t*)args[36];
|
||||
int8_t si8_4 = *(int8_t*)args[37];
|
||||
uint16_t ui16_4 = *(uint16_t*)args[38];
|
||||
int16_t si16_4 = *(int16_t*)args[39];
|
||||
uint32_t ui32_4 = *(uint32_t*)args[40];
|
||||
int32_t si32_4 = *(int32_t*)args[41];
|
||||
uint64_t ui64_4 = *(uint64_t*)args[42];
|
||||
int64_t si64_4 = *(int64_t*)args[43];
|
||||
float f_4 = *(float*)args[44];
|
||||
double d_4 = *(double*)args[45];
|
||||
long double ld_4 = *(long double*)args[46];
|
||||
char* p_4 = *(char**)args[47];
|
||||
uint8_t ui8_5 = *(uint8_t*)args[48];
|
||||
int8_t si8_5 = *(int8_t*)args[49];
|
||||
|
||||
*(BigStruct*)resp = test_large_fn(
|
||||
ui8_1, si8_1, ui16_1, si16_1, ui32_1, si32_1, ui64_1, si64_1, f_1, d_1, ld_1, p_1,
|
||||
ui8_2, si8_2, ui16_2, si16_2, ui32_2, si32_2, ui64_2, si64_2, f_2, d_2, ld_2, p_2,
|
||||
ui8_3, si8_3, ui16_3, si16_3, ui32_3, si32_3, ui64_3, si64_3, f_3, d_3, ld_3, p_3,
|
||||
ui8_4, si8_4, ui16_4, si16_4, ui32_4, si32_4, ui64_4, si64_4, f_4, d_4, ld_4, p_4,
|
||||
ui8_5, si8_5);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc __UNUSED__, const char** argv __UNUSED__)
|
||||
{
|
||||
void *code;
|
||||
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
|
||||
|
||||
ffi_cif cif;
|
||||
ffi_type* argTypes[51];
|
||||
void* argValues[51];
|
||||
|
||||
ffi_type ret_struct_type;
|
||||
ffi_type* st_fields[51];
|
||||
BigStruct retVal;
|
||||
|
||||
memset (&retVal, 0, sizeof(retVal));
|
||||
|
||||
ret_struct_type.size = 0;
|
||||
ret_struct_type.alignment = 0;
|
||||
ret_struct_type.type = FFI_TYPE_STRUCT;
|
||||
ret_struct_type.elements = st_fields;
|
||||
|
||||
st_fields[0] = st_fields[12] = st_fields[24] = st_fields[36] = st_fields[48] = &ffi_type_uint8;
|
||||
st_fields[1] = st_fields[13] = st_fields[25] = st_fields[37] = st_fields[49] = &ffi_type_sint8;
|
||||
st_fields[2] = st_fields[14] = st_fields[26] = st_fields[38] = &ffi_type_uint16;
|
||||
st_fields[3] = st_fields[15] = st_fields[27] = st_fields[39] = &ffi_type_sint16;
|
||||
st_fields[4] = st_fields[16] = st_fields[28] = st_fields[40] = &ffi_type_uint32;
|
||||
st_fields[5] = st_fields[17] = st_fields[29] = st_fields[41] = &ffi_type_sint32;
|
||||
st_fields[6] = st_fields[18] = st_fields[30] = st_fields[42] = &ffi_type_uint64;
|
||||
st_fields[7] = st_fields[19] = st_fields[31] = st_fields[43] = &ffi_type_sint64;
|
||||
st_fields[8] = st_fields[20] = st_fields[32] = st_fields[44] = &ffi_type_float;
|
||||
st_fields[9] = st_fields[21] = st_fields[33] = st_fields[45] = &ffi_type_double;
|
||||
st_fields[10] = st_fields[22] = st_fields[34] = st_fields[46] = &ffi_type_longdouble;
|
||||
st_fields[11] = st_fields[23] = st_fields[35] = st_fields[47] = &ffi_type_pointer;
|
||||
|
||||
st_fields[50] = NULL;
|
||||
|
||||
uint8_t ui8 = 1;
|
||||
int8_t si8 = 2;
|
||||
uint16_t ui16 = 3;
|
||||
int16_t si16 = 4;
|
||||
uint32_t ui32 = 5;
|
||||
int32_t si32 = 6;
|
||||
uint64_t ui64 = 7;
|
||||
int64_t si64 = 8;
|
||||
float f = 9;
|
||||
double d = 10;
|
||||
long double ld = 11;
|
||||
char* p = (char*)0x12345678;
|
||||
|
||||
argTypes[0] = argTypes[12] = argTypes[24] = argTypes[36] = argTypes[48] = &ffi_type_uint8;
|
||||
argValues[0] = argValues[12] = argValues[24] = argValues[36] = argValues[48] = &ui8;
|
||||
argTypes[1] = argTypes[13] = argTypes[25] = argTypes[37] = argTypes[49] = &ffi_type_sint8;
|
||||
argValues[1] = argValues[13] = argValues[25] = argValues[37] = argValues[49] = &si8;
|
||||
argTypes[2] = argTypes[14] = argTypes[26] = argTypes[38] = &ffi_type_uint16;
|
||||
argValues[2] = argValues[14] = argValues[26] = argValues[38] = &ui16;
|
||||
argTypes[3] = argTypes[15] = argTypes[27] = argTypes[39] = &ffi_type_sint16;
|
||||
argValues[3] = argValues[15] = argValues[27] = argValues[39] = &si16;
|
||||
argTypes[4] = argTypes[16] = argTypes[28] = argTypes[40] = &ffi_type_uint32;
|
||||
argValues[4] = argValues[16] = argValues[28] = argValues[40] = &ui32;
|
||||
argTypes[5] = argTypes[17] = argTypes[29] = argTypes[41] = &ffi_type_sint32;
|
||||
argValues[5] = argValues[17] = argValues[29] = argValues[41] = &si32;
|
||||
argTypes[6] = argTypes[18] = argTypes[30] = argTypes[42] = &ffi_type_uint64;
|
||||
argValues[6] = argValues[18] = argValues[30] = argValues[42] = &ui64;
|
||||
argTypes[7] = argTypes[19] = argTypes[31] = argTypes[43] = &ffi_type_sint64;
|
||||
argValues[7] = argValues[19] = argValues[31] = argValues[43] = &si64;
|
||||
argTypes[8] = argTypes[20] = argTypes[32] = argTypes[44] = &ffi_type_float;
|
||||
argValues[8] = argValues[20] = argValues[32] = argValues[44] = &f;
|
||||
argTypes[9] = argTypes[21] = argTypes[33] = argTypes[45] = &ffi_type_double;
|
||||
argValues[9] = argValues[21] = argValues[33] = argValues[45] = &d;
|
||||
argTypes[10] = argTypes[22] = argTypes[34] = argTypes[46] = &ffi_type_longdouble;
|
||||
argValues[10] = argValues[22] = argValues[34] = argValues[46] = &ld;
|
||||
argTypes[11] = argTypes[23] = argTypes[35] = argTypes[47] = &ffi_type_pointer;
|
||||
argValues[11] = argValues[23] = argValues[35] = argValues[47] = &p;
|
||||
|
||||
argTypes[50] = NULL;
|
||||
argValues[50] = NULL;
|
||||
|
||||
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 50, &ret_struct_type, argTypes) == FFI_OK);
|
||||
|
||||
ffi_call(&cif, FFI_FN(test_large_fn), &retVal, argValues);
|
||||
// { dg-output "1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
|
||||
printf("res: %hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p %hhu %hhd\n",
|
||||
retVal.a, retVal.b, retVal.c, retVal.d, retVal.e, retVal.f,
|
||||
retVal.g, retVal.h, retVal.i, retVal.j, retVal.k, retVal.l,
|
||||
retVal.m, retVal.n, retVal.o, retVal.p, retVal.q, retVal.r,
|
||||
retVal.s, retVal.t, retVal.u, retVal.v, retVal.w, retVal.x,
|
||||
retVal.y, retVal.z, retVal.aa, retVal.bb, retVal.cc, retVal.dd,
|
||||
retVal.ee, retVal.ff, retVal.gg, retVal.hh, retVal.ii, retVal.jj,
|
||||
retVal.kk, retVal.ll, retVal.mm, retVal.nn, retVal.oo, retVal.pp,
|
||||
retVal.qq, retVal.rr, retVal.ss, retVal.tt, retVal.uu, retVal.vv, retVal.ww, retVal.xx);
|
||||
// { dg-output "\nres: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
|
||||
|
||||
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_large_fn, NULL, code) == FFI_OK);
|
||||
|
||||
retVal = ((BigStruct(*)(
|
||||
uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t, float, double, long double, char*,
|
||||
uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t, float, double, long double, char*,
|
||||
uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t, float, double, long double, char*,
|
||||
uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t, float, double, long double, char*,
|
||||
uint8_t, int8_t))(code))(
|
||||
ui8, si8, ui16, si16, ui32, si32, ui64, si64, f, d, ld, p,
|
||||
ui8, si8, ui16, si16, ui32, si32, ui64, si64, f, d, ld, p,
|
||||
ui8, si8, ui16, si16, ui32, si32, ui64, si64, f, d, ld, p,
|
||||
ui8, si8, ui16, si16, ui32, si32, ui64, si64, f, d, ld, p,
|
||||
ui8, si8);
|
||||
// { dg-output "\n1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
|
||||
printf("res: %hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p %hhu %hhd\n",
|
||||
retVal.a, retVal.b, retVal.c, retVal.d, retVal.e, retVal.f,
|
||||
retVal.g, retVal.h, retVal.i, retVal.j, retVal.k, retVal.l,
|
||||
retVal.m, retVal.n, retVal.o, retVal.p, retVal.q, retVal.r,
|
||||
retVal.s, retVal.t, retVal.u, retVal.v, retVal.w, retVal.x,
|
||||
retVal.y, retVal.z, retVal.aa, retVal.bb, retVal.cc, retVal.dd,
|
||||
retVal.ee, retVal.ff, retVal.gg, retVal.hh, retVal.ii, retVal.jj,
|
||||
retVal.kk, retVal.ll, retVal.mm, retVal.nn, retVal.oo, retVal.pp,
|
||||
retVal.qq, retVal.rr, retVal.ss, retVal.tt, retVal.uu, retVal.vv, retVal.ww, retVal.xx);
|
||||
// { dg-output "\nres: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,24 +1,3 @@
|
||||
2009-10-11 Matthias Klose <doko@ubuntu.com>
|
||||
|
||||
* man/ffi_call.3: Fix #include in examples.
|
||||
* doc/libffi.texi: Add dircategory.
|
||||
|
||||
2009-10-23 Frank Everdij <f.p.x.everdij@tudelft.nl>
|
||||
|
||||
* include/ffi.h.in: Placed '__GNUC__' ifdef around
|
||||
'__attribute__((aligned(8)))' in ffi_closure, fixes compile for
|
||||
IRIX MIPSPro c99.
|
||||
* include/ffi_common.h: Added '__sgi' define to non
|
||||
'__attribute__((__mode__()))' integer typedefs.
|
||||
* src/mips/ffi.c (ffi_call, ffi_closure_mips_inner_O32,
|
||||
ffi_closure_mips_inner_N32): Added 'defined(_MIPSEB)' to BE check.
|
||||
(ffi_closure_mips_inner_O32, ffi_closure_mips_inner_N32): Added
|
||||
FFI_LONGDOUBLE support and alignment(N32 only).
|
||||
* src/mips/ffitarget.h: Corrected '#include <sgidefs.h>' for IRIX and
|
||||
fixed non '__attribute__((__mode__()))' integer typedefs.
|
||||
* src/mips/n32.S: Put '#ifdef linux' around '.abicalls' and '.eh_frame'
|
||||
since they are Linux/GNU Assembler specific.
|
||||
|
||||
2009-12-25 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* fficonfig.h.in: Rebuilt again.
|
||||
@@ -33,17 +12,6 @@
|
||||
* fficonfig.h.in: Rebuilt.
|
||||
* src/closures.c (dlmmap): Define version for snow leopard.
|
||||
|
||||
2009-10-05 Bradley Smith <brad@brad-smith.co.uk>
|
||||
|
||||
* configure.ac, Makefile.am, src/avr32/ffi.c,
|
||||
src/avr32/ffitarget.h,
|
||||
src/avr32/sysv.S: Add AVR32 port.
|
||||
* testsuite/libffi.call/cls_dbls_struct.c,
|
||||
testsuite/libffi.call/cls_double_va.c,
|
||||
testsuite/libffi.call/cls_longdouble_va.c,
|
||||
testsuite/libffi.call/huge_struct.c: Mark expected failures on
|
||||
AVR32.
|
||||
|
||||
2009-06-16 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* testsuite/libffi.call/cls_align_sint64.c,
|
||||
|
||||
@@ -22,27 +22,6 @@
|
||||
* testsuite/libffi.call/cls_longdouble.c: Ditto.
|
||||
* testsuite/libffi.call/cls_double_va.c: Ditto.
|
||||
|
||||
2009-10-11 Matthias Klose <doko@ubuntu.com>
|
||||
|
||||
* man/ffi_call.3: Fix #include in examples.
|
||||
* doc/libffi.texi: Add dircategory.
|
||||
|
||||
2009-10-23 Frank Everdij <f.p.x.everdij@tudelft.nl>
|
||||
|
||||
* include/ffi.h.in: Placed '__GNUC__' ifdef around
|
||||
'__attribute__((aligned(8)))' in ffi_closure, fixes compile for
|
||||
IRIX MIPSPro c99.
|
||||
* include/ffi_common.h: Added '__sgi' define to non
|
||||
'__attribute__((__mode__()))' integer typedefs.
|
||||
* src/mips/ffi.c (ffi_call, ffi_closure_mips_inner_O32,
|
||||
ffi_closure_mips_inner_N32): Added 'defined(_MIPSEB)' to BE check.
|
||||
(ffi_closure_mips_inner_O32, ffi_closure_mips_inner_N32): Added
|
||||
FFI_LONGDOUBLE support and alignment(N32 only).
|
||||
* src/mips/ffitarget.h: Corrected '#include <sgidefs.h>' for IRIX and
|
||||
fixed non '__attribute__((__mode__()))' integer typedefs.
|
||||
* src/mips/n32.S: Put '#ifdef linux' around '.abicalls' and '.eh_frame'
|
||||
since they are Linux/GNU Assembler specific.
|
||||
|
||||
2009-12-25 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* fficonfig.h.in: Rebuilt again.
|
||||
@@ -57,17 +36,6 @@
|
||||
* fficonfig.h.in: Rebuilt.
|
||||
* src/closures.c (dlmmap): Define version for snow leopard.
|
||||
|
||||
2009-10-05 Bradley Smith <brad@brad-smith.co.uk>
|
||||
|
||||
* configure.ac, Makefile.am, src/avr32/ffi.c,
|
||||
src/avr32/ffitarget.h,
|
||||
src/avr32/sysv.S: Add AVR32 port.
|
||||
* testsuite/libffi.call/cls_dbls_struct.c,
|
||||
testsuite/libffi.call/cls_double_va.c,
|
||||
testsuite/libffi.call/cls_longdouble_va.c,
|
||||
testsuite/libffi.call/huge_struct.c: Mark expected failures on
|
||||
AVR32.
|
||||
|
||||
2009-06-16 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* testsuite/libffi.call/cls_align_sint64.c,
|
||||
|
||||
@@ -1,395 +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. */
|
||||
#define @TARGET@
|
||||
|
||||
/* ---- 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
|
||||
|
||||
typedef struct {
|
||||
char tramp[FFI_TRAMPOLINE_SIZE];
|
||||
ffi_cif *cif;
|
||||
void (*fun)(ffi_cif*,void*,void**,void*);
|
||||
void *user_data;
|
||||
} ffi_closure __attribute__((aligned (8)));
|
||||
|
||||
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
|
||||
@@ -1,116 +0,0 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
ffi_common.h - Copyright (c) 1996 Red Hat, Inc.
|
||||
Copyright (C) 2007 Free Software Foundation, Inc
|
||||
|
||||
Common internal definitions and macros. Only necessary for building
|
||||
libffi.
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
#ifndef FFI_COMMON_H
|
||||
#define FFI_COMMON_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <fficonfig.h>
|
||||
|
||||
/* Do not move this. Some versions of AIX are very picky about where
|
||||
this is positioned. */
|
||||
#ifdef __GNUC__
|
||||
/* mingw64 defines this already in malloc.h. */
|
||||
#ifndef alloca
|
||||
# define alloca __builtin_alloca
|
||||
#endif
|
||||
# define MAYBE_UNUSED __attribute__((__unused__))
|
||||
#else
|
||||
# define MAYBE_UNUSED
|
||||
# if HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
# else
|
||||
# ifdef _AIX
|
||||
#pragma alloca
|
||||
# else
|
||||
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
||||
# ifdef _MSC_VER
|
||||
# define alloca _alloca
|
||||
# else
|
||||
char *alloca ();
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Check for the existence of memcpy. */
|
||||
#if STDC_HEADERS
|
||||
# include <string.h>
|
||||
#else
|
||||
# ifndef HAVE_MEMCPY
|
||||
# define memcpy(d, s, n) bcopy ((s), (d), (n))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(FFI_DEBUG)
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifdef FFI_DEBUG
|
||||
void ffi_assert(char *expr, char *file, int line);
|
||||
void ffi_stop_here(void);
|
||||
void ffi_type_test(ffi_type *a, char *file, int line);
|
||||
|
||||
#define FFI_ASSERT(x) ((x) ? (void)0 : ffi_assert(#x, __FILE__,__LINE__))
|
||||
#define FFI_ASSERT_AT(x, f, l) ((x) ? 0 : ffi_assert(#x, (f), (l)))
|
||||
#define FFI_ASSERT_VALID_TYPE(x) ffi_type_test (x, __FILE__, __LINE__)
|
||||
#else
|
||||
#define FFI_ASSERT(x)
|
||||
#define FFI_ASSERT_AT(x, f, l)
|
||||
#define FFI_ASSERT_VALID_TYPE(x)
|
||||
#endif
|
||||
|
||||
#define ALIGN(v, a) (((((size_t) (v))-1) | ((a)-1))+1)
|
||||
#define ALIGN_DOWN(v, a) (((size_t) (v)) & -a)
|
||||
|
||||
/* Perform machine dependent cif processing */
|
||||
ffi_status ffi_prep_cif_machdep(ffi_cif *cif);
|
||||
|
||||
/* Extended cif, used in callback from assembly routine */
|
||||
typedef struct
|
||||
{
|
||||
ffi_cif *cif;
|
||||
void *rvalue;
|
||||
void **avalue;
|
||||
} extended_cif;
|
||||
|
||||
/* Terse sized type definitions. */
|
||||
#ifdef _MSC_VER
|
||||
typedef unsigned char UINT8;
|
||||
typedef signed char SINT8;
|
||||
typedef unsigned short UINT16;
|
||||
typedef signed short SINT16;
|
||||
typedef unsigned int UINT32;
|
||||
typedef signed int SINT32;
|
||||
typedef unsigned __int64 UINT64;
|
||||
typedef signed __int64 SINT64;
|
||||
#else
|
||||
typedef unsigned int UINT8 __attribute__((__mode__(__QI__)));
|
||||
typedef signed int SINT8 __attribute__((__mode__(__QI__)));
|
||||
typedef unsigned int UINT16 __attribute__((__mode__(__HI__)));
|
||||
typedef signed int SINT16 __attribute__((__mode__(__HI__)));
|
||||
typedef unsigned int UINT32 __attribute__((__mode__(__SI__)));
|
||||
typedef signed int SINT32 __attribute__((__mode__(__SI__)));
|
||||
typedef unsigned int UINT64 __attribute__((__mode__(__DI__)));
|
||||
typedef signed int SINT64 __attribute__((__mode__(__DI__)));
|
||||
#endif
|
||||
|
||||
typedef float FLOAT32;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,221 +0,0 @@
|
||||
/* -----------------------------------------------------------------*-C-*-
|
||||
ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc.
|
||||
Target configuration macros for MIPS.
|
||||
|
||||
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.
|
||||
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
#ifndef LIBFFI_TARGET_H
|
||||
#define LIBFFI_TARGET_H
|
||||
|
||||
#ifdef linux
|
||||
#include <asm/sgidefs.h>
|
||||
# ifndef _ABIN32
|
||||
# define _ABIN32 _MIPS_SIM_NABI32
|
||||
# endif
|
||||
# ifndef _ABI64
|
||||
# define _ABI64 _MIPS_SIM_ABI64
|
||||
# endif
|
||||
# ifndef _ABIO32
|
||||
# define _ABIO32 _MIPS_SIM_ABI32
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(_MIPS_SIM)
|
||||
-- something is very wrong --
|
||||
#else
|
||||
# if (_MIPS_SIM==_ABIN32 && defined(_ABIN32)) || (_MIPS_SIM==_ABI64 && defined(_ABI64))
|
||||
# define FFI_MIPS_N32
|
||||
# else
|
||||
# if (_MIPS_SIM==_ABIO32 && defined(_ABIO32))
|
||||
# define FFI_MIPS_O32
|
||||
# else
|
||||
-- this is an unsupported platform --
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef FFI_MIPS_O32
|
||||
/* O32 stack frames have 32bit integer args */
|
||||
# define FFI_SIZEOF_ARG 4
|
||||
#else
|
||||
/* N32 and N64 frames have 64bit integer args */
|
||||
# define FFI_SIZEOF_ARG 8
|
||||
# if _MIPS_SIM == _ABIN32
|
||||
# define FFI_SIZEOF_JAVA_RAW 4
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define FFI_FLAG_BITS 2
|
||||
|
||||
/* SGI's strange assembler requires that we multiply by 4 rather
|
||||
than shift left by FFI_FLAG_BITS */
|
||||
|
||||
#define FFI_ARGS_D FFI_TYPE_DOUBLE
|
||||
#define FFI_ARGS_F FFI_TYPE_FLOAT
|
||||
#define FFI_ARGS_DD FFI_TYPE_DOUBLE * 4 + FFI_TYPE_DOUBLE
|
||||
#define FFI_ARGS_FF FFI_TYPE_FLOAT * 4 + FFI_TYPE_FLOAT
|
||||
#define FFI_ARGS_FD FFI_TYPE_DOUBLE * 4 + FFI_TYPE_FLOAT
|
||||
#define FFI_ARGS_DF FFI_TYPE_FLOAT * 4 + FFI_TYPE_DOUBLE
|
||||
|
||||
/* Needed for N32 structure returns */
|
||||
#define FFI_TYPE_SMALLSTRUCT FFI_TYPE_UINT8
|
||||
#define FFI_TYPE_SMALLSTRUCT2 FFI_TYPE_SINT8
|
||||
|
||||
#if 0
|
||||
/* The SGI assembler can't handle this.. */
|
||||
#define FFI_TYPE_STRUCT_DD (( FFI_ARGS_DD ) << 4) + FFI_TYPE_STRUCT
|
||||
/* (and so on) */
|
||||
#else
|
||||
/* ...so we calculate these by hand! */
|
||||
#define FFI_TYPE_STRUCT_D 61
|
||||
#define FFI_TYPE_STRUCT_F 45
|
||||
#define FFI_TYPE_STRUCT_DD 253
|
||||
#define FFI_TYPE_STRUCT_FF 173
|
||||
#define FFI_TYPE_STRUCT_FD 237
|
||||
#define FFI_TYPE_STRUCT_DF 189
|
||||
#define FFI_TYPE_STRUCT_SMALL 93
|
||||
#define FFI_TYPE_STRUCT_SMALL2 109
|
||||
|
||||
/* and for n32 soft float, add 16 * 2^4 */
|
||||
#define FFI_TYPE_STRUCT_D_SOFT 317
|
||||
#define FFI_TYPE_STRUCT_F_SOFT 301
|
||||
#define FFI_TYPE_STRUCT_DD_SOFT 509
|
||||
#define FFI_TYPE_STRUCT_FF_SOFT 429
|
||||
#define FFI_TYPE_STRUCT_FD_SOFT 493
|
||||
#define FFI_TYPE_STRUCT_DF_SOFT 445
|
||||
#define FFI_TYPE_STRUCT_SOFT 16
|
||||
#endif
|
||||
|
||||
#ifdef LIBFFI_ASM
|
||||
#define v0 $2
|
||||
#define v1 $3
|
||||
#define a0 $4
|
||||
#define a1 $5
|
||||
#define a2 $6
|
||||
#define a3 $7
|
||||
#define a4 $8
|
||||
#define a5 $9
|
||||
#define a6 $10
|
||||
#define a7 $11
|
||||
#define t0 $8
|
||||
#define t1 $9
|
||||
#define t2 $10
|
||||
#define t3 $11
|
||||
#define t4 $12
|
||||
#define t5 $13
|
||||
#define t6 $14
|
||||
#define t7 $15
|
||||
#define t8 $24
|
||||
#define t9 $25
|
||||
#define ra $31
|
||||
|
||||
#ifdef FFI_MIPS_O32
|
||||
# define REG_L lw
|
||||
# define REG_S sw
|
||||
# define SUBU subu
|
||||
# define ADDU addu
|
||||
# define SRL srl
|
||||
# define LI li
|
||||
#else /* !FFI_MIPS_O32 */
|
||||
# define REG_L ld
|
||||
# define REG_S sd
|
||||
# define SUBU dsubu
|
||||
# define ADDU daddu
|
||||
# define SRL dsrl
|
||||
# define LI dli
|
||||
# if (_MIPS_SIM==_ABI64)
|
||||
# define LA dla
|
||||
# define EH_FRAME_ALIGN 3
|
||||
# define FDE_ADDR_BYTES .8byte
|
||||
# else
|
||||
# define LA la
|
||||
# define EH_FRAME_ALIGN 2
|
||||
# define FDE_ADDR_BYTES .4byte
|
||||
# endif /* _MIPS_SIM==_ABI64 */
|
||||
#endif /* !FFI_MIPS_O32 */
|
||||
#else /* !LIBFFI_ASM */
|
||||
#ifdef FFI_MIPS_O32
|
||||
/* O32 stack frames have 32bit integer args */
|
||||
typedef unsigned int ffi_arg __attribute__((__mode__(__SI__)));
|
||||
typedef signed int ffi_sarg __attribute__((__mode__(__SI__)));
|
||||
#else
|
||||
/* N32 and N64 frames have 64bit integer args */
|
||||
typedef unsigned int ffi_arg __attribute__((__mode__(__DI__)));
|
||||
typedef signed int ffi_sarg __attribute__((__mode__(__DI__)));
|
||||
#endif
|
||||
|
||||
typedef enum ffi_abi {
|
||||
FFI_FIRST_ABI = 0,
|
||||
FFI_O32,
|
||||
FFI_N32,
|
||||
FFI_N64,
|
||||
FFI_O32_SOFT_FLOAT,
|
||||
FFI_N32_SOFT_FLOAT,
|
||||
FFI_N64_SOFT_FLOAT,
|
||||
|
||||
#ifdef FFI_MIPS_O32
|
||||
#ifdef __mips_soft_float
|
||||
FFI_DEFAULT_ABI = FFI_O32_SOFT_FLOAT,
|
||||
#else
|
||||
FFI_DEFAULT_ABI = FFI_O32,
|
||||
#endif
|
||||
#else
|
||||
# if _MIPS_SIM==_ABI64
|
||||
# ifdef __mips_soft_float
|
||||
FFI_DEFAULT_ABI = FFI_N64_SOFT_FLOAT,
|
||||
# else
|
||||
FFI_DEFAULT_ABI = FFI_N64,
|
||||
# endif
|
||||
# else
|
||||
# ifdef __mips_soft_float
|
||||
FFI_DEFAULT_ABI = FFI_N32_SOFT_FLOAT,
|
||||
# else
|
||||
FFI_DEFAULT_ABI = FFI_N32,
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
|
||||
} ffi_abi;
|
||||
|
||||
#define FFI_EXTRA_CIF_FIELDS unsigned rstruct_flag
|
||||
#endif /* !LIBFFI_ASM */
|
||||
|
||||
/* ---- Definitions for closures ----------------------------------------- */
|
||||
|
||||
#if defined(FFI_MIPS_O32)
|
||||
#define FFI_CLOSURES 1
|
||||
#define FFI_TRAMPOLINE_SIZE 20
|
||||
#else
|
||||
/* N32/N64. */
|
||||
# define FFI_CLOSURES 1
|
||||
#if _MIPS_SIM==_ABI64
|
||||
#define FFI_TRAMPOLINE_SIZE 52
|
||||
#else
|
||||
#define FFI_TRAMPOLINE_SIZE 20
|
||||
#endif
|
||||
#endif /* FFI_MIPS_O32 */
|
||||
#define FFI_NATIVE_RAW_API 0
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,587 +0,0 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
n32.S - Copyright (c) 1996, 1998, 2005 Red Hat, Inc.
|
||||
|
||||
MIPS 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.
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
#define LIBFFI_ASM
|
||||
#include <fficonfig.h>
|
||||
#include <ffi.h>
|
||||
|
||||
/* Only build this code if we are compiling for n32 */
|
||||
|
||||
#if defined(FFI_MIPS_N32)
|
||||
|
||||
#define callback a0
|
||||
#define bytes a2
|
||||
#define flags a3
|
||||
#define raddr a4
|
||||
#define fn a5
|
||||
|
||||
#define SIZEOF_FRAME ( 8 * FFI_SIZEOF_ARG )
|
||||
|
||||
.abicalls
|
||||
.text
|
||||
.align 2
|
||||
.globl ffi_call_N32
|
||||
.ent ffi_call_N32
|
||||
ffi_call_N32:
|
||||
.LFB3:
|
||||
.frame $fp, SIZEOF_FRAME, ra
|
||||
.mask 0xc0000000,-FFI_SIZEOF_ARG
|
||||
.fmask 0x00000000,0
|
||||
|
||||
# Prologue
|
||||
SUBU $sp, SIZEOF_FRAME # Frame size
|
||||
.LCFI0:
|
||||
REG_S $fp, SIZEOF_FRAME - 2*FFI_SIZEOF_ARG($sp) # Save frame pointer
|
||||
REG_S ra, SIZEOF_FRAME - 1*FFI_SIZEOF_ARG($sp) # Save return address
|
||||
.LCFI1:
|
||||
move $fp, $sp
|
||||
.LCFI3:
|
||||
move t9, callback # callback function pointer
|
||||
REG_S bytes, 2*FFI_SIZEOF_ARG($fp) # bytes
|
||||
REG_S flags, 3*FFI_SIZEOF_ARG($fp) # flags
|
||||
REG_S raddr, 4*FFI_SIZEOF_ARG($fp) # raddr
|
||||
REG_S fn, 5*FFI_SIZEOF_ARG($fp) # fn
|
||||
|
||||
# Allocate at least 4 words in the argstack
|
||||
move v0, bytes
|
||||
bge bytes, 4 * FFI_SIZEOF_ARG, bigger
|
||||
LI v0, 4 * FFI_SIZEOF_ARG
|
||||
b sixteen
|
||||
|
||||
bigger:
|
||||
ADDU t4, v0, 2 * FFI_SIZEOF_ARG -1 # make sure it is aligned
|
||||
and v0, t4, -2 * FFI_SIZEOF_ARG # to a proper boundry.
|
||||
|
||||
sixteen:
|
||||
SUBU $sp, $sp, v0 # move the stack pointer to reflect the
|
||||
# arg space
|
||||
|
||||
move a0, $sp # 4 * FFI_SIZEOF_ARG
|
||||
ADDU a3, $fp, 3 * FFI_SIZEOF_ARG
|
||||
|
||||
# Call ffi_prep_args
|
||||
jal t9
|
||||
|
||||
# Copy the stack pointer to t9
|
||||
move t9, $sp
|
||||
|
||||
# Fix the stack if there are more than 8 64bit slots worth
|
||||
# of arguments.
|
||||
|
||||
# Load the number of bytes
|
||||
REG_L t6, 2*FFI_SIZEOF_ARG($fp)
|
||||
|
||||
# Is it bigger than 8 * FFI_SIZEOF_ARG?
|
||||
daddiu t8, t6, -(8 * FFI_SIZEOF_ARG)
|
||||
bltz t8, loadregs
|
||||
|
||||
ADDU t9, t9, t8
|
||||
|
||||
loadregs:
|
||||
|
||||
REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6.
|
||||
|
||||
and t4, t6, ((1<<FFI_FLAG_BITS)-1)
|
||||
bnez t4, arg1_floatp
|
||||
REG_L a0, 0*FFI_SIZEOF_ARG(t9)
|
||||
b arg1_next
|
||||
arg1_floatp:
|
||||
bne t4, FFI_TYPE_FLOAT, arg1_doublep
|
||||
l.s $f12, 0*FFI_SIZEOF_ARG(t9)
|
||||
b arg1_next
|
||||
arg1_doublep:
|
||||
l.d $f12, 0*FFI_SIZEOF_ARG(t9)
|
||||
arg1_next:
|
||||
|
||||
SRL t4, t6, 1*FFI_FLAG_BITS
|
||||
and t4, ((1<<FFI_FLAG_BITS)-1)
|
||||
bnez t4, arg2_floatp
|
||||
REG_L a1, 1*FFI_SIZEOF_ARG(t9)
|
||||
b arg2_next
|
||||
arg2_floatp:
|
||||
bne t4, FFI_TYPE_FLOAT, arg2_doublep
|
||||
l.s $f13, 1*FFI_SIZEOF_ARG(t9)
|
||||
b arg2_next
|
||||
arg2_doublep:
|
||||
l.d $f13, 1*FFI_SIZEOF_ARG(t9)
|
||||
arg2_next:
|
||||
|
||||
SRL t4, t6, 2*FFI_FLAG_BITS
|
||||
and t4, ((1<<FFI_FLAG_BITS)-1)
|
||||
bnez t4, arg3_floatp
|
||||
REG_L a2, 2*FFI_SIZEOF_ARG(t9)
|
||||
b arg3_next
|
||||
arg3_floatp:
|
||||
bne t4, FFI_TYPE_FLOAT, arg3_doublep
|
||||
l.s $f14, 2*FFI_SIZEOF_ARG(t9)
|
||||
b arg3_next
|
||||
arg3_doublep:
|
||||
l.d $f14, 2*FFI_SIZEOF_ARG(t9)
|
||||
arg3_next:
|
||||
|
||||
SRL t4, t6, 3*FFI_FLAG_BITS
|
||||
and t4, ((1<<FFI_FLAG_BITS)-1)
|
||||
bnez t4, arg4_floatp
|
||||
REG_L a3, 3*FFI_SIZEOF_ARG(t9)
|
||||
b arg4_next
|
||||
arg4_floatp:
|
||||
bne t4, FFI_TYPE_FLOAT, arg4_doublep
|
||||
l.s $f15, 3*FFI_SIZEOF_ARG(t9)
|
||||
b arg4_next
|
||||
arg4_doublep:
|
||||
l.d $f15, 3*FFI_SIZEOF_ARG(t9)
|
||||
arg4_next:
|
||||
|
||||
SRL t4, t6, 4*FFI_FLAG_BITS
|
||||
and t4, ((1<<FFI_FLAG_BITS)-1)
|
||||
bnez t4, arg5_floatp
|
||||
REG_L a4, 4*FFI_SIZEOF_ARG(t9)
|
||||
b arg5_next
|
||||
arg5_floatp:
|
||||
bne t4, FFI_TYPE_FLOAT, arg5_doublep
|
||||
l.s $f16, 4*FFI_SIZEOF_ARG(t9)
|
||||
b arg5_next
|
||||
arg5_doublep:
|
||||
l.d $f16, 4*FFI_SIZEOF_ARG(t9)
|
||||
arg5_next:
|
||||
|
||||
SRL t4, t6, 5*FFI_FLAG_BITS
|
||||
and t4, ((1<<FFI_FLAG_BITS)-1)
|
||||
bnez t4, arg6_floatp
|
||||
REG_L a5, 5*FFI_SIZEOF_ARG(t9)
|
||||
b arg6_next
|
||||
arg6_floatp:
|
||||
bne t4, FFI_TYPE_FLOAT, arg6_doublep
|
||||
l.s $f17, 5*FFI_SIZEOF_ARG(t9)
|
||||
b arg6_next
|
||||
arg6_doublep:
|
||||
l.d $f17, 5*FFI_SIZEOF_ARG(t9)
|
||||
arg6_next:
|
||||
|
||||
SRL t4, t6, 6*FFI_FLAG_BITS
|
||||
and t4, ((1<<FFI_FLAG_BITS)-1)
|
||||
bnez t4, arg7_floatp
|
||||
REG_L a6, 6*FFI_SIZEOF_ARG(t9)
|
||||
b arg7_next
|
||||
arg7_floatp:
|
||||
bne t4, FFI_TYPE_FLOAT, arg7_doublep
|
||||
l.s $f18, 6*FFI_SIZEOF_ARG(t9)
|
||||
b arg7_next
|
||||
arg7_doublep:
|
||||
l.d $f18, 6*FFI_SIZEOF_ARG(t9)
|
||||
arg7_next:
|
||||
|
||||
SRL t4, t6, 7*FFI_FLAG_BITS
|
||||
and t4, ((1<<FFI_FLAG_BITS)-1)
|
||||
bnez t4, arg8_floatp
|
||||
REG_L a7, 7*FFI_SIZEOF_ARG(t9)
|
||||
b arg8_next
|
||||
arg8_floatp:
|
||||
bne t4, FFI_TYPE_FLOAT, arg8_doublep
|
||||
l.s $f19, 7*FFI_SIZEOF_ARG(t9)
|
||||
b arg8_next
|
||||
arg8_doublep:
|
||||
l.d $f19, 7*FFI_SIZEOF_ARG(t9)
|
||||
arg8_next:
|
||||
|
||||
callit:
|
||||
# Load the function pointer
|
||||
REG_L t9, 5*FFI_SIZEOF_ARG($fp)
|
||||
|
||||
# If the return value pointer is NULL, assume no return value.
|
||||
REG_L t5, 4*FFI_SIZEOF_ARG($fp)
|
||||
beqz t5, noretval
|
||||
|
||||
# Shift the return type flag over
|
||||
SRL t6, 8*FFI_FLAG_BITS
|
||||
|
||||
beq t6, FFI_TYPE_SINT32, retint
|
||||
bne t6, FFI_TYPE_INT, retfloat
|
||||
retint:
|
||||
jal t9
|
||||
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
|
||||
REG_S v0, 0(t4)
|
||||
b epilogue
|
||||
|
||||
retfloat:
|
||||
bne t6, FFI_TYPE_FLOAT, retdouble
|
||||
jal t9
|
||||
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
|
||||
s.s $f0, 0(t4)
|
||||
b epilogue
|
||||
|
||||
retdouble:
|
||||
bne t6, FFI_TYPE_DOUBLE, retstruct_d
|
||||
jal t9
|
||||
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
|
||||
s.d $f0, 0(t4)
|
||||
b epilogue
|
||||
|
||||
retstruct_d:
|
||||
bne t6, FFI_TYPE_STRUCT_D, retstruct_f
|
||||
jal t9
|
||||
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
|
||||
s.d $f0, 0(t4)
|
||||
b epilogue
|
||||
|
||||
retstruct_f:
|
||||
bne t6, FFI_TYPE_STRUCT_F, retstruct_d_d
|
||||
jal t9
|
||||
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
|
||||
s.s $f0, 0(t4)
|
||||
b epilogue
|
||||
|
||||
retstruct_d_d:
|
||||
bne t6, FFI_TYPE_STRUCT_DD, retstruct_f_f
|
||||
jal t9
|
||||
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
|
||||
s.d $f0, 0(t4)
|
||||
s.d $f2, 8(t4)
|
||||
b epilogue
|
||||
|
||||
retstruct_f_f:
|
||||
bne t6, FFI_TYPE_STRUCT_FF, retstruct_d_f
|
||||
jal t9
|
||||
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
|
||||
s.s $f0, 0(t4)
|
||||
s.s $f2, 4(t4)
|
||||
b epilogue
|
||||
|
||||
retstruct_d_f:
|
||||
bne t6, FFI_TYPE_STRUCT_DF, retstruct_f_d
|
||||
jal t9
|
||||
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
|
||||
s.d $f0, 0(t4)
|
||||
s.s $f2, 8(t4)
|
||||
b epilogue
|
||||
|
||||
retstruct_f_d:
|
||||
bne t6, FFI_TYPE_STRUCT_FD, retstruct_d_soft
|
||||
jal t9
|
||||
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
|
||||
s.s $f0, 0(t4)
|
||||
s.d $f2, 8(t4)
|
||||
b epilogue
|
||||
|
||||
retstruct_d_soft:
|
||||
bne t6, FFI_TYPE_STRUCT_D_SOFT, retstruct_f_soft
|
||||
jal t9
|
||||
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
|
||||
sd v0, 0(t4)
|
||||
b epilogue
|
||||
|
||||
retstruct_f_soft:
|
||||
bne t6, FFI_TYPE_STRUCT_F_SOFT, retstruct_d_d_soft
|
||||
jal t9
|
||||
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
|
||||
sw v0, 0(t4)
|
||||
b epilogue
|
||||
|
||||
retstruct_d_d_soft:
|
||||
bne t6, FFI_TYPE_STRUCT_DD_SOFT, retstruct_f_f_soft
|
||||
jal t9
|
||||
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
|
||||
sd v0, 0(t4)
|
||||
sd v1, 8(t4)
|
||||
b epilogue
|
||||
|
||||
retstruct_f_f_soft:
|
||||
bne t6, FFI_TYPE_STRUCT_FF_SOFT, retstruct_d_f_soft
|
||||
jal t9
|
||||
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
|
||||
sw v0, 0(t4)
|
||||
sw v1, 4(t4)
|
||||
b epilogue
|
||||
|
||||
retstruct_d_f_soft:
|
||||
bne t6, FFI_TYPE_STRUCT_DF_SOFT, retstruct_f_d_soft
|
||||
jal t9
|
||||
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
|
||||
sd v0, 0(t4)
|
||||
sw v1, 8(t4)
|
||||
b epilogue
|
||||
|
||||
retstruct_f_d_soft:
|
||||
bne t6, FFI_TYPE_STRUCT_FD_SOFT, retstruct_small
|
||||
jal t9
|
||||
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
|
||||
sw v0, 0(t4)
|
||||
sd v1, 8(t4)
|
||||
b epilogue
|
||||
|
||||
retstruct_small:
|
||||
bne t6, FFI_TYPE_STRUCT_SMALL, retstruct_small2
|
||||
jal t9
|
||||
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
|
||||
REG_S v0, 0(t4)
|
||||
b epilogue
|
||||
|
||||
retstruct_small2:
|
||||
bne t6, FFI_TYPE_STRUCT_SMALL2, retstruct
|
||||
jal t9
|
||||
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
|
||||
REG_S v0, 0(t4)
|
||||
REG_S v1, 8(t4)
|
||||
b epilogue
|
||||
|
||||
retstruct:
|
||||
noretval:
|
||||
jal t9
|
||||
|
||||
# Epilogue
|
||||
epilogue:
|
||||
move $sp, $fp
|
||||
REG_L $fp, SIZEOF_FRAME - 2*FFI_SIZEOF_ARG($sp) # Restore frame pointer
|
||||
REG_L ra, SIZEOF_FRAME - 1*FFI_SIZEOF_ARG($sp) # Restore return address
|
||||
ADDU $sp, SIZEOF_FRAME # Fix stack pointer
|
||||
j ra
|
||||
|
||||
.LFE3:
|
||||
.end ffi_call_N32
|
||||
|
||||
/* ffi_closure_N32. Expects address of the passed-in ffi_closure in t0
|
||||
($12). Stores any arguments passed in registers onto the stack,
|
||||
then calls ffi_closure_mips_inner_N32, which then decodes
|
||||
them.
|
||||
|
||||
Stack layout:
|
||||
|
||||
20 - Start of parameters, original sp
|
||||
19 - Called function a7 save
|
||||
18 - Called function a6 save
|
||||
17 - Called function a5 save
|
||||
16 - Called function a4 save
|
||||
15 - Called function a3 save
|
||||
14 - Called function a2 save
|
||||
13 - Called function a1 save
|
||||
12 - Called function a0 save
|
||||
11 - Called function f19
|
||||
10 - Called function f18
|
||||
9 - Called function f17
|
||||
8 - Called function f16
|
||||
7 - Called function f15
|
||||
6 - Called function f14
|
||||
5 - Called function f13
|
||||
4 - Called function f12
|
||||
3 - return value high (v1 or $f2)
|
||||
2 - return value low (v0 or $f0)
|
||||
1 - ra save
|
||||
0 - gp save our sp points here
|
||||
*/
|
||||
|
||||
#define SIZEOF_FRAME2 (20 * FFI_SIZEOF_ARG)
|
||||
|
||||
#define A7_OFF2 (19 * FFI_SIZEOF_ARG)
|
||||
#define A6_OFF2 (18 * FFI_SIZEOF_ARG)
|
||||
#define A5_OFF2 (17 * FFI_SIZEOF_ARG)
|
||||
#define A4_OFF2 (16 * FFI_SIZEOF_ARG)
|
||||
#define A3_OFF2 (15 * FFI_SIZEOF_ARG)
|
||||
#define A2_OFF2 (14 * FFI_SIZEOF_ARG)
|
||||
#define A1_OFF2 (13 * FFI_SIZEOF_ARG)
|
||||
#define A0_OFF2 (12 * FFI_SIZEOF_ARG)
|
||||
|
||||
#define F19_OFF2 (11 * FFI_SIZEOF_ARG)
|
||||
#define F18_OFF2 (10 * FFI_SIZEOF_ARG)
|
||||
#define F17_OFF2 (9 * FFI_SIZEOF_ARG)
|
||||
#define F16_OFF2 (8 * FFI_SIZEOF_ARG)
|
||||
#define F15_OFF2 (7 * FFI_SIZEOF_ARG)
|
||||
#define F14_OFF2 (6 * FFI_SIZEOF_ARG)
|
||||
#define F13_OFF2 (5 * FFI_SIZEOF_ARG)
|
||||
#define F12_OFF2 (4 * FFI_SIZEOF_ARG)
|
||||
|
||||
#define V1_OFF2 (3 * FFI_SIZEOF_ARG)
|
||||
#define V0_OFF2 (2 * FFI_SIZEOF_ARG)
|
||||
|
||||
#define RA_OFF2 (1 * FFI_SIZEOF_ARG)
|
||||
#define GP_OFF2 (0 * FFI_SIZEOF_ARG)
|
||||
|
||||
.align 2
|
||||
.globl ffi_closure_N32
|
||||
.ent ffi_closure_N32
|
||||
ffi_closure_N32:
|
||||
.LFB2:
|
||||
.frame $sp, SIZEOF_FRAME2, ra
|
||||
.mask 0x90000000,-(SIZEOF_FRAME2 - RA_OFF2)
|
||||
.fmask 0x00000000,0
|
||||
SUBU $sp, SIZEOF_FRAME2
|
||||
.LCFI5:
|
||||
.cpsetup t9, GP_OFF2, ffi_closure_N32
|
||||
REG_S ra, RA_OFF2($sp) # Save return address
|
||||
.LCFI6:
|
||||
# Store all possible argument registers. If there are more than
|
||||
# fit in registers, then they were stored on the stack.
|
||||
REG_S a0, A0_OFF2($sp)
|
||||
REG_S a1, A1_OFF2($sp)
|
||||
REG_S a2, A2_OFF2($sp)
|
||||
REG_S a3, A3_OFF2($sp)
|
||||
REG_S a4, A4_OFF2($sp)
|
||||
REG_S a5, A5_OFF2($sp)
|
||||
REG_S a6, A6_OFF2($sp)
|
||||
REG_S a7, A7_OFF2($sp)
|
||||
|
||||
# Store all possible float/double registers.
|
||||
s.d $f12, F12_OFF2($sp)
|
||||
s.d $f13, F13_OFF2($sp)
|
||||
s.d $f14, F14_OFF2($sp)
|
||||
s.d $f15, F15_OFF2($sp)
|
||||
s.d $f16, F16_OFF2($sp)
|
||||
s.d $f17, F17_OFF2($sp)
|
||||
s.d $f18, F18_OFF2($sp)
|
||||
s.d $f19, F19_OFF2($sp)
|
||||
|
||||
# Call ffi_closure_mips_inner_N32 to do the real work.
|
||||
LA t9, ffi_closure_mips_inner_N32
|
||||
move a0, $12 # Pointer to the ffi_closure
|
||||
ADDU a1, $sp, V0_OFF2
|
||||
ADDU a2, $sp, A0_OFF2
|
||||
ADDU a3, $sp, F12_OFF2
|
||||
jalr t9
|
||||
|
||||
# Return flags are in v0
|
||||
bne v0, FFI_TYPE_SINT32, cls_retint
|
||||
lw v0, V0_OFF2($sp)
|
||||
b cls_epilogue
|
||||
|
||||
cls_retint:
|
||||
bne v0, FFI_TYPE_INT, cls_retfloat
|
||||
REG_L v0, V0_OFF2($sp)
|
||||
b cls_epilogue
|
||||
|
||||
cls_retfloat:
|
||||
bne v0, FFI_TYPE_FLOAT, cls_retdouble
|
||||
l.s $f0, V0_OFF2($sp)
|
||||
b cls_epilogue
|
||||
|
||||
cls_retdouble:
|
||||
bne v0, FFI_TYPE_DOUBLE, cls_retstruct_d
|
||||
l.d $f0, V0_OFF2($sp)
|
||||
b cls_epilogue
|
||||
|
||||
cls_retstruct_d:
|
||||
bne v0, FFI_TYPE_STRUCT_D, cls_retstruct_f
|
||||
l.d $f0, V0_OFF2($sp)
|
||||
b cls_epilogue
|
||||
|
||||
cls_retstruct_f:
|
||||
bne v0, FFI_TYPE_STRUCT_F, cls_retstruct_d_d
|
||||
l.s $f0, V0_OFF2($sp)
|
||||
b cls_epilogue
|
||||
|
||||
cls_retstruct_d_d:
|
||||
bne v0, FFI_TYPE_STRUCT_DD, cls_retstruct_f_f
|
||||
l.d $f0, V0_OFF2($sp)
|
||||
l.d $f2, V1_OFF2($sp)
|
||||
b cls_epilogue
|
||||
|
||||
cls_retstruct_f_f:
|
||||
bne v0, FFI_TYPE_STRUCT_FF, cls_retstruct_d_f
|
||||
l.s $f0, V0_OFF2($sp)
|
||||
l.s $f2, V1_OFF2($sp)
|
||||
b cls_epilogue
|
||||
|
||||
cls_retstruct_d_f:
|
||||
bne v0, FFI_TYPE_STRUCT_DF, cls_retstruct_f_d
|
||||
l.d $f0, V0_OFF2($sp)
|
||||
l.s $f2, V1_OFF2($sp)
|
||||
b cls_epilogue
|
||||
|
||||
cls_retstruct_f_d:
|
||||
bne v0, FFI_TYPE_STRUCT_FD, cls_retstruct_small2
|
||||
l.s $f0, V0_OFF2($sp)
|
||||
l.d $f2, V1_OFF2($sp)
|
||||
b cls_epilogue
|
||||
|
||||
cls_retstruct_small2:
|
||||
REG_L v0, V0_OFF2($sp)
|
||||
REG_L v1, V1_OFF2($sp)
|
||||
|
||||
# Epilogue
|
||||
cls_epilogue:
|
||||
REG_L ra, RA_OFF2($sp) # Restore return address
|
||||
.cpreturn
|
||||
ADDU $sp, SIZEOF_FRAME2
|
||||
j ra
|
||||
.LFE2:
|
||||
.end ffi_closure_N32
|
||||
|
||||
.section .eh_frame,"aw",@progbits
|
||||
.Lframe1:
|
||||
.4byte .LECIE1-.LSCIE1 # length
|
||||
.LSCIE1:
|
||||
.4byte 0x0 # CIE
|
||||
.byte 0x1 # Version 1
|
||||
.ascii "\000" # Augmentation
|
||||
.uleb128 0x1 # Code alignment 1
|
||||
.sleb128 -4 # Data alignment -4
|
||||
.byte 0x1f # Return Address $31
|
||||
.byte 0xc # DW_CFA_def_cfa
|
||||
.uleb128 0x1d # in $sp
|
||||
.uleb128 0x0 # offset 0
|
||||
.align EH_FRAME_ALIGN
|
||||
.LECIE1:
|
||||
|
||||
.LSFDE1:
|
||||
.4byte .LEFDE1-.LASFDE1 # length.
|
||||
.LASFDE1:
|
||||
.4byte .LASFDE1-.Lframe1 # CIE_pointer.
|
||||
FDE_ADDR_BYTES .LFB3 # initial_location.
|
||||
FDE_ADDR_BYTES .LFE3-.LFB3 # address_range.
|
||||
.byte 0x4 # DW_CFA_advance_loc4
|
||||
.4byte .LCFI0-.LFB3 # to .LCFI0
|
||||
.byte 0xe # DW_CFA_def_cfa_offset
|
||||
.uleb128 SIZEOF_FRAME # adjust stack.by SIZEOF_FRAME
|
||||
.byte 0x4 # DW_CFA_advance_loc4
|
||||
.4byte .LCFI1-.LCFI0 # to .LCFI1
|
||||
.byte 0x9e # DW_CFA_offset of $fp
|
||||
.uleb128 2*FFI_SIZEOF_ARG/4 #
|
||||
.byte 0x9f # DW_CFA_offset of ra
|
||||
.uleb128 1*FFI_SIZEOF_ARG/4 #
|
||||
.byte 0x4 # DW_CFA_advance_loc4
|
||||
.4byte .LCFI3-.LCFI1 # to .LCFI3
|
||||
.byte 0xd # DW_CFA_def_cfa_register
|
||||
.uleb128 0x1e # in $fp
|
||||
.align EH_FRAME_ALIGN
|
||||
.LEFDE1:
|
||||
.LSFDE3:
|
||||
.4byte .LEFDE3-.LASFDE3 # length
|
||||
.LASFDE3:
|
||||
.4byte .LASFDE3-.Lframe1 # CIE_pointer.
|
||||
FDE_ADDR_BYTES .LFB2 # initial_location.
|
||||
FDE_ADDR_BYTES .LFE2-.LFB2 # address_range.
|
||||
.byte 0x4 # DW_CFA_advance_loc4
|
||||
.4byte .LCFI5-.LFB2 # to .LCFI5
|
||||
.byte 0xe # DW_CFA_def_cfa_offset
|
||||
.uleb128 SIZEOF_FRAME2 # adjust stack.by SIZEOF_FRAME
|
||||
.byte 0x4 # DW_CFA_advance_loc4
|
||||
.4byte .LCFI6-.LCFI5 # to .LCFI6
|
||||
.byte 0x9c # DW_CFA_offset of $gp ($28)
|
||||
.uleb128 (SIZEOF_FRAME2 - GP_OFF2)/4
|
||||
.byte 0x9f # DW_CFA_offset of ra ($31)
|
||||
.uleb128 (SIZEOF_FRAME2 - RA_OFF2)/4
|
||||
.align EH_FRAME_ALIGN
|
||||
.LEFDE3:
|
||||
|
||||
#endif
|
||||
@@ -1,14 +1,3 @@
|
||||
2009-10-05 Bradley Smith <brad@brad-smith.co.uk>
|
||||
|
||||
* configure.ac, Makefile.am, src/avr32/ffi.c,
|
||||
src/avr32/ffitarget.h,
|
||||
src/avr32/sysv.S: Add AVR32 port.
|
||||
* testsuite/libffi.call/cls_dbls_struct.c,
|
||||
testsuite/libffi.call/cls_double_va.c,
|
||||
testsuite/libffi.call/cls_longdouble_va.c,
|
||||
testsuite/libffi.call/huge_struct.c: Mark expected failures on
|
||||
AVR32.
|
||||
|
||||
2009-06-16 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* testsuite/libffi.call/cls_align_sint64.c,
|
||||
|
||||
30
.pc/snow-leopard/configure
vendored
30
.pc/snow-leopard/configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.63 for libffi 3.0.9rc7.
|
||||
# Generated by GNU Autoconf 2.63 for libffi 3.0.9rc8.
|
||||
#
|
||||
# Report bugs to <http://gcc.gnu.org/bugs.html>.
|
||||
#
|
||||
@@ -745,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='libffi'
|
||||
PACKAGE_TARNAME='libffi'
|
||||
PACKAGE_VERSION='3.0.9rc7'
|
||||
PACKAGE_STRING='libffi 3.0.9rc7'
|
||||
PACKAGE_VERSION='3.0.9rc8'
|
||||
PACKAGE_STRING='libffi 3.0.9rc8'
|
||||
PACKAGE_BUGREPORT='http://gcc.gnu.org/bugs.html'
|
||||
|
||||
# Factoring default headers for most tests.
|
||||
@@ -1541,7 +1541,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures libffi 3.0.9rc7 to adapt to many kinds of systems.
|
||||
\`configure' configures libffi 3.0.9rc8 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1612,7 +1612,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of libffi 3.0.9rc7:";;
|
||||
short | recursive ) echo "Configuration of libffi 3.0.9rc8:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1719,7 +1719,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
libffi configure 3.0.9rc7
|
||||
libffi configure 3.0.9rc8
|
||||
generated by GNU Autoconf 2.63
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
@@ -1733,7 +1733,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by libffi $as_me 3.0.9rc7, which was
|
||||
It was created by libffi $as_me 3.0.9rc8, which was
|
||||
generated by GNU Autoconf 2.63. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2715,7 +2715,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='libffi'
|
||||
VERSION='3.0.9rc7'
|
||||
VERSION='3.0.9rc8'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -14497,16 +14497,6 @@ _ACEOF
|
||||
fi
|
||||
fi
|
||||
|
||||
case "$target" in
|
||||
i?86-apple-darwin10*)
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define FFI_MMAP_EXEC_WRIT 1
|
||||
_ACEOF
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking whether .eh_frame section should be read-only" >&5
|
||||
$as_echo_n "checking whether .eh_frame section should be read-only... " >&6; }
|
||||
if test "${libffi_cv_ro_eh_frame+set}" = set; then
|
||||
@@ -15312,7 +15302,7 @@ exec 6>&1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by libffi $as_me 3.0.9rc7, which was
|
||||
This file was extended by libffi $as_me 3.0.9rc8, which was
|
||||
generated by GNU Autoconf 2.63. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -15379,7 +15369,7 @@ Report bugs to <bug-autoconf@gnu.org>."
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_version="\\
|
||||
libffi config.status 3.0.9rc7
|
||||
libffi config.status 3.0.9rc8
|
||||
configured by $0, generated by GNU Autoconf 2.63,
|
||||
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
|
||||
|
||||
AC_PREREQ(2.63)
|
||||
|
||||
AC_INIT([libffi], [3.0.9rc7], [http://gcc.gnu.org/bugs.html])
|
||||
AC_INIT([libffi], [3.0.9rc8], [http://gcc.gnu.org/bugs.html])
|
||||
AC_CONFIG_HEADERS([fficonfig.h])
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
@@ -122,9 +122,6 @@
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ SUBDIRS = include testsuite man
|
||||
EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \
|
||||
src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \
|
||||
src/arm/ffi.c src/arm/sysv.S src/arm/ffitarget.h \
|
||||
src/avr32/ffi.c src/avr32/sysv.S src/avr32/ffitarget.h \
|
||||
src/cris/ffi.c src/cris/sysv.S src/cris/ffitarget.h \
|
||||
src/ia64/ffi.c src/ia64/ffitarget.h src/ia64/ia64_flags.h \
|
||||
src/ia64/unix.S \
|
||||
@@ -132,6 +133,9 @@ endif
|
||||
if ARM
|
||||
nodist_libffi_la_SOURCES += src/arm/sysv.S src/arm/ffi.c
|
||||
endif
|
||||
if AVR32
|
||||
nodist_libffi_la_SOURCES += src/avr32/sysv.S src/avr32/ffi.c
|
||||
endif
|
||||
if LIBFFI_CRIS
|
||||
nodist_libffi_la_SOURCES += src/cris/sysv.S src/cris/ffi.c
|
||||
endif
|
||||
|
||||
@@ -51,14 +51,15 @@ target_triplet = @target@
|
||||
@POWERPC_DARWIN_TRUE@am__append_14 = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
|
||||
@POWERPC_FREEBSD_TRUE@am__append_15 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
|
||||
@ARM_TRUE@am__append_16 = src/arm/sysv.S src/arm/ffi.c
|
||||
@LIBFFI_CRIS_TRUE@am__append_17 = src/cris/sysv.S src/cris/ffi.c
|
||||
@FRV_TRUE@am__append_18 = src/frv/eabi.S src/frv/ffi.c
|
||||
@S390_TRUE@am__append_19 = src/s390/sysv.S src/s390/ffi.c
|
||||
@X86_64_TRUE@am__append_20 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
|
||||
@SH_TRUE@am__append_21 = src/sh/sysv.S src/sh/ffi.c
|
||||
@SH64_TRUE@am__append_22 = src/sh64/sysv.S src/sh64/ffi.c
|
||||
@PA_LINUX_TRUE@am__append_23 = src/pa/linux.S src/pa/ffi.c
|
||||
@PA_HPUX_TRUE@am__append_24 = src/pa/hpux32.S src/pa/ffi.c
|
||||
@AVR32_TRUE@am__append_17 = src/avr32/sysv.S src/avr32/ffi.c
|
||||
@LIBFFI_CRIS_TRUE@am__append_18 = src/cris/sysv.S src/cris/ffi.c
|
||||
@FRV_TRUE@am__append_19 = src/frv/eabi.S src/frv/ffi.c
|
||||
@S390_TRUE@am__append_20 = src/s390/sysv.S src/s390/ffi.c
|
||||
@X86_64_TRUE@am__append_21 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
|
||||
@SH_TRUE@am__append_22 = src/sh/sysv.S src/sh/ffi.c
|
||||
@SH64_TRUE@am__append_23 = src/sh64/sysv.S src/sh64/ffi.c
|
||||
@PA_LINUX_TRUE@am__append_24 = src/pa/linux.S src/pa/ffi.c
|
||||
@PA_HPUX_TRUE@am__append_25 = src/pa/hpux32.S src/pa/ffi.c
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/../compile \
|
||||
$(srcdir)/../config.guess $(srcdir)/../config.sub \
|
||||
@@ -139,15 +140,16 @@ am_libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
|
||||
@POWERPC_FREEBSD_TRUE@ src/powerpc/sysv.lo \
|
||||
@POWERPC_FREEBSD_TRUE@ src/powerpc/ppc_closure.lo
|
||||
@ARM_TRUE@am__objects_16 = src/arm/sysv.lo src/arm/ffi.lo
|
||||
@LIBFFI_CRIS_TRUE@am__objects_17 = src/cris/sysv.lo src/cris/ffi.lo
|
||||
@FRV_TRUE@am__objects_18 = src/frv/eabi.lo src/frv/ffi.lo
|
||||
@S390_TRUE@am__objects_19 = src/s390/sysv.lo src/s390/ffi.lo
|
||||
@X86_64_TRUE@am__objects_20 = src/x86/ffi64.lo src/x86/unix64.lo \
|
||||
@AVR32_TRUE@am__objects_17 = src/avr32/sysv.lo src/avr32/ffi.lo
|
||||
@LIBFFI_CRIS_TRUE@am__objects_18 = src/cris/sysv.lo src/cris/ffi.lo
|
||||
@FRV_TRUE@am__objects_19 = src/frv/eabi.lo src/frv/ffi.lo
|
||||
@S390_TRUE@am__objects_20 = src/s390/sysv.lo src/s390/ffi.lo
|
||||
@X86_64_TRUE@am__objects_21 = src/x86/ffi64.lo src/x86/unix64.lo \
|
||||
@X86_64_TRUE@ src/x86/ffi.lo src/x86/sysv.lo
|
||||
@SH_TRUE@am__objects_21 = src/sh/sysv.lo src/sh/ffi.lo
|
||||
@SH64_TRUE@am__objects_22 = src/sh64/sysv.lo src/sh64/ffi.lo
|
||||
@PA_LINUX_TRUE@am__objects_23 = src/pa/linux.lo src/pa/ffi.lo
|
||||
@PA_HPUX_TRUE@am__objects_24 = src/pa/hpux32.lo src/pa/ffi.lo
|
||||
@SH_TRUE@am__objects_22 = src/sh/sysv.lo src/sh/ffi.lo
|
||||
@SH64_TRUE@am__objects_23 = src/sh64/sysv.lo src/sh64/ffi.lo
|
||||
@PA_LINUX_TRUE@am__objects_24 = src/pa/linux.lo src/pa/ffi.lo
|
||||
@PA_HPUX_TRUE@am__objects_25 = src/pa/hpux32.lo src/pa/ffi.lo
|
||||
nodist_libffi_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
|
||||
$(am__objects_3) $(am__objects_4) $(am__objects_5) \
|
||||
$(am__objects_6) $(am__objects_7) $(am__objects_8) \
|
||||
@@ -156,25 +158,26 @@ nodist_libffi_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
|
||||
$(am__objects_15) $(am__objects_16) $(am__objects_17) \
|
||||
$(am__objects_18) $(am__objects_19) $(am__objects_20) \
|
||||
$(am__objects_21) $(am__objects_22) $(am__objects_23) \
|
||||
$(am__objects_24)
|
||||
$(am__objects_24) $(am__objects_25)
|
||||
libffi_la_OBJECTS = $(am_libffi_la_OBJECTS) \
|
||||
$(nodist_libffi_la_OBJECTS)
|
||||
libffi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(libffi_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
libffi_convenience_la_LIBADD =
|
||||
am__objects_25 = src/debug.lo src/prep_cif.lo src/types.lo \
|
||||
am__objects_26 = src/debug.lo src/prep_cif.lo src/types.lo \
|
||||
src/raw_api.lo src/java_raw_api.lo src/closures.lo
|
||||
am_libffi_convenience_la_OBJECTS = $(am__objects_25)
|
||||
am__objects_26 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
|
||||
am_libffi_convenience_la_OBJECTS = $(am__objects_26)
|
||||
am__objects_27 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
|
||||
$(am__objects_4) $(am__objects_5) $(am__objects_6) \
|
||||
$(am__objects_7) $(am__objects_8) $(am__objects_9) \
|
||||
$(am__objects_10) $(am__objects_11) $(am__objects_12) \
|
||||
$(am__objects_13) $(am__objects_14) $(am__objects_15) \
|
||||
$(am__objects_16) $(am__objects_17) $(am__objects_18) \
|
||||
$(am__objects_19) $(am__objects_20) $(am__objects_21) \
|
||||
$(am__objects_22) $(am__objects_23) $(am__objects_24)
|
||||
nodist_libffi_convenience_la_OBJECTS = $(am__objects_26)
|
||||
$(am__objects_22) $(am__objects_23) $(am__objects_24) \
|
||||
$(am__objects_25)
|
||||
nodist_libffi_convenience_la_OBJECTS = $(am__objects_27)
|
||||
libffi_convenience_la_OBJECTS = $(am_libffi_convenience_la_OBJECTS) \
|
||||
$(nodist_libffi_convenience_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||
@@ -388,6 +391,7 @@ SUBDIRS = include testsuite man
|
||||
EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \
|
||||
src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \
|
||||
src/arm/ffi.c src/arm/sysv.S src/arm/ffitarget.h \
|
||||
src/avr32/ffi.c src/avr32/sysv.S src/avr32/ffitarget.h \
|
||||
src/cris/ffi.c src/cris/sysv.S src/cris/ffitarget.h \
|
||||
src/ia64/ffi.c src/ia64/ffitarget.h src/ia64/ia64_flags.h \
|
||||
src/ia64/unix.S \
|
||||
@@ -463,7 +467,7 @@ nodist_libffi_la_SOURCES = $(am__append_1) $(am__append_2) \
|
||||
$(am__append_15) $(am__append_16) $(am__append_17) \
|
||||
$(am__append_18) $(am__append_19) $(am__append_20) \
|
||||
$(am__append_21) $(am__append_22) $(am__append_23) \
|
||||
$(am__append_24)
|
||||
$(am__append_24) $(am__append_25)
|
||||
libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
|
||||
nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
|
||||
AM_CFLAGS = -Wall -g -fexceptions
|
||||
@@ -701,6 +705,16 @@ src/arm/sysv.lo: src/arm/$(am__dirstamp) \
|
||||
src/arm/$(DEPDIR)/$(am__dirstamp)
|
||||
src/arm/ffi.lo: src/arm/$(am__dirstamp) \
|
||||
src/arm/$(DEPDIR)/$(am__dirstamp)
|
||||
src/avr32/$(am__dirstamp):
|
||||
@$(MKDIR_P) src/avr32
|
||||
@: > src/avr32/$(am__dirstamp)
|
||||
src/avr32/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) src/avr32/$(DEPDIR)
|
||||
@: > src/avr32/$(DEPDIR)/$(am__dirstamp)
|
||||
src/avr32/sysv.lo: src/avr32/$(am__dirstamp) \
|
||||
src/avr32/$(DEPDIR)/$(am__dirstamp)
|
||||
src/avr32/ffi.lo: src/avr32/$(am__dirstamp) \
|
||||
src/avr32/$(DEPDIR)/$(am__dirstamp)
|
||||
src/cris/$(am__dirstamp):
|
||||
@$(MKDIR_P) src/cris
|
||||
@: > src/cris/$(am__dirstamp)
|
||||
@@ -778,6 +792,10 @@ mostlyclean-compile:
|
||||
-rm -f src/arm/ffi.lo
|
||||
-rm -f src/arm/sysv.$(OBJEXT)
|
||||
-rm -f src/arm/sysv.lo
|
||||
-rm -f src/avr32/ffi.$(OBJEXT)
|
||||
-rm -f src/avr32/ffi.lo
|
||||
-rm -f src/avr32/sysv.$(OBJEXT)
|
||||
-rm -f src/avr32/sysv.lo
|
||||
-rm -f src/closures.$(OBJEXT)
|
||||
-rm -f src/closures.lo
|
||||
-rm -f src/cris/ffi.$(OBJEXT)
|
||||
@@ -892,6 +910,8 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/alpha/$(DEPDIR)/osf.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/arm/$(DEPDIR)/ffi.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/arm/$(DEPDIR)/sysv.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/avr32/$(DEPDIR)/ffi.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/avr32/$(DEPDIR)/sysv.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/cris/$(DEPDIR)/ffi.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/cris/$(DEPDIR)/sysv.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/frv/$(DEPDIR)/eabi.Plo@am__quote@
|
||||
@@ -993,6 +1013,7 @@ clean-libtool:
|
||||
-rm -rf src/.libs src/_libs
|
||||
-rm -rf src/alpha/.libs src/alpha/_libs
|
||||
-rm -rf src/arm/.libs src/arm/_libs
|
||||
-rm -rf src/avr32/.libs src/avr32/_libs
|
||||
-rm -rf src/cris/.libs src/cris/_libs
|
||||
-rm -rf src/frv/.libs src/frv/_libs
|
||||
-rm -rf src/ia64/.libs src/ia64/_libs
|
||||
@@ -1371,6 +1392,8 @@ distclean-generic:
|
||||
-rm -f src/alpha/$(am__dirstamp)
|
||||
-rm -f src/arm/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f src/arm/$(am__dirstamp)
|
||||
-rm -f src/avr32/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f src/avr32/$(am__dirstamp)
|
||||
-rm -f src/cris/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f src/cris/$(am__dirstamp)
|
||||
-rm -f src/frv/$(DEPDIR)/$(am__dirstamp)
|
||||
@@ -1408,7 +1431,7 @@ clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
|
||||
|
||||
distclean: distclean-multi distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf src/$(DEPDIR) src/alpha/$(DEPDIR) src/arm/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/mips/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/x86/$(DEPDIR)
|
||||
-rm -rf src/$(DEPDIR) src/alpha/$(DEPDIR) src/arm/$(DEPDIR) src/avr32/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/mips/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/x86/$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags
|
||||
@@ -1456,7 +1479,7 @@ installcheck-am:
|
||||
maintainer-clean: maintainer-clean-multi maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -rf src/$(DEPDIR) src/alpha/$(DEPDIR) src/arm/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/mips/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/x86/$(DEPDIR)
|
||||
-rm -rf src/$(DEPDIR) src/alpha/$(DEPDIR) src/arm/$(DEPDIR) src/avr32/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/mips/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/x86/$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
|
||||
22
.pc/stand-alone/configure
vendored
22
.pc/stand-alone/configure
vendored
@@ -628,6 +628,8 @@ FRV_FALSE
|
||||
FRV_TRUE
|
||||
LIBFFI_CRIS_FALSE
|
||||
LIBFFI_CRIS_TRUE
|
||||
AVR32_FALSE
|
||||
AVR32_TRUE
|
||||
ARM_FALSE
|
||||
ARM_TRUE
|
||||
POWERPC_FREEBSD_FALSE
|
||||
@@ -10771,7 +10773,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 10774 "configure"
|
||||
#line 10776 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@@ -10877,7 +10879,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 10880 "configure"
|
||||
#line 10882 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@@ -11329,6 +11331,10 @@ case "$host" in
|
||||
TARGET=X86_64; TARGETDIR=x86
|
||||
;;
|
||||
|
||||
avr32*-*-*)
|
||||
TARGET=AVR32; TARGETDIR=avr32
|
||||
;;
|
||||
|
||||
cris-*-*)
|
||||
TARGET=LIBFFI_CRIS; TARGETDIR=cris
|
||||
;;
|
||||
@@ -11563,6 +11569,14 @@ else
|
||||
ARM_FALSE=
|
||||
fi
|
||||
|
||||
if test x$TARGET = xAVR32; then
|
||||
AVR32_TRUE=
|
||||
AVR32_FALSE='#'
|
||||
else
|
||||
AVR32_TRUE='#'
|
||||
AVR32_FALSE=
|
||||
fi
|
||||
|
||||
if test x$TARGET = xLIBFFI_CRIS; then
|
||||
LIBFFI_CRIS_TRUE=
|
||||
LIBFFI_CRIS_FALSE='#'
|
||||
@@ -12723,6 +12737,10 @@ if test -z "${ARM_TRUE}" && test -z "${ARM_FALSE}"; then
|
||||
as_fn_error "conditional \"ARM\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${AVR32_TRUE}" && test -z "${AVR32_FALSE}"; then
|
||||
as_fn_error "conditional \"AVR32\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${LIBFFI_CRIS_TRUE}" && test -z "${LIBFFI_CRIS_FALSE}"; then
|
||||
as_fn_error "conditional \"LIBFFI_CRIS\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
|
||||
@@ -55,6 +55,10 @@ case "$host" in
|
||||
TARGET=X86_64; TARGETDIR=x86
|
||||
;;
|
||||
|
||||
avr32*-*-*)
|
||||
TARGET=AVR32; TARGETDIR=avr32
|
||||
;;
|
||||
|
||||
cris-*-*)
|
||||
TARGET=LIBFFI_CRIS; TARGETDIR=cris
|
||||
;;
|
||||
@@ -177,6 +181,7 @@ 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)
|
||||
|
||||
@@ -16,27 +16,6 @@
|
||||
* testsuite/libffi.call/cls_longdouble.c: Ditto.
|
||||
* testsuite/libffi.call/cls_double_va.c: Ditto.
|
||||
|
||||
2009-10-11 Matthias Klose <doko@ubuntu.com>
|
||||
|
||||
* man/ffi_call.3: Fix #include in examples.
|
||||
* doc/libffi.texi: Add dircategory.
|
||||
|
||||
2009-10-23 Frank Everdij <f.p.x.everdij@tudelft.nl>
|
||||
|
||||
* include/ffi.h.in: Placed '__GNUC__' ifdef around
|
||||
'__attribute__((aligned(8)))' in ffi_closure, fixes compile for
|
||||
IRIX MIPSPro c99.
|
||||
* include/ffi_common.h: Added '__sgi' define to non
|
||||
'__attribute__((__mode__()))' integer typedefs.
|
||||
* src/mips/ffi.c (ffi_call, ffi_closure_mips_inner_O32,
|
||||
ffi_closure_mips_inner_N32): Added 'defined(_MIPSEB)' to BE check.
|
||||
(ffi_closure_mips_inner_O32, ffi_closure_mips_inner_N32): Added
|
||||
FFI_LONGDOUBLE support and alignment(N32 only).
|
||||
* src/mips/ffitarget.h: Corrected '#include <sgidefs.h>' for IRIX and
|
||||
fixed non '__attribute__((__mode__()))' integer typedefs.
|
||||
* src/mips/n32.S: Put '#ifdef linux' around '.abicalls' and '.eh_frame'
|
||||
since they are Linux/GNU Assembler specific.
|
||||
|
||||
2009-12-25 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* fficonfig.h.in: Rebuilt again.
|
||||
@@ -51,17 +30,6 @@
|
||||
* fficonfig.h.in: Rebuilt.
|
||||
* src/closures.c (dlmmap): Define version for snow leopard.
|
||||
|
||||
2009-10-05 Bradley Smith <brad@brad-smith.co.uk>
|
||||
|
||||
* configure.ac, Makefile.am, src/avr32/ffi.c,
|
||||
src/avr32/ffitarget.h,
|
||||
src/avr32/sysv.S: Add AVR32 port.
|
||||
* testsuite/libffi.call/cls_dbls_struct.c,
|
||||
testsuite/libffi.call/cls_double_va.c,
|
||||
testsuite/libffi.call/cls_longdouble_va.c,
|
||||
testsuite/libffi.call/huge_struct.c: Mark expected failures on
|
||||
AVR32.
|
||||
|
||||
2009-06-16 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* testsuite/libffi.call/cls_align_sint64.c,
|
||||
|
||||
20
.pc/undefine_AC_ARG_VAR_PRECIOUS/configure
vendored
20
.pc/undefine_AC_ARG_VAR_PRECIOUS/configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.63 for libffi 3.0.9rc7.
|
||||
# Generated by GNU Autoconf 2.63 for libffi 3.0.9rc8.
|
||||
#
|
||||
# Report bugs to <http://gcc.gnu.org/bugs.html>.
|
||||
#
|
||||
@@ -745,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='libffi'
|
||||
PACKAGE_TARNAME='libffi'
|
||||
PACKAGE_VERSION='3.0.9rc7'
|
||||
PACKAGE_STRING='libffi 3.0.9rc7'
|
||||
PACKAGE_VERSION='3.0.9rc8'
|
||||
PACKAGE_STRING='libffi 3.0.9rc8'
|
||||
PACKAGE_BUGREPORT='http://gcc.gnu.org/bugs.html'
|
||||
|
||||
# Factoring default headers for most tests.
|
||||
@@ -1542,7 +1542,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures libffi 3.0.9rc7 to adapt to many kinds of systems.
|
||||
\`configure' configures libffi 3.0.9rc8 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1613,7 +1613,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of libffi 3.0.9rc7:";;
|
||||
short | recursive ) echo "Configuration of libffi 3.0.9rc8:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1720,7 +1720,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
libffi configure 3.0.9rc7
|
||||
libffi configure 3.0.9rc8
|
||||
generated by GNU Autoconf 2.63
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
@@ -1734,7 +1734,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by libffi $as_me 3.0.9rc7, which was
|
||||
It was created by libffi $as_me 3.0.9rc8, which was
|
||||
generated by GNU Autoconf 2.63. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2716,7 +2716,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='libffi'
|
||||
VERSION='3.0.9rc7'
|
||||
VERSION='3.0.9rc8'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -15316,7 +15316,7 @@ exec 6>&1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by libffi $as_me 3.0.9rc7, which was
|
||||
This file was extended by libffi $as_me 3.0.9rc8, which was
|
||||
generated by GNU Autoconf 2.63. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -15383,7 +15383,7 @@ Report bugs to <bug-autoconf@gnu.org>."
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_version="\\
|
||||
libffi config.status 3.0.9rc7
|
||||
libffi config.status 3.0.9rc8
|
||||
configured by $0, generated by GNU Autoconf 2.63,
|
||||
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
|
||||
|
||||
AC_PREREQ(2.63)
|
||||
|
||||
AC_INIT([libffi], [3.0.9rc7], [http://gcc.gnu.org/bugs.html])
|
||||
AC_INIT([libffi], [3.0.9rc8], [http://gcc.gnu.org/bugs.html])
|
||||
AC_CONFIG_HEADERS([fficonfig.h])
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
@@ -9,27 +9,6 @@
|
||||
* testsuite/libffi.call/cls_longdouble.c: Ditto.
|
||||
* testsuite/libffi.call/cls_double_va.c: Ditto.
|
||||
|
||||
2009-10-11 Matthias Klose <doko@ubuntu.com>
|
||||
|
||||
* man/ffi_call.3: Fix #include in examples.
|
||||
* doc/libffi.texi: Add dircategory.
|
||||
|
||||
2009-10-23 Frank Everdij <f.p.x.everdij@tudelft.nl>
|
||||
|
||||
* include/ffi.h.in: Placed '__GNUC__' ifdef around
|
||||
'__attribute__((aligned(8)))' in ffi_closure, fixes compile for
|
||||
IRIX MIPSPro c99.
|
||||
* include/ffi_common.h: Added '__sgi' define to non
|
||||
'__attribute__((__mode__()))' integer typedefs.
|
||||
* src/mips/ffi.c (ffi_call, ffi_closure_mips_inner_O32,
|
||||
ffi_closure_mips_inner_N32): Added 'defined(_MIPSEB)' to BE check.
|
||||
(ffi_closure_mips_inner_O32, ffi_closure_mips_inner_N32): Added
|
||||
FFI_LONGDOUBLE support and alignment(N32 only).
|
||||
* src/mips/ffitarget.h: Corrected '#include <sgidefs.h>' for IRIX and
|
||||
fixed non '__attribute__((__mode__()))' integer typedefs.
|
||||
* src/mips/n32.S: Put '#ifdef linux' around '.abicalls' and '.eh_frame'
|
||||
since they are Linux/GNU Assembler specific.
|
||||
|
||||
2009-12-25 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* fficonfig.h.in: Rebuilt again.
|
||||
@@ -44,17 +23,6 @@
|
||||
* fficonfig.h.in: Rebuilt.
|
||||
* src/closures.c (dlmmap): Define version for snow leopard.
|
||||
|
||||
2009-10-05 Bradley Smith <brad@brad-smith.co.uk>
|
||||
|
||||
* configure.ac, Makefile.am, src/avr32/ffi.c,
|
||||
src/avr32/ffitarget.h,
|
||||
src/avr32/sysv.S: Add AVR32 port.
|
||||
* testsuite/libffi.call/cls_dbls_struct.c,
|
||||
testsuite/libffi.call/cls_double_va.c,
|
||||
testsuite/libffi.call/cls_longdouble_va.c,
|
||||
testsuite/libffi.call/huge_struct.c: Mark expected failures on
|
||||
AVR32.
|
||||
|
||||
2009-06-16 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* testsuite/libffi.call/cls_align_sint64.c,
|
||||
|
||||
20
.pc/windows/configure
vendored
20
.pc/windows/configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.63 for libffi 3.0.9rc7.
|
||||
# Generated by GNU Autoconf 2.63 for libffi 3.0.9rc8.
|
||||
#
|
||||
# Report bugs to <http://gcc.gnu.org/bugs.html>.
|
||||
#
|
||||
@@ -745,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='libffi'
|
||||
PACKAGE_TARNAME='libffi'
|
||||
PACKAGE_VERSION='3.0.9rc7'
|
||||
PACKAGE_STRING='libffi 3.0.9rc7'
|
||||
PACKAGE_VERSION='3.0.9rc8'
|
||||
PACKAGE_STRING='libffi 3.0.9rc8'
|
||||
PACKAGE_BUGREPORT='http://gcc.gnu.org/bugs.html'
|
||||
|
||||
# Factoring default headers for most tests.
|
||||
@@ -1541,7 +1541,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures libffi 3.0.9rc7 to adapt to many kinds of systems.
|
||||
\`configure' configures libffi 3.0.9rc8 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1612,7 +1612,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of libffi 3.0.9rc7:";;
|
||||
short | recursive ) echo "Configuration of libffi 3.0.9rc8:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1719,7 +1719,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
libffi configure 3.0.9rc7
|
||||
libffi configure 3.0.9rc8
|
||||
generated by GNU Autoconf 2.63
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
@@ -1733,7 +1733,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by libffi $as_me 3.0.9rc7, which was
|
||||
It was created by libffi $as_me 3.0.9rc8, which was
|
||||
generated by GNU Autoconf 2.63. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2715,7 +2715,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='libffi'
|
||||
VERSION='3.0.9rc7'
|
||||
VERSION='3.0.9rc8'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -15312,7 +15312,7 @@ exec 6>&1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by libffi $as_me 3.0.9rc7, which was
|
||||
This file was extended by libffi $as_me 3.0.9rc8, which was
|
||||
generated by GNU Autoconf 2.63. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -15379,7 +15379,7 @@ Report bugs to <bug-autoconf@gnu.org>."
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_version="\\
|
||||
libffi config.status 3.0.9rc7
|
||||
libffi config.status 3.0.9rc8
|
||||
configured by $0, generated by GNU Autoconf 2.63,
|
||||
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
|
||||
|
||||
AC_PREREQ(2.63)
|
||||
|
||||
AC_INIT([libffi], [3.0.9rc7], [http://gcc.gnu.org/bugs.html])
|
||||
AC_INIT([libffi], [3.0.9rc8], [http://gcc.gnu.org/bugs.html])
|
||||
AC_CONFIG_HEADERS([fficonfig.h])
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
2009-12-26 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* testsuite/libffi.call/huge_struct.c (test_large_fn): Replace
|
||||
format code %p with %#x because %p does not add a leading 0x on
|
||||
Solaris. Also case relevant arguments to unsigned int.
|
||||
|
||||
2009-12-26 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/powerpc/ffi.c (ffi_prep_args_SYSV): Advance intarg_count
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
This is doc/libffi.info, produced by makeinfo version 4.12 from
|
||||
./doc/libffi.texi.
|
||||
This is ../libffi/doc/libffi.info, produced by makeinfo version 4.13
|
||||
from ../libffi/doc/libffi.texi.
|
||||
|
||||
This manual is for Libffi, a portable foreign-function interface
|
||||
library.
|
||||
@@ -13,7 +13,7 @@ library.
|
||||
included in the section entitled "GNU General Public License".
|
||||
|
||||
|
||||
INFO-DIR-SECTION
|
||||
INFO-DIR-SECTION Development
|
||||
START-INFO-DIR-ENTRY
|
||||
* libffi: (libffi). Portable foreign-function interface library.
|
||||
END-INFO-DIR-ENTRY
|
||||
@@ -516,18 +516,18 @@ Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top670
|
||||
Node: Introduction1406
|
||||
Node: Using libffi3042
|
||||
Node: The Basics3477
|
||||
Node: Simple Example6084
|
||||
Node: Types7111
|
||||
Node: Primitive Types7394
|
||||
Node: Structures9214
|
||||
Node: Type Example10074
|
||||
Node: Multiple ABIs11297
|
||||
Node: The Closure API11668
|
||||
Node: Missing Features14588
|
||||
Node: Index15081
|
||||
Node: Top700
|
||||
Node: Introduction1436
|
||||
Node: Using libffi3072
|
||||
Node: The Basics3507
|
||||
Node: Simple Example6114
|
||||
Node: Types7141
|
||||
Node: Primitive Types7424
|
||||
Node: Structures9244
|
||||
Node: Type Example10104
|
||||
Node: Multiple ABIs11327
|
||||
Node: The Closure API11698
|
||||
Node: Missing Features14618
|
||||
Node: Index15111
|
||||
|
||||
End Tag Table
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@set UPDATED 14 February 2008
|
||||
@set UPDATED-MONTH February 2008
|
||||
@set EDITION 3.0.8
|
||||
@set VERSION 3.0.8
|
||||
@set UPDATED 26 December 2009
|
||||
@set UPDATED-MONTH December 2009
|
||||
@set EDITION 3.0.9rc8
|
||||
@set VERSION 3.0.9rc8
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@set UPDATED 14 February 2008
|
||||
@set UPDATED-MONTH February 2008
|
||||
@set EDITION 3.0.8
|
||||
@set VERSION 3.0.8
|
||||
@set UPDATED 26 December 2009
|
||||
@set UPDATED-MONTH December 2009
|
||||
@set EDITION 3.0.9rc8
|
||||
@set VERSION 3.0.9rc8
|
||||
|
||||
103
patches/fix-huge_struct-on-solaris
Normal file
103
patches/fix-huge_struct-on-solaris
Normal file
@@ -0,0 +1,103 @@
|
||||
Index: libffi/ChangeLog.libffi
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog.libffi
|
||||
+++ libffi/ChangeLog.libffi
|
||||
@@ -1,3 +1,9 @@
|
||||
+2009-12-26 Andreas Tobler <a.tobler@schweiz.org>
|
||||
+
|
||||
+ * testsuite/libffi.call/huge_struct.c (test_large_fn): Replace
|
||||
+ format code %p with %#x because %p does not add a leading 0x on
|
||||
+ Solaris. Also case relevant arguments to unsigned int.
|
||||
+
|
||||
2009-12-26 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/powerpc/ffi.c (ffi_prep_args_SYSV): Advance intarg_count
|
||||
Index: libffi/testsuite/libffi.call/huge_struct.c
|
||||
===================================================================
|
||||
--- libffi.orig/testsuite/libffi.call/huge_struct.c
|
||||
+++ libffi/testsuite/libffi.call/huge_struct.c
|
||||
@@ -131,18 +131,18 @@ test_large_fn(
|
||||
ui64_4 + 4, si64_4 + 4, f_4 + 4, d_4 + 4, ld_4 + 4, (char*)((intptr_t)p_4 + 4),
|
||||
ui8_5 + 5, si8_5 + 5};
|
||||
|
||||
- printf("%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
- "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
- "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
- "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p %hhu %hhd: "
|
||||
- "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
- "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
- "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
- "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p %hhu %hhd\n",
|
||||
- ui8_1, si8_1, ui16_1, si16_1, ui32_1, si32_1, ui64_1, si64_1, f_1, d_1, ld_1, p_1,
|
||||
- ui8_2, si8_2, ui16_2, si16_2, ui32_2, si32_2, ui64_2, si64_2, f_2, d_2, ld_2, p_2,
|
||||
- ui8_3, si8_3, ui16_3, si16_3, ui32_3, si32_3, ui64_3, si64_3, f_3, d_3, ld_3, p_3,
|
||||
- ui8_4, si8_4, ui16_4, si16_4, ui32_4, si32_4, ui64_4, si64_4, f_4, d_4, ld_4, p_4, ui8_5, si8_5,
|
||||
+ printf("%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
+ "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
+ "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
+ "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x %hhu %hhd: "
|
||||
+ "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
+ "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
+ "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
+ "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x %hhu %hhd\n",
|
||||
+ ui8_1, si8_1, ui16_1, si16_1, ui32_1, si32_1, ui64_1, si64_1, f_1, d_1, ld_1, (unsigned int)p_1,
|
||||
+ ui8_2, si8_2, ui16_2, si16_2, ui32_2, si32_2, ui64_2, si64_2, f_2, d_2, ld_2, (unsigned int)p_2,
|
||||
+ ui8_3, si8_3, ui16_3, si16_3, ui32_3, si32_3, ui64_3, si64_3, f_3, d_3, ld_3, (unsigned int)p_3,
|
||||
+ ui8_4, si8_4, ui16_4, si16_4, ui32_4, si32_4, ui64_4, si64_4, f_4, d_4, ld_4, (unsigned int)p_4, ui8_5, si8_5,
|
||||
retVal.a, retVal.b, retVal.c, retVal.d, retVal.e, retVal.f,
|
||||
retVal.g, retVal.h, retVal.i, retVal.j, retVal.k, retVal.l,
|
||||
retVal.m, retVal.n, retVal.o, retVal.p, retVal.q, retVal.r,
|
||||
@@ -298,18 +298,18 @@ main(int argc __UNUSED__, const char** a
|
||||
|
||||
ffi_call(&cif, FFI_FN(test_large_fn), &retVal, argValues);
|
||||
// { dg-output "1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
|
||||
- printf("res: %hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
- "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
- "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
- "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p %hhu %hhd\n",
|
||||
+ printf("res: %hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
+ "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
+ "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
+ "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x %hhu %hhd\n",
|
||||
retVal.a, retVal.b, retVal.c, retVal.d, retVal.e, retVal.f,
|
||||
- retVal.g, retVal.h, retVal.i, retVal.j, retVal.k, retVal.l,
|
||||
+ retVal.g, retVal.h, retVal.i, retVal.j, retVal.k, (unsigned int)retVal.l,
|
||||
retVal.m, retVal.n, retVal.o, retVal.p, retVal.q, retVal.r,
|
||||
- retVal.s, retVal.t, retVal.u, retVal.v, retVal.w, retVal.x,
|
||||
+ retVal.s, retVal.t, retVal.u, retVal.v, retVal.w, (unsigned int)retVal.x,
|
||||
retVal.y, retVal.z, retVal.aa, retVal.bb, retVal.cc, retVal.dd,
|
||||
- retVal.ee, retVal.ff, retVal.gg, retVal.hh, retVal.ii, retVal.jj,
|
||||
+ retVal.ee, retVal.ff, retVal.gg, retVal.hh, retVal.ii, (unsigned int)retVal.jj,
|
||||
retVal.kk, retVal.ll, retVal.mm, retVal.nn, retVal.oo, retVal.pp,
|
||||
- retVal.qq, retVal.rr, retVal.ss, retVal.tt, retVal.uu, retVal.vv, retVal.ww, retVal.xx);
|
||||
+ retVal.qq, retVal.rr, retVal.ss, retVal.tt, retVal.uu, (unsigned int)retVal.vv, retVal.ww, retVal.xx);
|
||||
// { dg-output "\nres: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
|
||||
|
||||
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_large_fn, NULL, code) == FFI_OK);
|
||||
@@ -326,18 +326,18 @@ main(int argc __UNUSED__, const char** a
|
||||
ui8, si8, ui16, si16, ui32, si32, ui64, si64, f, d, ld, p,
|
||||
ui8, si8);
|
||||
// { dg-output "\n1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
|
||||
- printf("res: %hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
- "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
- "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
- "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p %hhu %hhd\n",
|
||||
+ printf("res: %hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
+ "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
+ "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
+ "%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x %hhu %hhd\n",
|
||||
retVal.a, retVal.b, retVal.c, retVal.d, retVal.e, retVal.f,
|
||||
- retVal.g, retVal.h, retVal.i, retVal.j, retVal.k, retVal.l,
|
||||
+ retVal.g, retVal.h, retVal.i, retVal.j, retVal.k, (unsigned int)retVal.l,
|
||||
retVal.m, retVal.n, retVal.o, retVal.p, retVal.q, retVal.r,
|
||||
- retVal.s, retVal.t, retVal.u, retVal.v, retVal.w, retVal.x,
|
||||
+ retVal.s, retVal.t, retVal.u, retVal.v, retVal.w, (unsigned int)retVal.x,
|
||||
retVal.y, retVal.z, retVal.aa, retVal.bb, retVal.cc, retVal.dd,
|
||||
- retVal.ee, retVal.ff, retVal.gg, retVal.hh, retVal.ii, retVal.jj,
|
||||
+ retVal.ee, retVal.ff, retVal.gg, retVal.hh, retVal.ii, (unsigned int)retVal.jj,
|
||||
retVal.kk, retVal.ll, retVal.mm, retVal.nn, retVal.oo, retVal.pp,
|
||||
- retVal.qq, retVal.rr, retVal.ss, retVal.tt, retVal.uu, retVal.vv, retVal.ww, retVal.xx);
|
||||
+ retVal.qq, retVal.rr, retVal.ss, retVal.tt, retVal.uu, (unsigned int)retVal.vv, retVal.ww, retVal.xx);
|
||||
// { dg-output "\nres: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
|
||||
|
||||
return 0;
|
||||
@@ -4,3 +4,4 @@ fix-huge_struct-test
|
||||
windows
|
||||
undefine_AC_ARG_VAR_PRECIOUS
|
||||
powerpc-fixes
|
||||
fix-huge_struct-on-solaris
|
||||
|
||||
@@ -131,18 +131,18 @@ test_large_fn(
|
||||
ui64_4 + 4, si64_4 + 4, f_4 + 4, d_4 + 4, ld_4 + 4, (char*)((intptr_t)p_4 + 4),
|
||||
ui8_5 + 5, si8_5 + 5};
|
||||
|
||||
printf("%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p %hhu %hhd: "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p %hhu %hhd\n",
|
||||
ui8_1, si8_1, ui16_1, si16_1, ui32_1, si32_1, ui64_1, si64_1, f_1, d_1, ld_1, p_1,
|
||||
ui8_2, si8_2, ui16_2, si16_2, ui32_2, si32_2, ui64_2, si64_2, f_2, d_2, ld_2, p_2,
|
||||
ui8_3, si8_3, ui16_3, si16_3, ui32_3, si32_3, ui64_3, si64_3, f_3, d_3, ld_3, p_3,
|
||||
ui8_4, si8_4, ui16_4, si16_4, ui32_4, si32_4, ui64_4, si64_4, f_4, d_4, ld_4, p_4, ui8_5, si8_5,
|
||||
printf("%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x %hhu %hhd: "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x %hhu %hhd\n",
|
||||
ui8_1, si8_1, ui16_1, si16_1, ui32_1, si32_1, ui64_1, si64_1, f_1, d_1, ld_1, (unsigned int)p_1,
|
||||
ui8_2, si8_2, ui16_2, si16_2, ui32_2, si32_2, ui64_2, si64_2, f_2, d_2, ld_2, (unsigned int)p_2,
|
||||
ui8_3, si8_3, ui16_3, si16_3, ui32_3, si32_3, ui64_3, si64_3, f_3, d_3, ld_3, (unsigned int)p_3,
|
||||
ui8_4, si8_4, ui16_4, si16_4, ui32_4, si32_4, ui64_4, si64_4, f_4, d_4, ld_4, (unsigned int)p_4, ui8_5, si8_5,
|
||||
retVal.a, retVal.b, retVal.c, retVal.d, retVal.e, retVal.f,
|
||||
retVal.g, retVal.h, retVal.i, retVal.j, retVal.k, retVal.l,
|
||||
retVal.m, retVal.n, retVal.o, retVal.p, retVal.q, retVal.r,
|
||||
@@ -298,18 +298,18 @@ main(int argc __UNUSED__, const char** argv __UNUSED__)
|
||||
|
||||
ffi_call(&cif, FFI_FN(test_large_fn), &retVal, argValues);
|
||||
// { dg-output "1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
|
||||
printf("res: %hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p %hhu %hhd\n",
|
||||
printf("res: %hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x %hhu %hhd\n",
|
||||
retVal.a, retVal.b, retVal.c, retVal.d, retVal.e, retVal.f,
|
||||
retVal.g, retVal.h, retVal.i, retVal.j, retVal.k, retVal.l,
|
||||
retVal.g, retVal.h, retVal.i, retVal.j, retVal.k, (unsigned int)retVal.l,
|
||||
retVal.m, retVal.n, retVal.o, retVal.p, retVal.q, retVal.r,
|
||||
retVal.s, retVal.t, retVal.u, retVal.v, retVal.w, retVal.x,
|
||||
retVal.s, retVal.t, retVal.u, retVal.v, retVal.w, (unsigned int)retVal.x,
|
||||
retVal.y, retVal.z, retVal.aa, retVal.bb, retVal.cc, retVal.dd,
|
||||
retVal.ee, retVal.ff, retVal.gg, retVal.hh, retVal.ii, retVal.jj,
|
||||
retVal.ee, retVal.ff, retVal.gg, retVal.hh, retVal.ii, (unsigned int)retVal.jj,
|
||||
retVal.kk, retVal.ll, retVal.mm, retVal.nn, retVal.oo, retVal.pp,
|
||||
retVal.qq, retVal.rr, retVal.ss, retVal.tt, retVal.uu, retVal.vv, retVal.ww, retVal.xx);
|
||||
retVal.qq, retVal.rr, retVal.ss, retVal.tt, retVal.uu, (unsigned int)retVal.vv, retVal.ww, retVal.xx);
|
||||
// { dg-output "\nres: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
|
||||
|
||||
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_large_fn, NULL, code) == FFI_OK);
|
||||
@@ -326,18 +326,18 @@ main(int argc __UNUSED__, const char** argv __UNUSED__)
|
||||
ui8, si8, ui16, si16, ui32, si32, ui64, si64, f, d, ld, p,
|
||||
ui8, si8);
|
||||
// { dg-output "\n1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
|
||||
printf("res: %hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %p %hhu %hhd\n",
|
||||
printf("res: %hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x "
|
||||
"%hhu %hhd %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#x %hhu %hhd\n",
|
||||
retVal.a, retVal.b, retVal.c, retVal.d, retVal.e, retVal.f,
|
||||
retVal.g, retVal.h, retVal.i, retVal.j, retVal.k, retVal.l,
|
||||
retVal.g, retVal.h, retVal.i, retVal.j, retVal.k, (unsigned int)retVal.l,
|
||||
retVal.m, retVal.n, retVal.o, retVal.p, retVal.q, retVal.r,
|
||||
retVal.s, retVal.t, retVal.u, retVal.v, retVal.w, retVal.x,
|
||||
retVal.s, retVal.t, retVal.u, retVal.v, retVal.w, (unsigned int)retVal.x,
|
||||
retVal.y, retVal.z, retVal.aa, retVal.bb, retVal.cc, retVal.dd,
|
||||
retVal.ee, retVal.ff, retVal.gg, retVal.hh, retVal.ii, retVal.jj,
|
||||
retVal.ee, retVal.ff, retVal.gg, retVal.hh, retVal.ii, (unsigned int)retVal.jj,
|
||||
retVal.kk, retVal.ll, retVal.mm, retVal.nn, retVal.oo, retVal.pp,
|
||||
retVal.qq, retVal.rr, retVal.ss, retVal.tt, retVal.uu, retVal.vv, retVal.ww, retVal.xx);
|
||||
retVal.qq, retVal.rr, retVal.ss, retVal.tt, retVal.uu, (unsigned int)retVal.vv, retVal.ww, retVal.xx);
|
||||
// { dg-output "\nres: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user