Rebase from GCC
This commit is contained in:
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Anthony Green <green@moxielogic.com>
|
||||
Chris Young <cdyoung@ntlworld.com>
|
||||
|
||||
@@ -8,16 +27,11 @@
|
||||
|
||||
* include/ffi_common.h (LIKELY, UNLIKELY): Fix definitions.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-23 Alan Hourihane <alanh@fairlite.co.uk>
|
||||
|
||||
* src/m68k/ffi.c (ffi_prep_closure_loc): Fix ABI check.
|
||||
* testsuite/libffi.call/return_sc.c (main): Fix test check.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,18 +1,32 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Anthony Green <green@moxielogic.com>
|
||||
Dmitry Nadezhin <dmitry.nadezhin@gmail.com>
|
||||
|
||||
* include/ffi_common.h (LIKELY, UNLIKELY): Fix definitions.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-23 Alan Hourihane <alanh@fairlite.co.uk>
|
||||
|
||||
* src/m68k/ffi.c (ffi_prep_closure_loc): Fix ABI check.
|
||||
* testsuite/libffi.call/return_sc.c (main): Fix test check.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
1157
.pc/amiga/configure
vendored
1157
.pc/amiga/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -339,7 +339,7 @@ case "$target" in
|
||||
[Cannot use PROT_EXEC on this target, so, we revert to
|
||||
alternative means])
|
||||
;;
|
||||
*-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*)
|
||||
*-apple-darwin1[[10]]* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*)
|
||||
AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1,
|
||||
[Cannot use malloc on this target, so, we revert to
|
||||
alternative means])
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
24
.pc/darwin11/configure
vendored
24
.pc/darwin11/configure
vendored
@@ -621,9 +621,6 @@ FFI_DEBUG_FALSE
|
||||
FFI_DEBUG_TRUE
|
||||
TARGETDIR
|
||||
TARGET
|
||||
FFI_EXEC_TRAMPOLINE_TABLE
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_FALSE
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_TRUE
|
||||
sys_symbol_underscore
|
||||
HAVE_LONG_DOUBLE
|
||||
ALLOCA
|
||||
@@ -13290,30 +13287,13 @@ $as_echo "#define SYMBOL_UNDERSCORE 1" >>confdefs.h
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
FFI_EXEC_TRAMPOLINE_TABLE=0
|
||||
case "$target" in
|
||||
*arm*-apple-darwin*)
|
||||
FFI_EXEC_TRAMPOLINE_TABLE=1
|
||||
|
||||
$as_echo "#define FFI_EXEC_TRAMPOLINE_TABLE 1" >>confdefs.h
|
||||
|
||||
;;
|
||||
*-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*)
|
||||
|
||||
$as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h
|
||||
|
||||
;;
|
||||
esac
|
||||
if test x$FFI_EXEC_TRAMPOLINE_TABLE = x1; then
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_TRUE=
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_FALSE='#'
|
||||
else
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_TRUE='#'
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test x$TARGET = xX86_64; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler supports unwind section type" >&5
|
||||
@@ -13741,10 +13721,6 @@ if test -z "${PA64_HPUX_TRUE}" && test -z "${PA64_HPUX_FALSE}"; then
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
|
||||
if test -z "${FFI_EXEC_TRAMPOLINE_TABLE_TRUE}" && test -z "${FFI_EXEC_TRAMPOLINE_TABLE_FALSE}"; then
|
||||
as_fn_error $? "conditional \"FFI_EXEC_TRAMPOLINE_TABLE\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${FFI_DEBUG_TRUE}" && test -z "${FFI_DEBUG_FALSE}"; then
|
||||
as_fn_error $? "conditional \"FFI_DEBUG\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -64,6 +64,8 @@ typedef enum ffi_abi {
|
||||
#ifdef X86_WIN32
|
||||
FFI_SYSV,
|
||||
FFI_STDCALL,
|
||||
FFI_THISCALL,
|
||||
FFI_FASTCALL,
|
||||
/* TODO: Add fastcall support for the sake of completeness */
|
||||
FFI_DEFAULT_ABI = FFI_SYSV,
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
24
.pc/interix/configure
vendored
24
.pc/interix/configure
vendored
@@ -621,9 +621,6 @@ FFI_DEBUG_FALSE
|
||||
FFI_DEBUG_TRUE
|
||||
TARGETDIR
|
||||
TARGET
|
||||
FFI_EXEC_TRAMPOLINE_TABLE
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_FALSE
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_TRUE
|
||||
sys_symbol_underscore
|
||||
HAVE_LONG_DOUBLE
|
||||
ALLOCA
|
||||
@@ -13290,30 +13287,13 @@ $as_echo "#define SYMBOL_UNDERSCORE 1" >>confdefs.h
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
FFI_EXEC_TRAMPOLINE_TABLE=0
|
||||
case "$target" in
|
||||
*arm*-apple-darwin*)
|
||||
FFI_EXEC_TRAMPOLINE_TABLE=1
|
||||
|
||||
$as_echo "#define FFI_EXEC_TRAMPOLINE_TABLE 1" >>confdefs.h
|
||||
|
||||
;;
|
||||
*-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*)
|
||||
|
||||
$as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h
|
||||
|
||||
;;
|
||||
esac
|
||||
if test x$FFI_EXEC_TRAMPOLINE_TABLE = x1; then
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_TRUE=
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_FALSE='#'
|
||||
else
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_TRUE='#'
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test x$TARGET = xX86_64; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler supports unwind section type" >&5
|
||||
@@ -13741,10 +13721,6 @@ if test -z "${PA64_HPUX_TRUE}" && test -z "${PA64_HPUX_FALSE}"; then
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
|
||||
if test -z "${FFI_EXEC_TRAMPOLINE_TABLE_TRUE}" && test -z "${FFI_EXEC_TRAMPOLINE_TABLE_FALSE}"; then
|
||||
as_fn_error $? "conditional \"FFI_EXEC_TRAMPOLINE_TABLE\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${FFI_DEBUG_TRUE}" && test -z "${FFI_DEBUG_FALSE}"; then
|
||||
as_fn_error $? "conditional \"FFI_DEBUG\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -389,7 +389,6 @@ psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sys_symbol_underscore = @sys_symbol_underscore@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
|
||||
@@ -176,9 +176,6 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
|
||||
#ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
|
||||
#ifdef LIBFFI_ASM
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,270 +0,0 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
|
||||
sysv.S - Copyright (c) 1998 Andreas Schwab
|
||||
Copyright (c) 2008 Red Hat, Inc.
|
||||
|
||||
m68k 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>
|
||||
|
||||
#ifdef HAVE_AS_CFI_PSEUDO_OP
|
||||
#define CFI_STARTPROC() .cfi_startproc
|
||||
#define CFI_OFFSET(reg,off) .cfi_offset reg,off
|
||||
#define CFI_DEF_CFA(reg,off) .cfi_def_cfa reg,off
|
||||
#define CFI_ENDPROC() .cfi_endproc
|
||||
#else
|
||||
#define CFI_STARTPROC()
|
||||
#define CFI_OFFSET(reg,off)
|
||||
#define CFI_DEF_CFA(reg,off)
|
||||
#define CFI_ENDPROC()
|
||||
#endif
|
||||
|
||||
.text
|
||||
|
||||
.globl ffi_call_SYSV
|
||||
.type ffi_call_SYSV,@function
|
||||
.align 4
|
||||
|
||||
ffi_call_SYSV:
|
||||
CFI_STARTPROC()
|
||||
link %fp,#0
|
||||
CFI_OFFSET(14,-8)
|
||||
CFI_DEF_CFA(14,8)
|
||||
move.l %d2,-(%sp)
|
||||
CFI_OFFSET(2,-12)
|
||||
|
||||
| Make room for all of the new args.
|
||||
sub.l 12(%fp),%sp
|
||||
|
||||
| Call ffi_prep_args
|
||||
move.l 8(%fp),-(%sp)
|
||||
pea 4(%sp)
|
||||
#if !defined __PIC__
|
||||
jsr ffi_prep_args
|
||||
#else
|
||||
bsr.l ffi_prep_args@PLTPC
|
||||
#endif
|
||||
addq.l #8,%sp
|
||||
|
||||
| Pass pointer to struct value, if any
|
||||
move.l %a0,%a1
|
||||
|
||||
| Call the function
|
||||
move.l 24(%fp),%a0
|
||||
jsr (%a0)
|
||||
|
||||
| Remove the space we pushed for the args
|
||||
add.l 12(%fp),%sp
|
||||
|
||||
| Load the pointer to storage for the return value
|
||||
move.l 20(%fp),%a1
|
||||
|
||||
| Load the return type code
|
||||
move.l 16(%fp),%d2
|
||||
|
||||
| If the return value pointer is NULL, assume no return value.
|
||||
| NOTE: On the mc68000, tst on an address register is not supported.
|
||||
#if defined(__mc68000__) && !defined(__mcoldfire__)
|
||||
cmp.w #0, %a1
|
||||
#else
|
||||
tst.l %a1
|
||||
#endif
|
||||
jbeq noretval
|
||||
|
||||
btst #0,%d2
|
||||
jbeq retlongint
|
||||
move.l %d0,(%a1)
|
||||
jbra epilogue
|
||||
|
||||
retlongint:
|
||||
btst #1,%d2
|
||||
jbeq retfloat
|
||||
move.l %d0,(%a1)
|
||||
move.l %d1,4(%a1)
|
||||
jbra epilogue
|
||||
|
||||
retfloat:
|
||||
btst #2,%d2
|
||||
jbeq retdouble
|
||||
#if defined(__MC68881__)
|
||||
fmove.s %fp0,(%a1)
|
||||
#else
|
||||
move.l %d0,(%a1)
|
||||
#endif
|
||||
jbra epilogue
|
||||
|
||||
retdouble:
|
||||
btst #3,%d2
|
||||
jbeq retlongdouble
|
||||
#if defined(__MC68881__)
|
||||
fmove.d %fp0,(%a1)
|
||||
#else
|
||||
move.l %d0,(%a1)+
|
||||
move.l %d1,(%a1)
|
||||
#endif
|
||||
jbra epilogue
|
||||
|
||||
retlongdouble:
|
||||
btst #4,%d2
|
||||
jbeq retpointer
|
||||
#if defined(__MC68881__)
|
||||
fmove.x %fp0,(%a1)
|
||||
#else
|
||||
move.l %d0,(%a1)+
|
||||
move.l %d1,(%a1)+
|
||||
move.l %d2,(%a1)
|
||||
#endif
|
||||
jbra epilogue
|
||||
|
||||
retpointer:
|
||||
btst #5,%d2
|
||||
jbeq retstruct1
|
||||
move.l %a0,(%a1)
|
||||
jbra epilogue
|
||||
|
||||
retstruct1:
|
||||
btst #6,%d2
|
||||
jbeq retstruct2
|
||||
move.b %d0,(%a1)
|
||||
jbra epilogue
|
||||
|
||||
retstruct2:
|
||||
btst #7,%d2
|
||||
jbeq noretval
|
||||
move.w %d0,(%a1)
|
||||
|
||||
noretval:
|
||||
epilogue:
|
||||
move.l (%sp)+,%d2
|
||||
unlk %fp
|
||||
rts
|
||||
CFI_ENDPROC()
|
||||
.size ffi_call_SYSV,.-ffi_call_SYSV
|
||||
|
||||
.globl ffi_closure_SYSV
|
||||
.type ffi_closure_SYSV, @function
|
||||
.align 4
|
||||
|
||||
ffi_closure_SYSV:
|
||||
CFI_STARTPROC()
|
||||
link %fp,#-12
|
||||
CFI_OFFSET(14,-8)
|
||||
CFI_DEF_CFA(14,8)
|
||||
move.l %sp,-12(%fp)
|
||||
pea 8(%fp)
|
||||
pea -12(%fp)
|
||||
move.l %a0,-(%sp)
|
||||
#if !defined __PIC__
|
||||
jsr ffi_closure_SYSV_inner
|
||||
#else
|
||||
bsr.l ffi_closure_SYSV_inner@PLTPC
|
||||
#endif
|
||||
|
||||
lsr.l #1,%d0
|
||||
jne 1f
|
||||
jcc .Lcls_epilogue
|
||||
move.l -12(%fp),%d0
|
||||
.Lcls_epilogue:
|
||||
unlk %fp
|
||||
rts
|
||||
1:
|
||||
lea -12(%fp),%a0
|
||||
lsr.l #2,%d0
|
||||
jne 1f
|
||||
jcs .Lcls_ret_float
|
||||
move.l (%a0)+,%d0
|
||||
move.l (%a0),%d1
|
||||
jra .Lcls_epilogue
|
||||
.Lcls_ret_float:
|
||||
#if defined(__MC68881__)
|
||||
fmove.s (%a0),%fp0
|
||||
#else
|
||||
move.l (%a0),%d0
|
||||
#endif
|
||||
jra .Lcls_epilogue
|
||||
1:
|
||||
lsr.l #2,%d0
|
||||
jne 1f
|
||||
jcs .Lcls_ret_ldouble
|
||||
#if defined(__MC68881__)
|
||||
fmove.d (%a0),%fp0
|
||||
#else
|
||||
move.l (%a0)+,%d0
|
||||
move.l (%a0),%d1
|
||||
#endif
|
||||
jra .Lcls_epilogue
|
||||
.Lcls_ret_ldouble:
|
||||
#if defined(__MC68881__)
|
||||
fmove.x (%a0),%fp0
|
||||
#else
|
||||
move.l (%a0)+,%d0
|
||||
move.l (%a0)+,%d1
|
||||
move.l (%a0),%d2
|
||||
#endif
|
||||
jra .Lcls_epilogue
|
||||
1:
|
||||
lsr.l #2,%d0
|
||||
jne .Lcls_ret_struct2
|
||||
jcs .Lcls_ret_struct1
|
||||
move.l (%a0),%a0
|
||||
move.l %a0,%d0
|
||||
jra .Lcls_epilogue
|
||||
.Lcls_ret_struct1:
|
||||
move.b (%a0),%d0
|
||||
jra .Lcls_epilogue
|
||||
.Lcls_ret_struct2:
|
||||
move.w (%a0),%d0
|
||||
jra .Lcls_epilogue
|
||||
CFI_ENDPROC()
|
||||
|
||||
.size ffi_closure_SYSV,.-ffi_closure_SYSV
|
||||
|
||||
.globl ffi_closure_struct_SYSV
|
||||
.type ffi_closure_struct_SYSV, @function
|
||||
.align 4
|
||||
|
||||
ffi_closure_struct_SYSV:
|
||||
CFI_STARTPROC()
|
||||
link %fp,#0
|
||||
CFI_OFFSET(14,-8)
|
||||
CFI_DEF_CFA(14,8)
|
||||
move.l %sp,-12(%fp)
|
||||
pea 8(%fp)
|
||||
move.l %a1,-(%sp)
|
||||
move.l %a0,-(%sp)
|
||||
#if !defined __PIC__
|
||||
jsr ffi_closure_SYSV_inner
|
||||
#else
|
||||
bsr.l ffi_closure_SYSV_inner@PLTPC
|
||||
#endif
|
||||
unlk %fp
|
||||
rts
|
||||
CFI_ENDPROC()
|
||||
.size ffi_closure_struct_SYSV,.-ffi_closure_struct_SYSV
|
||||
|
||||
#if defined __ELF__ && defined __linux__
|
||||
.section .note.GNU-stack,"",@progbits
|
||||
#endif
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -391,7 +391,6 @@ psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sys_symbol_underscore = @sys_symbol_underscore@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
24
.pc/ppc64-darwin/configure
vendored
24
.pc/ppc64-darwin/configure
vendored
@@ -621,9 +621,6 @@ FFI_DEBUG_FALSE
|
||||
FFI_DEBUG_TRUE
|
||||
TARGETDIR
|
||||
TARGET
|
||||
FFI_EXEC_TRAMPOLINE_TABLE
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_FALSE
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_TRUE
|
||||
sys_symbol_underscore
|
||||
HAVE_LONG_DOUBLE
|
||||
ALLOCA
|
||||
@@ -13290,30 +13287,13 @@ $as_echo "#define SYMBOL_UNDERSCORE 1" >>confdefs.h
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
FFI_EXEC_TRAMPOLINE_TABLE=0
|
||||
case "$target" in
|
||||
*arm*-apple-darwin*)
|
||||
FFI_EXEC_TRAMPOLINE_TABLE=1
|
||||
|
||||
$as_echo "#define FFI_EXEC_TRAMPOLINE_TABLE 1" >>confdefs.h
|
||||
|
||||
;;
|
||||
*-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*)
|
||||
|
||||
$as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h
|
||||
|
||||
;;
|
||||
esac
|
||||
if test x$FFI_EXEC_TRAMPOLINE_TABLE = x1; then
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_TRUE=
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_FALSE='#'
|
||||
else
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_TRUE='#'
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test x$TARGET = xX86_64; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler supports unwind section type" >&5
|
||||
@@ -13741,10 +13721,6 @@ if test -z "${PA64_HPUX_TRUE}" && test -z "${PA64_HPUX_FALSE}"; then
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
|
||||
if test -z "${FFI_EXEC_TRAMPOLINE_TABLE_TRUE}" && test -z "${FFI_EXEC_TRAMPOLINE_TABLE_FALSE}"; then
|
||||
as_fn_error $? "conditional \"FFI_EXEC_TRAMPOLINE_TABLE\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${FFI_DEBUG_TRUE}" && test -z "${FFI_DEBUG_FALSE}"; then
|
||||
as_fn_error $? "conditional \"FFI_DEBUG\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -75,14 +75,6 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
mdate-sh missing texinfo.tex
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
|
||||
$(top_srcdir)/m4/ax_cc_maxopt.m4 \
|
||||
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
|
||||
$(top_srcdir)/m4/ax_check_compiler_flags.m4 \
|
||||
$(top_srcdir)/m4/ax_compiler_vendor.m4 \
|
||||
$(top_srcdir)/m4/ax_configure_args.m4 \
|
||||
$(top_srcdir)/m4/ax_enable_builddir.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_archflag.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
|
||||
@@ -344,7 +336,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PRTDIAG = @PRTDIAG@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
@@ -365,7 +356,6 @@ am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
ax_enable_builddir_sed = @ax_enable_builddir_sed@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
@@ -401,7 +391,6 @@ psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sys_symbol_underscore = @sys_symbol_underscore@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -48,6 +48,13 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
register void **p_argv;
|
||||
register char *argp;
|
||||
register ffi_type **p_arg;
|
||||
#ifdef X86_WIN32
|
||||
size_t p_stack_args[2];
|
||||
void *p_stack_data[2];
|
||||
char *argp2 = stack;
|
||||
int stack_args_count = 0;
|
||||
int cabi = ecif->cif->abi;
|
||||
#endif
|
||||
|
||||
argp = stack;
|
||||
|
||||
@@ -59,6 +66,16 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
)
|
||||
{
|
||||
*(void **) argp = ecif->rvalue;
|
||||
#ifdef X86_WIN32
|
||||
/* For fastcall/thiscall this is first register-passed
|
||||
argument. */
|
||||
if (cabi == FFI_THISCALL || cabi == FFI_FASTCALL)
|
||||
{
|
||||
p_stack_args[stack_args_count] = sizeof (void*);
|
||||
p_stack_data[stack_args_count] = argp;
|
||||
++stack_args_count;
|
||||
}
|
||||
#endif
|
||||
argp += sizeof(void*);
|
||||
}
|
||||
|
||||
@@ -134,6 +151,24 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
{
|
||||
memcpy(argp, *p_argv, z);
|
||||
}
|
||||
|
||||
#ifdef X86_WIN32
|
||||
/* For thiscall/fastcall convention register-passed arguments
|
||||
are the first two none-floating-point arguments with a size
|
||||
smaller or equal to sizeof (void*). */
|
||||
if ((cabi == FFI_THISCALL && stack_args_count < 1)
|
||||
|| (cabi == FFI_FASTCALL && stack_args_count < 2))
|
||||
{
|
||||
if (z <= 4
|
||||
&& ((*p_arg)->type != FFI_TYPE_FLOAT
|
||||
&& (*p_arg)->type != FFI_TYPE_STRUCT))
|
||||
{
|
||||
p_stack_args[stack_args_count] = z;
|
||||
p_stack_data[stack_args_count] = argp;
|
||||
++stack_args_count;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
p_argv++;
|
||||
#ifdef X86_WIN64
|
||||
argp += (z + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
|
||||
@@ -141,7 +176,45 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
argp += z;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef X86_WIN32
|
||||
/* We need to move the register-passed arguments for thiscall/fastcall
|
||||
on top of stack, so that those can be moved to registers ecx/edx by
|
||||
call-handler. */
|
||||
if (stack_args_count > 0)
|
||||
{
|
||||
size_t zz = (p_stack_args[0] + 3) & ~3;
|
||||
char *h;
|
||||
|
||||
/* Move first argument to top-stack position. */
|
||||
if (p_stack_data[0] != argp2)
|
||||
{
|
||||
h = alloca (zz + 1);
|
||||
memcpy (h, p_stack_data[0], zz);
|
||||
memmove (argp2 + zz, argp2,
|
||||
(size_t) ((char *) p_stack_data[0] - (char*)argp2));
|
||||
memcpy (argp2, h, zz);
|
||||
}
|
||||
|
||||
argp2 += zz;
|
||||
--stack_args_count;
|
||||
if (zz > 4)
|
||||
stack_args_count = 0;
|
||||
|
||||
/* If we have a second argument, then move it on top
|
||||
after the first one. */
|
||||
if (stack_args_count > 0 && p_stack_data[1] != argp2)
|
||||
{
|
||||
zz = p_stack_args[1];
|
||||
zz = (zz + 3) & ~3;
|
||||
h = alloca (zz + 1);
|
||||
h = alloca (zz + 1);
|
||||
memcpy (h, p_stack_data[1], zz);
|
||||
memmove (argp2 + zz, argp2, (size_t) ((char*) p_stack_data[1] - (char*)argp2));
|
||||
memcpy (argp2, h, zz);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -252,7 +325,7 @@ ffi_call_win64(void (*)(char *, extended_cif *), extended_cif *,
|
||||
#elif defined(X86_WIN32)
|
||||
extern void
|
||||
ffi_call_win32(void (*)(char *, extended_cif *), extended_cif *,
|
||||
unsigned, unsigned, unsigned *, void (*fn)(void));
|
||||
unsigned, unsigned, unsigned, unsigned *, void (*fn)(void));
|
||||
#else
|
||||
extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *,
|
||||
unsigned, unsigned, unsigned *, void (*fn)(void));
|
||||
@@ -297,8 +370,37 @@ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
|
||||
#elif defined(X86_WIN32)
|
||||
case FFI_SYSV:
|
||||
case FFI_STDCALL:
|
||||
ffi_call_win32(ffi_prep_args, &ecif, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
ffi_call_win32(ffi_prep_args, &ecif, cif->abi, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
break;
|
||||
case FFI_THISCALL:
|
||||
case FFI_FASTCALL:
|
||||
{
|
||||
unsigned int abi = cif->abi;
|
||||
unsigned int i, passed_regs = 0;
|
||||
|
||||
if (cif->flags == FFI_TYPE_STRUCT)
|
||||
++passed_regs;
|
||||
|
||||
for (i=0; i < cif->nargs && passed_regs < 2;i++)
|
||||
{
|
||||
size_t sz;
|
||||
|
||||
if (cif->arg_types[i]->type == FFI_TYPE_FLOAT
|
||||
|| cif->arg_types[i]->type == FFI_TYPE_STRUCT)
|
||||
continue;
|
||||
sz = (cif->arg_types[i]->size + 3) & ~3;
|
||||
if (sz == 0 || sz > 4)
|
||||
continue;
|
||||
++passed_regs;
|
||||
}
|
||||
if (passed_regs < 2 && abi == FFI_FASTCALL)
|
||||
abi = FFI_THISCALL;
|
||||
if (passed_regs < 1 && abi == FFI_THISCALL)
|
||||
abi = FFI_STDCALL;
|
||||
ffi_call_win32(ffi_prep_args, &ecif, abi, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
}
|
||||
break;
|
||||
#else
|
||||
case FFI_SYSV:
|
||||
@@ -625,8 +727,37 @@ ffi_raw_call(ffi_cif *cif, void (*fn)(void), void *rvalue, ffi_raw *fake_avalue)
|
||||
#ifdef X86_WIN32
|
||||
case FFI_SYSV:
|
||||
case FFI_STDCALL:
|
||||
ffi_call_win32(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
ffi_call_win32(ffi_prep_args, &ecif, cif->abi, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
break;
|
||||
case FFI_THISCALL:
|
||||
case FFI_FASTCALL:
|
||||
{
|
||||
unsigned int abi = cif->abi;
|
||||
unsigned int i, passed_regs = 0;
|
||||
|
||||
if (cif->flags == FFI_TYPE_STRUCT)
|
||||
++passed_regs;
|
||||
|
||||
for (i=0; i < cif->nargs && passed_regs < 2;i++)
|
||||
{
|
||||
size_t sz;
|
||||
|
||||
if (cif->arg_types[i]->type == FFI_TYPE_FLOAT
|
||||
|| cif->arg_types[i]->type == FFI_TYPE_STRUCT)
|
||||
continue;
|
||||
sz = (cif->arg_types[i]->size + 3) & ~3;
|
||||
if (sz == 0 || sz > 4)
|
||||
continue;
|
||||
++passed_regs;
|
||||
}
|
||||
if (passed_regs < 2 && abi == FFI_FASTCALL)
|
||||
cif->abi = abi = FFI_THISCALL;
|
||||
if (passed_regs < 1 && abi == FFI_THISCALL)
|
||||
cif->abi = abi = FFI_STDCALL;
|
||||
ffi_call_win32(ffi_prep_args, &ecif, abi, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
}
|
||||
break;
|
||||
#else
|
||||
case FFI_SYSV:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* -----------------------------------------------------------------*-C-*-
|
||||
ffitarget.h - Copyright (c) 1996-2003, 2010 Red Hat, Inc.
|
||||
Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
ffitarget.h - Copyright (c) 2012 Anthony Green
|
||||
Copyright (c) 1996-2003, 2010 Red Hat, Inc.
|
||||
Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
|
||||
Target configuration macros for x86 and x86-64.
|
||||
|
||||
@@ -64,6 +65,8 @@ typedef enum ffi_abi {
|
||||
#ifdef X86_WIN32
|
||||
FFI_SYSV,
|
||||
FFI_STDCALL,
|
||||
FFI_THISCALL,
|
||||
FFI_FASTCALL,
|
||||
FFI_LAST_ABI,
|
||||
/* TODO: Add fastcall support for the sake of completeness */
|
||||
FFI_DEFAULT_ABI = FFI_SYSV
|
||||
|
||||
@@ -393,7 +393,6 @@ psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sys_symbol_underscore = @sys_symbol_underscore@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
|
||||
@@ -1,13 +1,27 @@
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-23 Alan Hourihane <alanh@fairlite.co.uk>
|
||||
|
||||
* src/m68k/ffi.c (ffi_prep_closure_loc): Fix ABI check.
|
||||
* testsuite/libffi.call/return_sc.c (main): Fix test check.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -48,6 +48,13 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
register void **p_argv;
|
||||
register char *argp;
|
||||
register ffi_type **p_arg;
|
||||
#ifdef X86_WIN32
|
||||
size_t p_stack_args[2];
|
||||
void *p_stack_data[2];
|
||||
char *argp2 = stack;
|
||||
int stack_args_count = 0;
|
||||
int cabi = ecif->cif->abi;
|
||||
#endif
|
||||
|
||||
argp = stack;
|
||||
|
||||
@@ -59,6 +66,16 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
)
|
||||
{
|
||||
*(void **) argp = ecif->rvalue;
|
||||
#ifdef X86_WIN32
|
||||
/* For fastcall/thiscall this is first register-passed
|
||||
argument. */
|
||||
if (cabi == FFI_THISCALL || cabi == FFI_FASTCALL)
|
||||
{
|
||||
p_stack_args[stack_args_count] = sizeof (void*);
|
||||
p_stack_data[stack_args_count] = argp;
|
||||
++stack_args_count;
|
||||
}
|
||||
#endif
|
||||
argp += sizeof(void*);
|
||||
}
|
||||
|
||||
@@ -134,6 +151,24 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
{
|
||||
memcpy(argp, *p_argv, z);
|
||||
}
|
||||
|
||||
#ifdef X86_WIN32
|
||||
/* For thiscall/fastcall convention register-passed arguments
|
||||
are the first two none-floating-point arguments with a size
|
||||
smaller or equal to sizeof (void*). */
|
||||
if ((cabi == FFI_THISCALL && stack_args_count < 1)
|
||||
|| (cabi == FFI_FASTCALL && stack_args_count < 2))
|
||||
{
|
||||
if (z <= 4
|
||||
&& ((*p_arg)->type != FFI_TYPE_FLOAT
|
||||
&& (*p_arg)->type != FFI_TYPE_STRUCT))
|
||||
{
|
||||
p_stack_args[stack_args_count] = z;
|
||||
p_stack_data[stack_args_count] = argp;
|
||||
++stack_args_count;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
p_argv++;
|
||||
#ifdef X86_WIN64
|
||||
argp += (z + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
|
||||
@@ -141,7 +176,45 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
argp += z;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef X86_WIN32
|
||||
/* We need to move the register-passed arguments for thiscall/fastcall
|
||||
on top of stack, so that those can be moved to registers ecx/edx by
|
||||
call-handler. */
|
||||
if (stack_args_count > 0)
|
||||
{
|
||||
size_t zz = (p_stack_args[0] + 3) & ~3;
|
||||
char *h;
|
||||
|
||||
/* Move first argument to top-stack position. */
|
||||
if (p_stack_data[0] != argp2)
|
||||
{
|
||||
h = alloca (zz + 1);
|
||||
memcpy (h, p_stack_data[0], zz);
|
||||
memmove (argp2 + zz, argp2,
|
||||
(size_t) ((char *) p_stack_data[0] - (char*)argp2));
|
||||
memcpy (argp2, h, zz);
|
||||
}
|
||||
|
||||
argp2 += zz;
|
||||
--stack_args_count;
|
||||
if (zz > 4)
|
||||
stack_args_count = 0;
|
||||
|
||||
/* If we have a second argument, then move it on top
|
||||
after the first one. */
|
||||
if (stack_args_count > 0 && p_stack_data[1] != argp2)
|
||||
{
|
||||
zz = p_stack_args[1];
|
||||
zz = (zz + 3) & ~3;
|
||||
h = alloca (zz + 1);
|
||||
h = alloca (zz + 1);
|
||||
memcpy (h, p_stack_data[1], zz);
|
||||
memmove (argp2 + zz, argp2, (size_t) ((char*) p_stack_data[1] - (char*)argp2));
|
||||
memcpy (argp2, h, zz);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -252,7 +325,7 @@ ffi_call_win64(void (*)(char *, extended_cif *), extended_cif *,
|
||||
#elif defined(X86_WIN32)
|
||||
extern void
|
||||
ffi_call_win32(void (*)(char *, extended_cif *), extended_cif *,
|
||||
unsigned, unsigned, unsigned *, void (*fn)(void));
|
||||
unsigned, unsigned, unsigned, unsigned *, void (*fn)(void));
|
||||
#else
|
||||
extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *,
|
||||
unsigned, unsigned, unsigned *, void (*fn)(void));
|
||||
@@ -316,8 +389,37 @@ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
|
||||
#elif defined(X86_WIN32)
|
||||
case FFI_SYSV:
|
||||
case FFI_STDCALL:
|
||||
ffi_call_win32(ffi_prep_args, &ecif, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
ffi_call_win32(ffi_prep_args, &ecif, cif->abi, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
break;
|
||||
case FFI_THISCALL:
|
||||
case FFI_FASTCALL:
|
||||
{
|
||||
unsigned int abi = cif->abi;
|
||||
unsigned int i, passed_regs = 0;
|
||||
|
||||
if (cif->flags == FFI_TYPE_STRUCT)
|
||||
++passed_regs;
|
||||
|
||||
for (i=0; i < cif->nargs && passed_regs < 2;i++)
|
||||
{
|
||||
size_t sz;
|
||||
|
||||
if (cif->arg_types[i]->type == FFI_TYPE_FLOAT
|
||||
|| cif->arg_types[i]->type == FFI_TYPE_STRUCT)
|
||||
continue;
|
||||
sz = (cif->arg_types[i]->size + 3) & ~3;
|
||||
if (sz == 0 || sz > 4)
|
||||
continue;
|
||||
++passed_regs;
|
||||
}
|
||||
if (passed_regs < 2 && abi == FFI_FASTCALL)
|
||||
abi = FFI_THISCALL;
|
||||
if (passed_regs < 1 && abi == FFI_THISCALL)
|
||||
abi = FFI_STDCALL;
|
||||
ffi_call_win32(ffi_prep_args, &ecif, abi, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
}
|
||||
break;
|
||||
#else
|
||||
case FFI_SYSV:
|
||||
@@ -644,8 +746,37 @@ ffi_raw_call(ffi_cif *cif, void (*fn)(void), void *rvalue, ffi_raw *fake_avalue)
|
||||
#ifdef X86_WIN32
|
||||
case FFI_SYSV:
|
||||
case FFI_STDCALL:
|
||||
ffi_call_win32(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
ffi_call_win32(ffi_prep_args, &ecif, cif->abi, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
break;
|
||||
case FFI_THISCALL:
|
||||
case FFI_FASTCALL:
|
||||
{
|
||||
unsigned int abi = cif->abi;
|
||||
unsigned int i, passed_regs = 0;
|
||||
|
||||
if (cif->flags == FFI_TYPE_STRUCT)
|
||||
++passed_regs;
|
||||
|
||||
for (i=0; i < cif->nargs && passed_regs < 2;i++)
|
||||
{
|
||||
size_t sz;
|
||||
|
||||
if (cif->arg_types[i]->type == FFI_TYPE_FLOAT
|
||||
|| cif->arg_types[i]->type == FFI_TYPE_STRUCT)
|
||||
continue;
|
||||
sz = (cif->arg_types[i]->size + 3) & ~3;
|
||||
if (sz == 0 || sz > 4)
|
||||
continue;
|
||||
++passed_regs;
|
||||
}
|
||||
if (passed_regs < 2 && abi == FFI_FASTCALL)
|
||||
cif->abi = abi = FFI_THISCALL;
|
||||
if (passed_regs < 1 && abi == FFI_THISCALL)
|
||||
cif->abi = abi = FFI_STDCALL;
|
||||
ffi_call_win32(ffi_prep_args, &ecif, abi, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
}
|
||||
break;
|
||||
#else
|
||||
case FFI_SYSV:
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
29
ChangeLog
29
ChangeLog
@@ -1,8 +1,28 @@
|
||||
2012-01-28 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
|
||||
argument to prototype for specify calling-convention.
|
||||
(ffi_call): Add support for stdcall/thiscall convention.
|
||||
(ffi_prep_args): Likewise.
|
||||
(ffi_raw_call): Likewise.
|
||||
* src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
|
||||
FFI_FASTCALL.
|
||||
* src/x86/win32.S (_ffi_call_win32): Add support for
|
||||
fastcall/thiscall calling-convention calls.
|
||||
* testsuite/libffi.call/fastthis1_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis2_win32.c: New test.
|
||||
* testsuite/libffi.call/fastthis3_win32.c: New test.
|
||||
* testsuite/libffi.call/strlen2_win32.c: New test.
|
||||
* testsuite/libffi.call/many2_win32.c: New test.
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* src/alpha/ffi.c (ffi_prep_closure_loc): Check for bad ABI.
|
||||
|
||||
2012-01-23 Chris Young <cdyoung@ntlworld.com>
|
||||
2012-01-23 Anthony Green <green@moxielogic.com>
|
||||
Chris Young <cdyoung@ntlworld.com>
|
||||
|
||||
* configure.ac: Add Amiga support.
|
||||
* configure: Rebuilt.
|
||||
@@ -11,16 +31,11 @@
|
||||
|
||||
* include/ffi_common.h (LIKELY, UNLIKELY): Fix definitions.
|
||||
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
|
||||
|
||||
2012-01-23 Alan Hourihane <alanh@fairlite.co.uk>
|
||||
|
||||
* src/m68k/ffi.c (ffi_prep_closure_loc): Fix ABI check.
|
||||
* testsuite/libffi.call/return_sc.c (main): Fix test check.
|
||||
|
||||
2012-01-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/48496
|
||||
|
||||
10
Makefile.in
10
Makefile.in
@@ -76,14 +76,6 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
mdate-sh missing texinfo.tex
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
|
||||
$(top_srcdir)/m4/ax_cc_maxopt.m4 \
|
||||
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
|
||||
$(top_srcdir)/m4/ax_check_compiler_flags.m4 \
|
||||
$(top_srcdir)/m4/ax_compiler_vendor.m4 \
|
||||
$(top_srcdir)/m4/ax_configure_args.m4 \
|
||||
$(top_srcdir)/m4/ax_enable_builddir.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_archflag.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
|
||||
@@ -347,7 +339,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PRTDIAG = @PRTDIAG@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
@@ -368,7 +359,6 @@ am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
ax_enable_builddir_sed = @ax_enable_builddir_sed@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
|
||||
8
aclocal.m4
vendored
8
aclocal.m4
vendored
@@ -1858,14 +1858,6 @@ AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
m4_include([m4/asmcfi.m4])
|
||||
m4_include([m4/ax_cc_maxopt.m4])
|
||||
m4_include([m4/ax_cflags_warn_all.m4])
|
||||
m4_include([m4/ax_check_compiler_flags.m4])
|
||||
m4_include([m4/ax_compiler_vendor.m4])
|
||||
m4_include([m4/ax_configure_args.m4])
|
||||
m4_include([m4/ax_enable_builddir.m4])
|
||||
m4_include([m4/ax_gcc_archflag.m4])
|
||||
m4_include([m4/ax_gcc_x86_cpuid.m4])
|
||||
m4_include([m4/libtool.m4])
|
||||
m4_include([m4/ltoptions.m4])
|
||||
m4_include([m4/ltsugar.m4])
|
||||
|
||||
@@ -342,7 +342,7 @@ case "$target" in
|
||||
[Cannot use PROT_EXEC on this target, so, we revert to
|
||||
alternative means])
|
||||
;;
|
||||
*-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*)
|
||||
*-apple-darwin1[[10]]* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*)
|
||||
AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1,
|
||||
[Cannot use malloc on this target, so, we revert to
|
||||
alternative means])
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
This is ../libffi/doc/libffi.info, produced by makeinfo version 4.13
|
||||
from ../libffi/doc/libffi.texi.
|
||||
This is /home/green/libffi/doc/libffi.info, produced by makeinfo
|
||||
version 4.13 from /home/green/libffi/doc/libffi.texi.
|
||||
|
||||
This manual is for Libffi, a portable foreign-function interface
|
||||
library.
|
||||
|
||||
Copyright (C) 2008, 2010, 2011 Red Hat, Inc.
|
||||
Copyright (C) 2008, 2010 Red Hat, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this
|
||||
document under the terms of the GNU General Public License as
|
||||
@@ -27,7 +27,7 @@ libffi
|
||||
This manual is for Libffi, a portable foreign-function interface
|
||||
library.
|
||||
|
||||
Copyright (C) 2008, 2010, 2011 Red Hat, Inc.
|
||||
Copyright (C) 2008, 2010 Red Hat, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this
|
||||
document under the terms of the GNU General Public License as
|
||||
@@ -115,6 +115,8 @@ To prepare a call interface object, use the function `ffi_prep_cif'.
|
||||
want. *note Multiple ABIs:: for more information.
|
||||
|
||||
NARGS is the number of arguments that this function accepts.
|
||||
`libffi' does not yet handle varargs functions; see *note Missing
|
||||
Features:: for more information.
|
||||
|
||||
RTYPE is a pointer to an `ffi_type' structure that describes the
|
||||
return type of the function. *Note Types::.
|
||||
@@ -127,30 +129,6 @@ To prepare a call interface object, use the function `ffi_prep_cif'.
|
||||
properly; `FFI_BAD_TYPEDEF' if one of the `ffi_type' objects is
|
||||
incorrect; or `FFI_BAD_ABI' if the ABI parameter is invalid.
|
||||
|
||||
If the function being called is variadic (varargs) then
|
||||
`ffi_prep_cif_var' must be used instead of `ffi_prep_cif'.
|
||||
|
||||
-- Function: ffi_status ffi_prep_cif_var (ffi_cif *CIF, ffi_abi
|
||||
varabi, unsigned int NFIXEDARGS, unsigned int varntotalargs,
|
||||
ffi_type *RTYPE, ffi_type **ARGTYPES)
|
||||
This initializes CIF according to the given parameters for a call
|
||||
to a variadic function. In general it's operation is the same as
|
||||
for `ffi_prep_cif' except that:
|
||||
|
||||
NFIXEDARGS is the number of fixed arguments, prior to any variadic
|
||||
arguments. It must be greater than zero.
|
||||
|
||||
NTOTALARGS the total number of arguments, including variadic and
|
||||
fixed arguments.
|
||||
|
||||
Note that, different cif's must be prepped for calls to the same
|
||||
function when different numbers of arguments are passed.
|
||||
|
||||
Also note that a call to `ffi_prep_cif_var' with
|
||||
NFIXEDARGS=NOTOTALARGS is NOT equivalent to a call to
|
||||
`ffi_prep_cif'.
|
||||
|
||||
|
||||
To call a function using an initialized `ffi_cif', use the
|
||||
`ffi_call' function:
|
||||
|
||||
@@ -533,7 +511,9 @@ File: libffi.info, Node: Missing Features, Next: Index, Prev: Using libffi,
|
||||
`libffi' is missing a few features. We welcome patches to add support
|
||||
for these.
|
||||
|
||||
* Variadic closures.
|
||||
* 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.
|
||||
|
||||
* There is no support for bit fields in structures.
|
||||
|
||||
@@ -541,9 +521,6 @@ for these.
|
||||
|
||||
* The "raw" API is undocumented.
|
||||
|
||||
Note that variadic support is very new and tested on a relatively
|
||||
small number of platforms.
|
||||
|
||||
|
||||
File: libffi.info, Node: Index, Prev: Missing Features, Up: Top
|
||||
|
||||
@@ -561,12 +538,11 @@ Index
|
||||
* closure API: The Closure API. (line 13)
|
||||
* closures: The Closure API. (line 13)
|
||||
* FFI: Introduction. (line 31)
|
||||
* ffi_call: The Basics. (line 63)
|
||||
* ffi_call: The Basics. (line 41)
|
||||
* ffi_closure_alloc: The Closure API. (line 19)
|
||||
* ffi_closure_free: The Closure API. (line 26)
|
||||
* FFI_CLOSURES: The Closure API. (line 13)
|
||||
* ffi_prep_cif: The Basics. (line 16)
|
||||
* ffi_prep_cif_var: The Basics. (line 39)
|
||||
* ffi_prep_closure_loc: The Closure API. (line 34)
|
||||
* ffi_status <1>: The Closure API. (line 37)
|
||||
* ffi_status: The Basics. (line 18)
|
||||
@@ -594,24 +570,24 @@ Index
|
||||
* ffi_type_void: Primitive Types. (line 10)
|
||||
* Foreign Function Interface: Introduction. (line 31)
|
||||
* void <1>: The Closure API. (line 20)
|
||||
* void: The Basics. (line 65)
|
||||
* void: The Basics. (line 43)
|
||||
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top712
|
||||
Node: Introduction1460
|
||||
Node: Using libffi3096
|
||||
Node: The Basics3582
|
||||
Node: Simple Example7224
|
||||
Node: Types8251
|
||||
Node: Primitive Types8534
|
||||
Node: Structures10354
|
||||
Node: Type Example11214
|
||||
Node: Multiple ABIs12437
|
||||
Node: The Closure API12808
|
||||
Node: Closure Example15752
|
||||
Node: Missing Features17311
|
||||
Node: Index17764
|
||||
Node: Top724
|
||||
Node: Introduction1466
|
||||
Node: Using libffi3102
|
||||
Node: The Basics3588
|
||||
Node: Simple Example6374
|
||||
Node: Types7401
|
||||
Node: Primitive Types7684
|
||||
Node: Structures9504
|
||||
Node: Type Example10364
|
||||
Node: Multiple ABIs11587
|
||||
Node: The Closure API11958
|
||||
Node: Closure Example14902
|
||||
Node: Missing Features16461
|
||||
Node: Index16954
|
||||
|
||||
End Tag Table
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@set UPDATED 23 January 2012
|
||||
@set UPDATED-MONTH January 2012
|
||||
@set EDITION 3.0.11-rc2
|
||||
@set VERSION 3.0.11-rc2
|
||||
@set UPDATED 14 February 2008
|
||||
@set UPDATED-MONTH February 2008
|
||||
@set EDITION 3.0.8
|
||||
@set VERSION 3.0.8
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@set UPDATED 23 January 2012
|
||||
@set UPDATED-MONTH January 2012
|
||||
@set EDITION 3.0.11-rc2
|
||||
@set VERSION 3.0.11-rc2
|
||||
@set UPDATED 14 February 2008
|
||||
@set UPDATED-MONTH February 2008
|
||||
@set EDITION 3.0.8
|
||||
@set VERSION 3.0.8
|
||||
|
||||
@@ -179,9 +179,6 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
|
||||
#ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
|
||||
#ifdef LIBFFI_ASM
|
||||
|
||||
@@ -40,14 +40,6 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/ffi.h.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
|
||||
$(top_srcdir)/m4/ax_cc_maxopt.m4 \
|
||||
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
|
||||
$(top_srcdir)/m4/ax_check_compiler_flags.m4 \
|
||||
$(top_srcdir)/m4/ax_compiler_vendor.m4 \
|
||||
$(top_srcdir)/m4/ax_configure_args.m4 \
|
||||
$(top_srcdir)/m4/ax_enable_builddir.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_archflag.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
|
||||
@@ -150,7 +142,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PRTDIAG = @PRTDIAG@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
@@ -171,7 +162,6 @@ am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
ax_enable_builddir_sed = @ax_enable_builddir_sed@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
|
||||
@@ -38,14 +38,6 @@ subdir = man
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
|
||||
$(top_srcdir)/m4/ax_cc_maxopt.m4 \
|
||||
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
|
||||
$(top_srcdir)/m4/ax_check_compiler_flags.m4 \
|
||||
$(top_srcdir)/m4/ax_compiler_vendor.m4 \
|
||||
$(top_srcdir)/m4/ax_configure_args.m4 \
|
||||
$(top_srcdir)/m4/ax_enable_builddir.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_archflag.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
|
||||
@@ -148,7 +140,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PRTDIAG = @PRTDIAG@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
@@ -169,7 +160,6 @@ am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
ax_enable_builddir_sed = @ax_enable_builddir_sed@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -69,6 +69,19 @@
|
||||
@@ -93,6 +93,19 @@
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
@@ -22,7 +22,7 @@ Index: libffi/ChangeLog
|
||||
2011-02-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||
|
||||
PR libffi/46661
|
||||
@@ -79,7 +92,7 @@
|
||||
@@ -103,7 +116,7 @@
|
||||
2011-02-08 Rafael Avila de Espindola <respindola@mozilla.com>
|
||||
|
||||
* configure.ac: Fix x86 test for pc related relocs.
|
||||
|
||||
@@ -2,17 +2,17 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -1,5 +1,8 @@
|
||||
-2012-01-23 Anthony Green <green@moxielogic.com>
|
||||
- Chris Young <cdyoung@ntlworld.com>
|
||||
@@ -17,6 +17,10 @@
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
+2012-01-23 Uros Bizjak <ubizjak@gmail.com>
|
||||
+
|
||||
+ * src/alpha/ffi.c (ffi_prep_closure_loc): Check for bad ABI.
|
||||
+
|
||||
+2012-01-23 Chris Young <cdyoung@ntlworld.com>
|
||||
2012-01-23 Anthony Green <green@moxielogic.com>
|
||||
Chris Young <cdyoung@ntlworld.com>
|
||||
|
||||
* configure.ac: Add Amiga support.
|
||||
* configure: Rebuilt.
|
||||
Index: libffi/src/alpha/ffi.c
|
||||
===================================================================
|
||||
--- libffi.orig/src/alpha/ffi.c
|
||||
|
||||
@@ -2,7 +2,9 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -1,5 +1,10 @@
|
||||
@@ -18,7 +18,12 @@
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
2012-01-23 Anthony Green <green@moxielogic.com>
|
||||
- Dmitry Nadezhin <dmitry.nadezhin@gmail.com>
|
||||
+ Chris Young <cdyoung@ntlworld.com>
|
||||
@@ -18,7 +20,7 @@ Index: libffi/configure
|
||||
===================================================================
|
||||
--- libffi.orig/configure
|
||||
+++ libffi/configure
|
||||
@@ -13128,6 +13128,9 @@ case "$host" in
|
||||
@@ -12138,6 +12138,9 @@ case "$host" in
|
||||
powerpc*-*-linux* | powerpc-*-sysv*)
|
||||
TARGET=POWERPC; TARGETDIR=powerpc
|
||||
;;
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -69,6 +69,23 @@
|
||||
@@ -93,6 +93,23 @@
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -65,6 +65,11 @@
|
||||
@@ -89,6 +89,11 @@
|
||||
Use them to handle ELF vs. ECOFF differences.
|
||||
[__osf__] (_GLOBAL__F_ffi_call_osf): Define.
|
||||
|
||||
|
||||
1657
patches/darwin11
1657
patches/darwin11
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -201,6 +201,13 @@
|
||||
@@ -225,6 +225,13 @@
|
||||
* testsuite/libffi.call/cls_longdouble.c: Likewise.
|
||||
* testsuite/libffi.call/huge_struct.c: Likewise.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -201,6 +201,12 @@
|
||||
@@ -225,6 +225,12 @@
|
||||
* testsuite/libffi.call/cls_longdouble.c: Likewise.
|
||||
* testsuite/libffi.call/huge_struct.c: Likewise.
|
||||
|
||||
@@ -299,10 +299,20 @@ Index: libffi/src/x86/ffitarget.h
|
||||
===================================================================
|
||||
--- libffi.orig/src/x86/ffitarget.h
|
||||
+++ libffi/src/x86/ffitarget.h
|
||||
@@ -64,28 +64,29 @@ typedef enum ffi_abi {
|
||||
#ifdef X86_WIN32
|
||||
FFI_SYSV,
|
||||
@@ -1,6 +1,7 @@
|
||||
/* -----------------------------------------------------------------*-C-*-
|
||||
- ffitarget.h - Copyright (c) 1996-2003, 2010 Red Hat, Inc.
|
||||
- Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
+ ffitarget.h - Copyright (c) 2012 Anthony Green
|
||||
+ Copyright (c) 1996-2003, 2010 Red Hat, Inc.
|
||||
+ Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
|
||||
Target configuration macros for x86 and x86-64.
|
||||
|
||||
@@ -66,28 +67,29 @@ typedef enum ffi_abi {
|
||||
FFI_STDCALL,
|
||||
FFI_THISCALL,
|
||||
FFI_FASTCALL,
|
||||
+ FFI_LAST_ABI,
|
||||
/* TODO: Add fastcall support for the sake of completeness */
|
||||
- FFI_DEFAULT_ABI = FFI_SYSV,
|
||||
|
||||
@@ -15,7 +15,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -78,6 +78,10 @@
|
||||
@@ -102,6 +102,10 @@
|
||||
instructions.
|
||||
* src/powerpc/aix_closure.S: Declare .ffi_closure_helper_DARWIN.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -65,6 +65,11 @@
|
||||
@@ -89,6 +89,11 @@
|
||||
Use them to handle ELF vs. ECOFF differences.
|
||||
[__osf__] (_GLOBAL__F_ffi_call_osf): Define.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -71,7 +71,12 @@
|
||||
@@ -95,7 +95,12 @@
|
||||
|
||||
2011-02-09 Anthony Green <green@moxielogic.com>
|
||||
|
||||
@@ -16,7 +16,7 @@ Index: libffi/ChangeLog
|
||||
|
||||
2011-02-09 Landon Fuller <landonf@macports.org>
|
||||
|
||||
@@ -91,6 +96,7 @@
|
||||
@@ -115,6 +120,7 @@
|
||||
* src/closures.c: Handle FFI_EXEC_TRAMPOLINE_TABLE case.
|
||||
* build-ios.sh: New file.
|
||||
* fficonfig.h.in, configure, Makefile.in: Rebuilt.
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -65,6 +65,11 @@
|
||||
@@ -89,6 +89,11 @@
|
||||
Use them to handle ELF vs. ECOFF differences.
|
||||
[__osf__] (_GLOBAL__F_ffi_call_osf): Define.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -69,6 +69,11 @@
|
||||
@@ -93,6 +93,11 @@
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/configure
|
||||
===================================================================
|
||||
--- libffi.orig/configure
|
||||
+++ libffi/configure
|
||||
@@ -12080,7 +12080,7 @@ case "$host" in
|
||||
@@ -12077,7 +12077,7 @@ case "$host" in
|
||||
i?86-*-freebsd* | i?86-*-openbsd*)
|
||||
TARGET=X86_FREEBSD; TARGETDIR=x86
|
||||
;;
|
||||
@@ -64,7 +64,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -71,6 +71,17 @@
|
||||
@@ -95,6 +95,17 @@
|
||||
|
||||
2011-02-09 Anthony Green <green@moxielogic.com>
|
||||
|
||||
|
||||
14
patches/ios
14
patches/ios
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -69,6 +69,29 @@
|
||||
@@ -93,6 +93,29 @@
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
@@ -208,7 +208,7 @@ Index: libffi/Makefile.in
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@
|
||||
@@ -409,31 +413,27 @@ EXTRA_DIST = LICENSE ChangeLog.v1 Change
|
||||
@@ -408,31 +412,27 @@ EXTRA_DIST = LICENSE ChangeLog.v1 Change
|
||||
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 \
|
||||
@@ -259,7 +259,7 @@ Index: libffi/Makefile.in
|
||||
|
||||
info_TEXINFOS = doc/libffi.texi
|
||||
|
||||
@@ -492,10 +492,11 @@ nodist_libffi_la_SOURCES = $(am__append_
|
||||
@@ -491,10 +491,11 @@ nodist_libffi_la_SOURCES = $(am__append_
|
||||
$(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) \
|
||||
@@ -273,7 +273,7 @@ Index: libffi/Makefile.in
|
||||
libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
|
||||
AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
|
||||
AM_CCASFLAGS = $(AM_CPPFLAGS)
|
||||
@@ -731,6 +732,8 @@ src/arm/sysv.lo: src/arm/$(am__dirstamp)
|
||||
@@ -730,6 +731,8 @@ 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)
|
||||
@@ -282,7 +282,7 @@ Index: libffi/Makefile.in
|
||||
src/avr32/$(am__dirstamp):
|
||||
@$(MKDIR_P) src/avr32
|
||||
@: > src/avr32/$(am__dirstamp)
|
||||
@@ -828,6 +831,8 @@ mostlyclean-compile:
|
||||
@@ -827,6 +830,8 @@ mostlyclean-compile:
|
||||
-rm -f src/arm/ffi.lo
|
||||
-rm -f src/arm/sysv.$(OBJEXT)
|
||||
-rm -f src/arm/sysv.lo
|
||||
@@ -291,7 +291,7 @@ Index: libffi/Makefile.in
|
||||
-rm -f src/avr32/ffi.$(OBJEXT)
|
||||
-rm -f src/avr32/ffi.lo
|
||||
-rm -f src/avr32/sysv.$(OBJEXT)
|
||||
@@ -950,6 +955,7 @@ distclean-compile:
|
||||
@@ -949,6 +954,7 @@ 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@
|
||||
@@ -299,7 +299,7 @@ Index: libffi/Makefile.in
|
||||
@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@
|
||||
@@ -1817,6 +1823,7 @@ uninstall-am: uninstall-dvi-am uninstall
|
||||
@@ -1816,6 +1822,7 @@ uninstall-am: uninstall-dvi-am uninstall
|
||||
uninstall-info-am uninstall-libLTLIBRARIES uninstall-pdf-am \
|
||||
uninstall-pkgconfigDATA uninstall-ps-am
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -106,7 +106,7 @@
|
||||
@@ -130,7 +130,7 @@
|
||||
* src/prep_cif.c (UNLIKELY, LIKELY): Define.
|
||||
(initialize_aggregate): Check for bad types.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -69,6 +69,14 @@
|
||||
@@ -93,6 +93,14 @@
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -17,6 +17,11 @@
|
||||
@@ -41,6 +41,11 @@
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
|
||||
@@ -12,81 +12,6 @@ Index: libffi/src/m68k/ffi.c
|
||||
|
||||
*(unsigned short *)closure->tramp = 0x207c;
|
||||
*(void **)(closure->tramp + 2) = codeloc;
|
||||
Index: libffi/src/m68k/sysv.S
|
||||
===================================================================
|
||||
--- libffi.orig/src/m68k/sysv.S
|
||||
+++ libffi/src/m68k/sysv.S
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
|
||||
- sysv.S - Copyright (c) 1998 Andreas Schwab
|
||||
+ sysv.S - Copyright (c) 1998, 2012 Andreas Schwab
|
||||
Copyright (c) 2008 Red Hat, Inc.
|
||||
|
||||
m68k Foreign Function Interface
|
||||
@@ -87,7 +87,7 @@ ffi_call_SYSV:
|
||||
|
||||
| If the return value pointer is NULL, assume no return value.
|
||||
| NOTE: On the mc68000, tst on an address register is not supported.
|
||||
-#if defined(__mc68000__) && !defined(__mcoldfire__)
|
||||
+#if !defined(__mc68020__) && !defined(__mc68030__) && !defined(__mc68040__) && !defined(__mc68060__) && !defined(__mcoldfire__)
|
||||
cmp.w #0, %a1
|
||||
#else
|
||||
tst.l %a1
|
||||
@@ -109,7 +109,7 @@ retlongint:
|
||||
retfloat:
|
||||
btst #2,%d2
|
||||
jbeq retdouble
|
||||
-#if defined(__MC68881__)
|
||||
+#if defined(__MC68881__) || defined(__HAVE_68881__)
|
||||
fmove.s %fp0,(%a1)
|
||||
#else
|
||||
move.l %d0,(%a1)
|
||||
@@ -119,7 +119,7 @@ retfloat:
|
||||
retdouble:
|
||||
btst #3,%d2
|
||||
jbeq retlongdouble
|
||||
-#if defined(__MC68881__)
|
||||
+#if defined(__MC68881__) || defined(__HAVE_68881__)
|
||||
fmove.d %fp0,(%a1)
|
||||
#else
|
||||
move.l %d0,(%a1)+
|
||||
@@ -130,7 +130,7 @@ retdouble:
|
||||
retlongdouble:
|
||||
btst #4,%d2
|
||||
jbeq retpointer
|
||||
-#if defined(__MC68881__)
|
||||
+#if defined(__MC68881__) || defined(__HAVE_68881__)
|
||||
fmove.x %fp0,(%a1)
|
||||
#else
|
||||
move.l %d0,(%a1)+
|
||||
@@ -199,7 +199,7 @@ ffi_closure_SYSV:
|
||||
move.l (%a0),%d1
|
||||
jra .Lcls_epilogue
|
||||
.Lcls_ret_float:
|
||||
-#if defined(__MC68881__)
|
||||
+#if defined(__MC68881__) || defined(__HAVE_68881__)
|
||||
fmove.s (%a0),%fp0
|
||||
#else
|
||||
move.l (%a0),%d0
|
||||
@@ -209,7 +209,7 @@ ffi_closure_SYSV:
|
||||
lsr.l #2,%d0
|
||||
jne 1f
|
||||
jcs .Lcls_ret_ldouble
|
||||
-#if defined(__MC68881__)
|
||||
+#if defined(__MC68881__) || defined(__HAVE_68881__)
|
||||
fmove.d (%a0),%fp0
|
||||
#else
|
||||
move.l (%a0)+,%d0
|
||||
@@ -217,7 +217,7 @@ ffi_closure_SYSV:
|
||||
#endif
|
||||
jra .Lcls_epilogue
|
||||
.Lcls_ret_ldouble:
|
||||
-#if defined(__MC68881__)
|
||||
+#if defined(__MC68881__) || defined(__HAVE_68881__)
|
||||
fmove.x (%a0),%fp0
|
||||
#else
|
||||
move.l (%a0)+,%d0
|
||||
Index: libffi/testsuite/libffi.call/return_sc.c
|
||||
===================================================================
|
||||
--- libffi.orig/testsuite/libffi.call/return_sc.c
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -209,6 +209,10 @@
|
||||
@@ -233,6 +233,10 @@
|
||||
* src/prep_cif.c: Push stack space computation into src/x86/ffi.c
|
||||
for X86_ANY so return value space doesn't get added twice.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -808,6 +808,11 @@
|
||||
@@ -832,6 +832,11 @@
|
||||
* man/Makefile.in: Regenerate.
|
||||
* testsuite/Makefile.in: Regenerate.
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Index: libffi/Makefile.in
|
||||
===================================================================
|
||||
--- libffi.orig/Makefile.in
|
||||
+++ libffi/Makefile.in
|
||||
@@ -431,7 +431,9 @@ EXTRA_DIST = LICENSE ChangeLog.v1 Change
|
||||
@@ -430,7 +430,9 @@ EXTRA_DIST = LICENSE ChangeLog.v1 Change
|
||||
src/frv/eabi.S src/frv/ffitarget.h src/dlmalloc.c \
|
||||
src/moxie/ffi.c src/moxie/eabi.S libtool-version \
|
||||
ChangeLog.libffi m4/libtool.m4 m4/lt~obsolete.m4 \
|
||||
@@ -30,7 +30,7 @@ Index: libffi/Makefile.in
|
||||
|
||||
info_TEXINFOS = doc/libffi.texi
|
||||
|
||||
@@ -1821,7 +1823,6 @@ uninstall-am: uninstall-dvi-am uninstall
|
||||
@@ -1820,7 +1822,6 @@ uninstall-am: uninstall-dvi-am uninstall
|
||||
uninstall-info-am uninstall-libLTLIBRARIES uninstall-pdf-am \
|
||||
uninstall-pkgconfigDATA uninstall-ps-am
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -267,6 +267,11 @@
|
||||
@@ -291,6 +291,11 @@
|
||||
* man/Makefile.in: Regenerate.
|
||||
* testsuite/Makefile.in: Regenerate.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -17,6 +17,12 @@
|
||||
@@ -41,6 +41,12 @@
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -17,6 +17,12 @@
|
||||
@@ -41,6 +41,12 @@
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -69,6 +69,10 @@
|
||||
@@ -93,6 +93,10 @@
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
@@ -17,7 +17,7 @@ Index: libffi/configure
|
||||
===================================================================
|
||||
--- libffi.orig/configure
|
||||
+++ libffi/configure
|
||||
@@ -12133,7 +12133,7 @@ case "$host" in
|
||||
@@ -12130,7 +12130,7 @@ case "$host" in
|
||||
powerpc-*-beos*)
|
||||
TARGET=POWERPC; TARGETDIR=powerpc
|
||||
;;
|
||||
@@ -26,7 +26,7 @@ Index: libffi/configure
|
||||
TARGET=POWERPC_DARWIN; TARGETDIR=powerpc
|
||||
;;
|
||||
powerpc-*-aix* | rs6000-*-aix*)
|
||||
@@ -12142,7 +12142,7 @@ case "$host" in
|
||||
@@ -12139,7 +12139,7 @@ case "$host" in
|
||||
powerpc-*-freebsd*)
|
||||
TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
|
||||
;;
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -41,6 +41,26 @@
|
||||
@@ -65,6 +65,26 @@
|
||||
X 10.7.
|
||||
* configure: Rebuilt.
|
||||
|
||||
@@ -132,7 +132,7 @@ Index: libffi/Makefile.in
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/doc/stamp-vti \
|
||||
@@ -121,48 +122,49 @@ am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
@@ -113,48 +114,49 @@ am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
|
||||
libffi_la_LIBADD =
|
||||
am__dirstamp = $(am__leading_dot)dirstamp
|
||||
@@ -211,7 +211,7 @@ Index: libffi/Makefile.in
|
||||
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) \
|
||||
@@ -172,17 +174,17 @@ nodist_libffi_la_OBJECTS = $(am__objects
|
||||
@@ -164,17 +166,17 @@ nodist_libffi_la_OBJECTS = $(am__objects
|
||||
$(am__objects_18) $(am__objects_19) $(am__objects_20) \
|
||||
$(am__objects_21) $(am__objects_22) $(am__objects_23) \
|
||||
$(am__objects_24) $(am__objects_25) $(am__objects_26) \
|
||||
@@ -234,7 +234,7 @@ Index: libffi/Makefile.in
|
||||
$(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) \
|
||||
@@ -190,8 +192,9 @@ am__objects_29 = $(am__objects_1) $(am__
|
||||
@@ -182,8 +184,9 @@ am__objects_29 = $(am__objects_1) $(am__
|
||||
$(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) \
|
||||
@@ -246,7 +246,7 @@ Index: libffi/Makefile.in
|
||||
libffi_convenience_la_OBJECTS = $(am_libffi_convenience_la_OBJECTS) \
|
||||
$(nodist_libffi_convenience_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||
@@ -489,7 +492,7 @@ MAKEOVERRIDES =
|
||||
@@ -478,7 +481,7 @@ MAKEOVERRIDES =
|
||||
ACLOCAL_AMFLAGS = $(ACLOCAL_AMFLAGS) -I m4
|
||||
lib_LTLIBRARIES = libffi.la
|
||||
noinst_LTLIBRARIES = libffi_convenience.la
|
||||
@@ -255,7 +255,7 @@ Index: libffi/Makefile.in
|
||||
src/raw_api.c src/java_raw_api.c src/closures.c
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
@@ -503,13 +506,13 @@ nodist_libffi_la_SOURCES = $(am__append_
|
||||
@@ -492,13 +495,13 @@ nodist_libffi_la_SOURCES = $(am__append_
|
||||
$(am__append_18) $(am__append_19) $(am__append_20) \
|
||||
$(am__append_21) $(am__append_22) $(am__append_23) \
|
||||
$(am__append_24) $(am__append_25) $(am__append_26) \
|
||||
@@ -272,7 +272,7 @@ Index: libffi/Makefile.in
|
||||
all: fficonfig.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
@@ -614,12 +617,12 @@ src/$(am__dirstamp):
|
||||
@@ -603,12 +606,12 @@ src/$(am__dirstamp):
|
||||
src/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) src/$(DEPDIR)
|
||||
@: > src/$(DEPDIR)/$(am__dirstamp)
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -69,6 +69,11 @@
|
||||
@@ -93,6 +93,11 @@
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -50,6 +50,12 @@
|
||||
@@ -93,6 +93,12 @@
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -201,6 +201,14 @@
|
||||
@@ -225,6 +225,14 @@
|
||||
* testsuite/libffi.call/cls_longdouble.c: Likewise.
|
||||
* testsuite/libffi.call/huge_struct.c: Likewise.
|
||||
|
||||
@@ -43,7 +43,7 @@ Index: libffi/src/x86/ffi.c
|
||||
===================================================================
|
||||
--- libffi.orig/src/x86/ffi.c
|
||||
+++ libffi/src/x86/ffi.c
|
||||
@@ -155,12 +155,10 @@ ffi_status ffi_prep_cif_machdep(ffi_cif
|
||||
@@ -228,12 +228,10 @@ ffi_status ffi_prep_cif_machdep(ffi_cif
|
||||
switch (cif->rtype->type)
|
||||
{
|
||||
case FFI_TYPE_VOID:
|
||||
@@ -60,7 +60,7 @@ Index: libffi/src/x86/ffitarget.h
|
||||
===================================================================
|
||||
--- libffi.orig/src/x86/ffitarget.h
|
||||
+++ libffi/src/x86/ffitarget.h
|
||||
@@ -31,6 +31,9 @@
|
||||
@@ -32,6 +32,9 @@
|
||||
|
||||
/* ---- System specific configurations ----------------------------------- */
|
||||
|
||||
@@ -70,7 +70,7 @@ Index: libffi/src/x86/ffitarget.h
|
||||
#if defined (X86_64) && defined (__i386__)
|
||||
#undef X86_64
|
||||
#define X86
|
||||
@@ -67,16 +70,14 @@ typedef enum ffi_abi {
|
||||
@@ -70,16 +73,14 @@ typedef enum ffi_abi {
|
||||
FFI_LAST_ABI,
|
||||
/* TODO: Add fastcall support for the sake of completeness */
|
||||
FFI_DEFAULT_ABI = FFI_SYSV
|
||||
@@ -89,7 +89,7 @@ Index: libffi/src/x86/ffitarget.h
|
||||
FFI_SYSV,
|
||||
FFI_UNIX64, /* Unix variants all use the same ABI for x86-64 */
|
||||
FFI_LAST_ABI,
|
||||
@@ -86,7 +87,6 @@ typedef enum ffi_abi {
|
||||
@@ -89,7 +90,6 @@ typedef enum ffi_abi {
|
||||
FFI_DEFAULT_ABI = FFI_UNIX64
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -31,7 +31,7 @@ Index: libffi/Makefile.in
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/doc/stamp-vti \
|
||||
@@ -496,7 +494,7 @@ nodist_libffi_la_SOURCES = $(am__append_
|
||||
@@ -495,7 +493,7 @@ nodist_libffi_la_SOURCES = $(am__append_
|
||||
$(am__append_27)
|
||||
libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
|
||||
nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
|
||||
|
||||
@@ -2,13 +2,16 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -1,3 +1,8 @@
|
||||
@@ -17,6 +17,11 @@
|
||||
* testsuite/libffi.call/struct1_win32.c: New test.
|
||||
* testsuite/libffi.call/struct2_win32.c: New test.
|
||||
|
||||
+2012-01-23 Anthony Green <green@moxielogic.com>
|
||||
+ Dmitry Nadezhin <dmitry.nadezhin@gmail.com>
|
||||
+
|
||||
+ * include/ffi_common.h (LIKELY, UNLIKELY): Fix definitions.
|
||||
+
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
|
||||
Index: libffi/include/ffi_common.h
|
||||
|
||||
@@ -572,7 +572,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -17,6 +17,17 @@
|
||||
@@ -41,6 +41,17 @@
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ Index: libffi/src/x86/ffi.c
|
||||
===================================================================
|
||||
--- libffi.orig/src/x86/ffi.c
|
||||
+++ libffi/src/x86/ffi.c
|
||||
@@ -291,27 +291,8 @@ void ffi_call(ffi_cif *cif, void (*fn)(v
|
||||
@@ -364,27 +364,8 @@ void ffi_call(ffi_cif *cif, void (*fn)(v
|
||||
{
|
||||
#ifdef X86_WIN64
|
||||
case FFI_WIN64:
|
||||
@@ -51,7 +51,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -238,6 +238,14 @@
|
||||
@@ -262,6 +262,14 @@
|
||||
* fficonfig.h.in: Regenerate.
|
||||
* src/x86/sysv.S (.eh_frame): Use .ascii, .string or error.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -134,6 +134,13 @@
|
||||
@@ -158,6 +158,13 @@
|
||||
(.eh_frame): Use FDE_ENCODING.
|
||||
(.LASFDE1, .LASFDE2, LASFDE3): Simplify with FDE_ENCODE.
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -17,6 +17,11 @@
|
||||
@@ -41,6 +41,11 @@
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -76,6 +76,11 @@
|
||||
@@ -100,6 +100,11 @@
|
||||
uintptr_t first.
|
||||
* testsuite/libffi.call/cls_pointer_stack.c (main): Likewise.
|
||||
|
||||
|
||||
143
src/x86/ffi.c
143
src/x86/ffi.c
@@ -48,6 +48,13 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
register void **p_argv;
|
||||
register char *argp;
|
||||
register ffi_type **p_arg;
|
||||
#ifdef X86_WIN32
|
||||
size_t p_stack_args[2];
|
||||
void *p_stack_data[2];
|
||||
char *argp2 = stack;
|
||||
int stack_args_count = 0;
|
||||
int cabi = ecif->cif->abi;
|
||||
#endif
|
||||
|
||||
argp = stack;
|
||||
|
||||
@@ -59,6 +66,16 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
)
|
||||
{
|
||||
*(void **) argp = ecif->rvalue;
|
||||
#ifdef X86_WIN32
|
||||
/* For fastcall/thiscall this is first register-passed
|
||||
argument. */
|
||||
if (cabi == FFI_THISCALL || cabi == FFI_FASTCALL)
|
||||
{
|
||||
p_stack_args[stack_args_count] = sizeof (void*);
|
||||
p_stack_data[stack_args_count] = argp;
|
||||
++stack_args_count;
|
||||
}
|
||||
#endif
|
||||
argp += sizeof(void*);
|
||||
}
|
||||
|
||||
@@ -134,6 +151,24 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
{
|
||||
memcpy(argp, *p_argv, z);
|
||||
}
|
||||
|
||||
#ifdef X86_WIN32
|
||||
/* For thiscall/fastcall convention register-passed arguments
|
||||
are the first two none-floating-point arguments with a size
|
||||
smaller or equal to sizeof (void*). */
|
||||
if ((cabi == FFI_THISCALL && stack_args_count < 1)
|
||||
|| (cabi == FFI_FASTCALL && stack_args_count < 2))
|
||||
{
|
||||
if (z <= 4
|
||||
&& ((*p_arg)->type != FFI_TYPE_FLOAT
|
||||
&& (*p_arg)->type != FFI_TYPE_STRUCT))
|
||||
{
|
||||
p_stack_args[stack_args_count] = z;
|
||||
p_stack_data[stack_args_count] = argp;
|
||||
++stack_args_count;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
p_argv++;
|
||||
#ifdef X86_WIN64
|
||||
argp += (z + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
|
||||
@@ -141,7 +176,45 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
argp += z;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef X86_WIN32
|
||||
/* We need to move the register-passed arguments for thiscall/fastcall
|
||||
on top of stack, so that those can be moved to registers ecx/edx by
|
||||
call-handler. */
|
||||
if (stack_args_count > 0)
|
||||
{
|
||||
size_t zz = (p_stack_args[0] + 3) & ~3;
|
||||
char *h;
|
||||
|
||||
/* Move first argument to top-stack position. */
|
||||
if (p_stack_data[0] != argp2)
|
||||
{
|
||||
h = alloca (zz + 1);
|
||||
memcpy (h, p_stack_data[0], zz);
|
||||
memmove (argp2 + zz, argp2,
|
||||
(size_t) ((char *) p_stack_data[0] - (char*)argp2));
|
||||
memcpy (argp2, h, zz);
|
||||
}
|
||||
|
||||
argp2 += zz;
|
||||
--stack_args_count;
|
||||
if (zz > 4)
|
||||
stack_args_count = 0;
|
||||
|
||||
/* If we have a second argument, then move it on top
|
||||
after the first one. */
|
||||
if (stack_args_count > 0 && p_stack_data[1] != argp2)
|
||||
{
|
||||
zz = p_stack_args[1];
|
||||
zz = (zz + 3) & ~3;
|
||||
h = alloca (zz + 1);
|
||||
h = alloca (zz + 1);
|
||||
memcpy (h, p_stack_data[1], zz);
|
||||
memmove (argp2 + zz, argp2, (size_t) ((char*) p_stack_data[1] - (char*)argp2));
|
||||
memcpy (argp2, h, zz);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -250,7 +323,7 @@ ffi_call_win64(void (*)(char *, extended_cif *), extended_cif *,
|
||||
#elif defined(X86_WIN32)
|
||||
extern void
|
||||
ffi_call_win32(void (*)(char *, extended_cif *), extended_cif *,
|
||||
unsigned, unsigned, unsigned *, void (*fn)(void));
|
||||
unsigned, unsigned, unsigned, unsigned *, void (*fn)(void));
|
||||
#else
|
||||
extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *,
|
||||
unsigned, unsigned, unsigned *, void (*fn)(void));
|
||||
@@ -295,8 +368,37 @@ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
|
||||
#elif defined(X86_WIN32)
|
||||
case FFI_SYSV:
|
||||
case FFI_STDCALL:
|
||||
ffi_call_win32(ffi_prep_args, &ecif, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
ffi_call_win32(ffi_prep_args, &ecif, cif->abi, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
break;
|
||||
case FFI_THISCALL:
|
||||
case FFI_FASTCALL:
|
||||
{
|
||||
unsigned int abi = cif->abi;
|
||||
unsigned int i, passed_regs = 0;
|
||||
|
||||
if (cif->flags == FFI_TYPE_STRUCT)
|
||||
++passed_regs;
|
||||
|
||||
for (i=0; i < cif->nargs && passed_regs < 2;i++)
|
||||
{
|
||||
size_t sz;
|
||||
|
||||
if (cif->arg_types[i]->type == FFI_TYPE_FLOAT
|
||||
|| cif->arg_types[i]->type == FFI_TYPE_STRUCT)
|
||||
continue;
|
||||
sz = (cif->arg_types[i]->size + 3) & ~3;
|
||||
if (sz == 0 || sz > 4)
|
||||
continue;
|
||||
++passed_regs;
|
||||
}
|
||||
if (passed_regs < 2 && abi == FFI_FASTCALL)
|
||||
abi = FFI_THISCALL;
|
||||
if (passed_regs < 1 && abi == FFI_THISCALL)
|
||||
abi = FFI_STDCALL;
|
||||
ffi_call_win32(ffi_prep_args, &ecif, abi, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
}
|
||||
break;
|
||||
#else
|
||||
case FFI_SYSV:
|
||||
@@ -623,8 +725,37 @@ ffi_raw_call(ffi_cif *cif, void (*fn)(void), void *rvalue, ffi_raw *fake_avalue)
|
||||
#ifdef X86_WIN32
|
||||
case FFI_SYSV:
|
||||
case FFI_STDCALL:
|
||||
ffi_call_win32(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
ffi_call_win32(ffi_prep_args, &ecif, cif->abi, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
break;
|
||||
case FFI_THISCALL:
|
||||
case FFI_FASTCALL:
|
||||
{
|
||||
unsigned int abi = cif->abi;
|
||||
unsigned int i, passed_regs = 0;
|
||||
|
||||
if (cif->flags == FFI_TYPE_STRUCT)
|
||||
++passed_regs;
|
||||
|
||||
for (i=0; i < cif->nargs && passed_regs < 2;i++)
|
||||
{
|
||||
size_t sz;
|
||||
|
||||
if (cif->arg_types[i]->type == FFI_TYPE_FLOAT
|
||||
|| cif->arg_types[i]->type == FFI_TYPE_STRUCT)
|
||||
continue;
|
||||
sz = (cif->arg_types[i]->size + 3) & ~3;
|
||||
if (sz == 0 || sz > 4)
|
||||
continue;
|
||||
++passed_regs;
|
||||
}
|
||||
if (passed_regs < 2 && abi == FFI_FASTCALL)
|
||||
cif->abi = abi = FFI_THISCALL;
|
||||
if (passed_regs < 1 && abi == FFI_THISCALL)
|
||||
cif->abi = abi = FFI_STDCALL;
|
||||
ffi_call_win32(ffi_prep_args, &ecif, abi, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
}
|
||||
break;
|
||||
#else
|
||||
case FFI_SYSV:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* -----------------------------------------------------------------*-C-*-
|
||||
ffitarget.h - Copyright (c) 1996-2003, 2010 Red Hat, Inc.
|
||||
Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
ffitarget.h - Copyright (c) 2012 Anthony Green
|
||||
Copyright (c) 1996-2003, 2010 Red Hat, Inc.
|
||||
Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
|
||||
Target configuration macros for x86 and x86-64.
|
||||
|
||||
@@ -67,6 +68,8 @@ typedef enum ffi_abi {
|
||||
#ifdef X86_WIN32
|
||||
FFI_SYSV,
|
||||
FFI_STDCALL,
|
||||
FFI_THISCALL,
|
||||
FFI_FASTCALL,
|
||||
FFI_LAST_ABI,
|
||||
/* TODO: Add fastcall support for the sake of completeness */
|
||||
FFI_DEFAULT_ABI = FFI_SYSV
|
||||
|
||||
@@ -45,6 +45,7 @@ _TEXT SEGMENT
|
||||
ffi_call_win32 PROC NEAR,
|
||||
ffi_prep_args : NEAR PTR DWORD,
|
||||
ecif : NEAR PTR DWORD,
|
||||
cif_abi : DWORD,
|
||||
cif_bytes : DWORD,
|
||||
cif_flags : DWORD,
|
||||
rvalue : NEAR PTR DWORD,
|
||||
@@ -64,6 +65,19 @@ ffi_call_win32 PROC NEAR,
|
||||
;; Return stack to previous state and call the function
|
||||
add esp, 8
|
||||
|
||||
;; Handle thiscall and fastcall
|
||||
cmp cif_abi, 3 ;; FFI_THISCALL
|
||||
jz do_thiscall
|
||||
cmp cif_abi, 4 ;; FFI_FASTCALL
|
||||
jnz do_stdcall
|
||||
mov ecx, DWORD PTR [esp]
|
||||
mov edx, DWORD PTR [esp+4]
|
||||
add esp, 8
|
||||
jmp do_stdcall
|
||||
do_thiscall:
|
||||
mov ecx, DWORD PTR [esp]
|
||||
add esp, 4
|
||||
do_stdcall:
|
||||
call fn
|
||||
|
||||
;; cdecl: we restore esp in the epilogue, so there's no need to
|
||||
@@ -405,7 +419,7 @@ _ffi_call_win32:
|
||||
movl %esp,%ebp
|
||||
.LCFI1:
|
||||
# Make room for all of the new args.
|
||||
movl 16(%ebp),%ecx
|
||||
movl 20(%ebp),%ecx
|
||||
subl %ecx,%esp
|
||||
|
||||
movl %esp,%eax
|
||||
@@ -417,19 +431,34 @@ _ffi_call_win32:
|
||||
|
||||
# Return stack to previous state and call the function
|
||||
addl $8,%esp
|
||||
|
||||
|
||||
# Handle fastcall and thiscall
|
||||
cmpl $3, 16(%ebp) # FFI_THISCALL
|
||||
jz .do_thiscall
|
||||
cmpl $4, 16(%ebp) # FFI_FASTCALL
|
||||
jnz .do_fncall
|
||||
movl (%esp), %ecx
|
||||
movl 4(%esp), %edx
|
||||
addl $8, %esp
|
||||
jmp .do_fncall
|
||||
.do_thiscall:
|
||||
movl (%esp), %ecx
|
||||
addl $4, %esp
|
||||
|
||||
.do_fncall:
|
||||
|
||||
# FIXME: Align the stack to a 128-bit boundary to avoid
|
||||
# potential performance hits.
|
||||
|
||||
call *28(%ebp)
|
||||
call *32(%ebp)
|
||||
|
||||
# stdcall functions pop arguments off the stack themselves
|
||||
|
||||
# Load %ecx with the return type code
|
||||
movl 20(%ebp),%ecx
|
||||
movl 24(%ebp),%ecx
|
||||
|
||||
# If the return value pointer is NULL, assume no return value.
|
||||
cmpl $0,24(%ebp)
|
||||
cmpl $0,28(%ebp)
|
||||
jne 0f
|
||||
|
||||
# Even if there is no space for the return value, we are
|
||||
@@ -488,50 +517,50 @@ _ffi_call_win32:
|
||||
|
||||
.Lretint:
|
||||
# Load %ecx with the pointer to storage for the return value
|
||||
movl 24(%ebp),%ecx
|
||||
movl 28(%ebp),%ecx
|
||||
movl %eax,0(%ecx)
|
||||
jmp .Lepilogue
|
||||
|
||||
.Lretfloat:
|
||||
# Load %ecx with the pointer to storage for the return value
|
||||
movl 24(%ebp),%ecx
|
||||
movl 28(%ebp),%ecx
|
||||
fstps (%ecx)
|
||||
jmp .Lepilogue
|
||||
|
||||
.Lretdouble:
|
||||
# Load %ecx with the pointer to storage for the return value
|
||||
movl 24(%ebp),%ecx
|
||||
movl 28(%ebp),%ecx
|
||||
fstpl (%ecx)
|
||||
jmp .Lepilogue
|
||||
|
||||
.Lretlongdouble:
|
||||
# Load %ecx with the pointer to storage for the return value
|
||||
movl 24(%ebp),%ecx
|
||||
movl 28(%ebp),%ecx
|
||||
fstpt (%ecx)
|
||||
jmp .Lepilogue
|
||||
|
||||
.Lretint64:
|
||||
# Load %ecx with the pointer to storage for the return value
|
||||
movl 24(%ebp),%ecx
|
||||
movl 28(%ebp),%ecx
|
||||
movl %eax,0(%ecx)
|
||||
movl %edx,4(%ecx)
|
||||
jmp .Lepilogue
|
||||
|
||||
.Lretstruct1b:
|
||||
# Load %ecx with the pointer to storage for the return value
|
||||
movl 24(%ebp),%ecx
|
||||
movl 28(%ebp),%ecx
|
||||
movb %al,0(%ecx)
|
||||
jmp .Lepilogue
|
||||
|
||||
.Lretstruct2b:
|
||||
# Load %ecx with the pointer to storage for the return value
|
||||
movl 24(%ebp),%ecx
|
||||
movl 28(%ebp),%ecx
|
||||
movw %ax,0(%ecx)
|
||||
jmp .Lepilogue
|
||||
|
||||
.Lretstruct4b:
|
||||
# Load %ecx with the pointer to storage for the return value
|
||||
movl 24(%ebp),%ecx
|
||||
movl 28(%ebp),%ecx
|
||||
movl %eax,0(%ecx)
|
||||
jmp .Lepilogue
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user