Merge from gcc

This commit is contained in:
green
2008-01-29 12:28:15 +00:00
parent e680ecfbfc
commit ccabd2b16b
119 changed files with 9458 additions and 9444 deletions

View File

@@ -1,434 +1,3 @@
2006-12-14 Andreas Tobler <a.tobler@schweiz.org>
* configure.ac: Add TARGET for x86_64-*-darwin*.
* Makefile.am (nodist_libffi_la_SOURCES): Add rules for 64-bit sources
for X86_DARWIN.
* src/x86/ffitarget.h: Set trampoline size for x86_64-*-darwin*.
* src/x86/darwin64.S: New file for x86_64-*-darwin* support.
* configure: Regenerate.
* Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
* testsuite/libffi.special/unwindtest_ffi_call.cc: New test case for
ffi_call only.
2006-12-13 Andreas Tobler <a.tobler@schweiz.org>
* aclocal.m4: Regenerate with aclocal -I .. as written in the
Makefile.am.
2006-10-31 Geoffrey Keating <geoffk@apple.com>
* src/powerpc/ffi_darwin.c (darwin_adjust_aggregate_sizes): New.
(ffi_prep_cif_machdep): Call darwin_adjust_aggregate_sizes for
Darwin.
* testsuite/libffi.call/nested_struct4.c: Remove Darwin XFAIL.
* testsuite/libffi.call/nested_struct6.c: Remove Darwin XFAIL.
2006-10-10 Paolo Bonzini <bonzini@gnu.org>
Sandro Tolaini <tolaini@libero.it>
* configure.ac [i*86-*-darwin*]: Set X86_DARWIN symbol and
conditional.
* configure: Regenerated.
* Makefile.am (nodist_libffi_la_SOURCES) [X86_DARWIN]: New case.
(EXTRA_DIST): Add src/x86/darwin.S.
* Makefile.in: Regenerated.
* include/Makefile.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
* src/x86/ffi.c (ffi_prep_cif_machdep) [X86_DARWIN]: Treat like
X86_WIN32, and additionally align stack to 16 bytes.
* src/x86/darwin.S: New, based on sysv.S.
* src/prep_cif.c (ffi_prep_cif) [X86_DARWIN]: Align > 8-byte structs.
2006-09-12 David Daney <ddaney@avtrex.com>
PR libffi/23935
* include/Makefile.am: Install both ffi.h and ffitarget.h in
$(libdir)/gcc/$(target_alias)/$(gcc_version)/include.
* aclocal.m4: Regenerated for automake 1.9.6.
* Makefile.in: Regenerated.
* include/Makefile.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
2006-08-17 Andreas Tobler <a.tobler@schweiz.ch>
* include/ffi_common.h (struct): Revert accidental commit.
2006-08-15 Andreas Tobler <a.tobler@schweiz.ch>
* include/ffi_common.h: Remove lint directives.
* include/ffi.h.in: Likewise.
2006-07-25 Torsten Schoenfeld <kaffeetisch@gmx.de>
* include/ffi.h.in (ffi_type_ulong, ffi_type_slong): Define correctly
for 32-bit architectures.
* testsuite/libffi.call/return_ul.c: New test case.
2006-07-19 David Daney <ddaney@avtrex.com>
* testsuite/libffi.call/closure_fn6.c: Remove xfail for mips,
xfail remains for mips64.
2006-05-23 Carlos O'Donell <carlos@codesourcery.com>
* Makefile.am: Add install-html target. Add install-html to .PHONY
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* include/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
2006-05-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* pa/ffi.c (ffi_prep_args_pa32): Load floating point arguments from
stack slot.
2006-04-22 Andreas Tobler <a.tobler@schweiz.ch>
* README: Remove notice about 'Crazy Comments'.
* src/debug.c: Remove lint directives. Cleanup white spaces.
* src/java_raw_api.c: Likewise.
* src/prep_cif.c: Likewise.
* src/raw_api.c: Likewise.
* src/ffitest.c: Delete. No longer needed, all test cases migrated
to the testsuite.
* src/arm/ffi.c: Remove lint directives.
* src/m32r/ffi.c: Likewise.
* src/pa/ffi.c: Likewise.
* src/powerpc/ffi.c: Likewise.
* src/powerpc/ffi_darwin.c: Likewise.
* src/sh/ffi.c: Likewise.
* src/sh64/ffi.c: Likewise.
* src/x86/ffi.c: Likewise.
* testsuite/libffi.call/float2.c: Likewise.
* testsuite/libffi.call/promotion.c: Likewise.
* testsuite/libffi.call/struct1.c: Likewise.
2006-04-13 Andreas Tobler <a.tobler@schweiz.ch>
* src/pa/hpux32.S: Correct unwind offset calculation for
ffi_closure_pa32.
* src/pa/linux.S: Likewise.
2006-04-12 James E Wilson <wilson@specifix.com>
PR libgcj/26483
* src/ia64/ffi.c (stf_spill, ldf_fill): Rewrite as macros.
(hfa_type_load): Call stf_spill.
(hfa_type_store): Call ldf_fill.
(ffi_call): Adjust calls to above routines. Add local temps for
macro result.
2006-04-10 Matthias Klose <doko@debian.org>
* testsuite/lib/libffi-dg.exp (libffi-init): Recognize multilib
directory names containing underscores.
2006-04-07 James E Wilson <wilson@specifix.com>
* testsuite/libffi.call/float4.c: New testcase.
2006-04-05 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Andreas Tobler <a.tobler@schweiz.ch>
* Makefile.am: Add PA_HPUX port.
* Makefile.in: Regenerate.
* include/Makefile.in: Likewise.
* testsuite/Makefile.in: Likewise.
* configure.ac: Add PA_HPUX rules.
* configure: Regenerate.
* src/pa/ffitarget.h: Rename linux target to PA_LINUX.
Add PA_HPUX and PA64_HPUX.
Rename FFI_LINUX ABI to FFI_PA32 ABI.
(FFI_TRAMPOLINE_SIZE): Define for 32-bit HP-UX targets.
(FFI_TYPE_SMALL_STRUCT2): Define.
(FFI_TYPE_SMALL_STRUCT4): Likewise.
(FFI_TYPE_SMALL_STRUCT8): Likewise.
(FFI_TYPE_SMALL_STRUCT3): Redefine.
(FFI_TYPE_SMALL_STRUCT5): Likewise.
(FFI_TYPE_SMALL_STRUCT6): Likewise.
(FFI_TYPE_SMALL_STRUCT7): Likewise.
* src/pa/ffi.c (ROUND_DOWN): Delete.
(fldw, fstw, fldd, fstd): Use '__asm__'.
(ffi_struct_type): Add support for FFI_TYPE_SMALL_STRUCT2,
FFI_TYPE_SMALL_STRUCT4 and FFI_TYPE_SMALL_STRUCT8.
(ffi_prep_args_LINUX): Rename to ffi_prep_args_pa32. Update comment.
Simplify incrementing of stack slot variable. Change type of local
'n' to unsigned int.
(ffi_size_stack_LINUX): Rename to ffi_size_stack_pa32. Handle long
double on PA_HPUX.
(ffi_prep_cif_machdep): Likewise.
(ffi_call): Likewise.
(ffi_closure_inner_LINUX): Rename to ffi_closure_inner_pa32. Change
return type to ffi_status. Simplify incrementing of stack slot
variable. Only copy floating point argument registers when PA_LINUX
is true. Reformat debug statement.
Add support for FFI_TYPE_SMALL_STRUCT2, FFI_TYPE_SMALL_STRUCT4 and
FFI_TYPE_SMALL_STRUCT8.
(ffi_closure_LINUX): Rename to ffi_closure_pa32. Add 'extern' to
declaration.
(ffi_prep_closure): Make linux trampoline conditional on PA_LINUX.
Add nops to cache flush. Add trampoline for PA_HPUX.
* src/pa/hpux32.S: New file.
* src/pa/linux.S (ffi_call_LINUX): Rename to ffi_call_pa32. Rename
ffi_prep_args_LINUX to ffi_prep_args_pa32.
Localize labels. Add support for 2, 4 and 8-byte small structs. Handle
unaligned destinations in 3, 5, 6 and 7-byte small structs. Order
argument type checks so that common argument types appear first.
(ffi_closure_LINUX): Rename to ffi_closure_pa32. Rename
ffi_closure_inner_LINUX to ffi_closure_inner_pa32.
2006-03-24 Alan Modra <amodra@bigpond.net.au>
* src/powerpc/ffitarget.h (enum ffi_abi): Add FFI_LINUX. Default
for 32-bit using IBM extended double format. Fix FFI_LAST_ABI.
* src/powerpc/ffi.c (ffi_prep_args_SYSV): Handle linux variant of
FFI_TYPE_LONGDOUBLE.
(ffi_prep_args64): Assert using IBM extended double.
(ffi_prep_cif_machdep): Don't munge FFI_TYPE_LONGDOUBLE type.
Handle FFI_LINUX FFI_TYPE_LONGDOUBLE return and args.
(ffi_call): Handle FFI_LINUX.
(ffi_closure_helper_SYSV): Non FFI_LINUX long double return needs
gpr3 return pointer as for struct return. Handle FFI_LINUX
FFI_TYPE_LONGDOUBLE return and args. Don't increment "nf"
unnecessarily.
* src/powerpc/ppc_closure.S (ffi_closure_SYSV): Load both f1 and f2
for FFI_TYPE_LONGDOUBLE. Move epilogue insns into case table.
Don't use r6 as pointer to results, instead use sp offset. Don't
make a special call to load lr with case table address, instead
use offset from previous call.
* src/powerpc/sysv.S (ffi_call_SYSV): Save long double return.
* src/powerpc/linux64.S (ffi_call_LINUX64): Simplify long double
return.
2006-03-15 Kaz Kojima <kkojima@gcc.gnu.org>
* src/sh64/ffi.c (ffi_prep_cif_machdep): Handle float arguments
passed with FP registers correctly.
(ffi_closure_helper_SYSV): Likewise.
* src/sh64/sysv.S: Likewise.
2006-03-01 Andreas Tobler <a.tobler@schweiz.ch>
* testsuite/libffi.special/unwindtest.cc (closure_test_fn): Mark cif,
args and userdata unused.
(closure_test_fn1): Mark cif and userdata unused.
(main): Remove unused res.
2006-02-28 Andreas Tobler <a.tobler@schweiz.ch>
* testsuite/libffi.call/call.exp: Adjust FSF address. Add test runs for
-O2, -O3, -Os and the warning flags -W -Wall.
* testsuite/libffi.special/special.exp: Likewise.
* testsuite/libffi.call/ffitest.h: Add an __UNUSED__ macro to mark
unused parameter unused for gcc or else do nothing.
* testsuite/libffi.special/ffitestcxx.h: Likewise.
* testsuite/libffi.call/cls_12byte.c (cls_struct_12byte_gn): Mark cif
and userdata unused.
* testsuite/libffi.call/cls_16byte.c (cls_struct_16byte_gn): Likewise.
* testsuite/libffi.call/cls_18byte.c (cls_struct_18byte_gn): Likewise.
* testsuite/libffi.call/cls_19byte.c (cls_struct_19byte_gn): Likewise.
* testsuite/libffi.call/cls_1_1byte.c (cls_struct_1_1byte_gn): Likewise.
* testsuite/libffi.call/cls_20byte.c (cls_struct_20byte_gn): Likewise.
* testsuite/libffi.call/cls_20byte1.c (cls_struct_20byte_gn): Likewise.
* testsuite/libffi.call/cls_24byte.c (cls_struct_24byte_gn): Likewise.
* testsuite/libffi.call/cls_2byte.c (cls_struct_2byte_gn): Likewise.
* testsuite/libffi.call/cls_3_1byte.c (cls_struct_3_1byte_gn): Likewise.
* testsuite/libffi.call/cls_3byte1.c (cls_struct_3byte_gn): Likewise.
* testsuite/libffi.call/cls_3byte2.c (cls_struct_3byte_gn1): Likewise.
* testsuite/libffi.call/cls_4_1byte.c (cls_struct_4_1byte_gn): Likewise.
* testsuite/libffi.call/cls_4byte.c (cls_struct_4byte_gn): Likewise.
* testsuite/libffi.call/cls_5_1_byte.c (cls_struct_5byte_gn): Likewise.
* testsuite/libffi.call/cls_5byte.c (cls_struct_5byte_gn): Likewise.
* testsuite/libffi.call/cls_64byte.c (cls_struct_64byte_gn): Likewise.
* testsuite/libffi.call/cls_6_1_byte.c (cls_struct_6byte_gn): Likewise.
* testsuite/libffi.call/cls_6byte.c (cls_struct_6byte_gn): Likewise.
* testsuite/libffi.call/cls_7_1_byte.c (cls_struct_7byte_gn): Likewise.
* testsuite/libffi.call/cls_7byte.c (cls_struct_7byte_gn): Likewise.
* testsuite/libffi.call/cls_8byte.c (cls_struct_8byte_gn): Likewise.
* testsuite/libffi.call/cls_9byte1.c (cls_struct_9byte_gn): Likewise.
* testsuite/libffi.call/cls_9byte2.c (cls_struct_9byte_gn): Likewise.
* testsuite/libffi.call/cls_align_double.c (cls_struct_align_gn):
Likewise.
* testsuite/libffi.call/cls_align_float.c (cls_struct_align_gn):
Likewise.
* testsuite/libffi.call/cls_align_longdouble.c (cls_struct_align_gn):
Likewise.
* testsuite/libffi.call/cls_align_pointer.c (cls_struct_align_fn): Cast
void* to avoid compiler warning.
(main): Likewise.
(cls_struct_align_gn): Mark cif and userdata unused.
* testsuite/libffi.call/cls_align_sint16.c (cls_struct_align_gn):
Likewise.
* testsuite/libffi.call/cls_align_sint32.c (cls_struct_align_gn):
Likewise.
* testsuite/libffi.call/cls_align_sint64.c (cls_struct_align_gn):
Likewise.
* testsuite/libffi.call/cls_align_uint16.c (cls_struct_align_gn):
Likewise.
* testsuite/libffi.call/cls_align_uint32.c (cls_struct_align_gn):
Likewise.
* testsuite/libffi.call/cls_double.c (cls_ret_double_fn): Likewise.
* testsuite/libffi.call/cls_float.c (cls_ret_float_fn): Likewise.
* testsuite/libffi.call/cls_multi_schar.c (test_func_gn): Mark cif and
data unused.
(main): Cast res_call to silence gcc.
* testsuite/libffi.call/cls_multi_sshort.c (test_func_gn): Mark cif and
data unused.
(main): Cast res_call to silence gcc.
* testsuite/libffi.call/cls_multi_sshortchar.c (test_func_gn): Mark cif
and data unused.
(main): Cast res_call to silence gcc.
* testsuite/libffi.call/cls_multi_uchar.c (test_func_gn): Mark cif and
data unused.
(main): Cast res_call to silence gcc.
* testsuite/libffi.call/cls_multi_ushort.c (test_func_gn): Mark cif and
data unused.
(main): Cast res_call to silence gcc.
* testsuite/libffi.call/cls_multi_ushortchar.c (test_func_gn): Mark cif
and data unused.
(main): Cast res_call to silence gcc.
* testsuite/libffi.call/cls_schar.c (cls_ret_schar_fn): Mark cif and
userdata unused.
(cls_ret_schar_fn): Cast printf parameter to silence gcc.
* testsuite/libffi.call/cls_sint.c (cls_ret_sint_fn): Mark cif and
userdata unused.
(cls_ret_sint_fn): Cast printf parameter to silence gcc.
* testsuite/libffi.call/cls_sshort.c (cls_ret_sshort_fn): Mark cif and
userdata unused.
(cls_ret_sshort_fn): Cast printf parameter to silence gcc.
* testsuite/libffi.call/cls_uchar.c (cls_ret_uchar_fn): Mark cif and
userdata unused.
(cls_ret_uchar_fn): Cast printf parameter to silence gcc.
* testsuite/libffi.call/cls_uint.c (cls_ret_uint_fn): Mark cif and
userdata unused.
(cls_ret_uint_fn): Cast printf parameter to silence gcc.
* testsuite/libffi.call/cls_ulonglong.c (cls_ret_ulonglong_fn): Mark cif
and userdata unused.
* testsuite/libffi.call/cls_ushort.c (cls_ret_ushort_fn): Mark cif and
userdata unused.
(cls_ret_ushort_fn): Cast printf parameter to silence gcc.
* testsuite/libffi.call/float.c (floating): Remove unused parameter e.
* testsuite/libffi.call/float1.c (main): Remove unused variable i.
Cleanup white spaces.
* testsuite/libffi.call/negint.c (checking): Remove unused variable i.
* testsuite/libffi.call/nested_struct.c (cls_struct_combined_gn): Mark
cif and userdata unused.
* testsuite/libffi.call/nested_struct1.c (cls_struct_combined_gn):
Likewise.
* testsuite/libffi.call/nested_struct10.c (B_gn): Likewise.
* testsuite/libffi.call/nested_struct2.c (B_fn): Adjust printf
formatters to silence gcc.
(B_gn): Mark cif and userdata unused.
* testsuite/libffi.call/nested_struct3.c (B_gn): Mark cif and userdata
unused.
* testsuite/libffi.call/nested_struct4.c: Mention related PR.
(B_gn): Mark cif and userdata unused.
* testsuite/libffi.call/nested_struct5.c (B_gn): Mark cif and userdata
unused.
* testsuite/libffi.call/nested_struct6.c: Mention related PR.
(B_gn): Mark cif and userdata unused.
* testsuite/libffi.call/nested_struct7.c (B_gn): Mark cif and userdata
unused.
* testsuite/libffi.call/nested_struct8.c (B_gn): Likewise.
* testsuite/libffi.call/nested_struct9.c (B_gn): Likewise.
* testsuite/libffi.call/problem1.c (stub): Likewise.
* testsuite/libffi.call/pyobjc-tc.c (main): Cast the result to silence
gcc.
* testsuite/libffi.call/return_fl2.c (return_fl): Add the note mentioned
in the last commit for this test case in the test case itself.
* testsuite/libffi.call/closure_fn0.c (closure_test_fn0): Mark cif as
unused.
* testsuite/libffi.call/closure_fn1.c (closure_test_fn1): Likewise.
* testsuite/libffi.call/closure_fn2.c (closure_test_fn2): Likewise.
* testsuite/libffi.call/closure_fn3.c (closure_test_fn3): Likewise.
* testsuite/libffi.call/closure_fn4.c (closure_test_fn0): Likewise.
* testsuite/libffi.call/closure_fn5.c (closure_test_fn5): Likewise.
* testsuite/libffi.call/closure_fn6.c (closure_test_fn0): Likewise.
2006-02-22 Kaz Kojima <kkojima@gcc.gnu.org>
* src/sh/sysv.S: Fix register numbers in the FDE for
ffi_closure_SYSV.
2006-02-20 Andreas Tobler <a.tobler@schweiz.ch>
* testsuite/libffi.call/return_fl2.c (return_fl): Remove static
declaration to avoid a false negative on ix86. See PR323.
2006-02-18 Kaz Kojima <kkojima@gcc.gnu.org>
* src/sh/ffi.c (ffi_closure_helper_SYSV): Remove unused variable
and cast integer to void * if needed. Update the pointer to
the FP register saved area correctly.
2006-02-17 Andreas Tobler <a.tobler@schweiz.ch>
* testsuite/libffi.call/nested_struct6.c: XFAIL this test until PR25630
is fixed.
* testsuite/libffi.call/nested_struct4.c: Likewise.
2006-02-16 Andreas Tobler <a.tobler@schweiz.ch>
* testsuite/libffi.call/return_dbl.c: New test case.
* testsuite/libffi.call/return_dbl1.c: Likewise.
* testsuite/libffi.call/return_dbl2.c: Likewise.
* testsuite/libffi.call/return_fl.c: Likewise.
* testsuite/libffi.call/return_fl1.c: Likewise.
* testsuite/libffi.call/return_fl2.c: Likewise.
* testsuite/libffi.call/return_fl3.c: Likewise.
* testsuite/libffi.call/closure_fn6.c: Likewise.
* testsuite/libffi.call/nested_struct2.c: Remove ffi_type_mylong
definition.
* testsuite/libffi.call/ffitest.h: Add ffi_type_mylong definition
here to be used by other test cases too.
* testsuite/libffi.call/nested_struct10.c: New test case.
* testsuite/libffi.call/nested_struct9.c: Likewise.
* testsuite/libffi.call/nested_struct8.c: Likewise.
* testsuite/libffi.call/nested_struct7.c: Likewise.
* testsuite/libffi.call/nested_struct6.c: Likewise.
* testsuite/libffi.call/nested_struct5.c: Likewise.
* testsuite/libffi.call/nested_struct4.c: Likewise.
2006-01-21 Andreas Tobler <a.tobler@schweiz.ch>
* configure.ac: Enable libffi for sparc64-*-freebsd*.
* configure: Rebuilt.
2006-01-18 Jakub Jelinek <jakub@redhat.com>
* src/powerpc/sysv.S (smst_two_register): Don't call __ashldi3,
instead do the shifting inline.
* src/powerpc/ppc_closure.S (ffi_closure_SYSV): Don't compute %r5
shift count unconditionally. Simplify load sequences for 1, 2, 3, 4
and 8 byte structs, for the remaining struct sizes don't call
__lshrdi3, instead do the shifting inline.
2005-12-07 Thiemo Seufer <ths@networkno.de>
* src/mips/ffitarget.h: Remove obsolete sgidefs.h include. Add
missing parentheses.
* src/mips/o32.S (ffi_call_O32): Code formatting. Define
and use A3_OFF, FP_OFF, RA_OFF. Micro-optimizations.
(ffi_closure_O32): Likewise, but with newly defined A3_OFF2,
A2_OFF2, A1_OFF2, A0_OFF2, RA_OFF2, FP_OFF2, S0_OFF2, GP_OFF2,
V1_OFF2, V0_OFF2, FA_1_1_OFF2, FA_1_0_OFF2, FA_0_1_OFF2,
FA_0_0_OFF2.
* src/mips/ffi.c (ffi_prep_args): Code formatting. Fix
endianness bugs.
(ffi_prep_closure): Improve trampoline instruction scheduling.
(ffi_closure_mips_inner_O32): Fix endianness bugs.
2005-12-03 Alan Modra <amodra@bigpond.net.au>
* src/powerpc/ffi.c: Formatting.
(ffi_prep_args_SYSV): Avoid possible aliasing problems by using unions.
(ffi_prep_args64): Likewise.
2005-09-30 Geoffrey Keating <geoffk@apple.com> 2005-09-30 Geoffrey Keating <geoffk@apple.com>
* testsuite/lib/libffi-dg.exp (libffi_target_compile): For * testsuite/lib/libffi-dg.exp (libffi_target_compile): For

View File

@@ -1,7 +1,7 @@
## Process this with automake to create Makefile.in ## Process this with automake to create Makefile.in
AUTOMAKE_OPTIONS = foreign subdir-objects AUTOMAKE_OPTIONS = foreign subdir-objects
ACLOCAL_AMFLAGS = ACLOCAL_AMFLAGS = -I ..
SUBDIRS = include testsuite SUBDIRS = include testsuite
@@ -24,10 +24,9 @@ EXTRA_DIST = LICENSE ChangeLog.v1 \
src/sh64/ffi.c src/sh64/sysv.S src/sh64/ffitarget.h \ src/sh64/ffi.c src/sh64/sysv.S src/sh64/ffitarget.h \
src/sparc/v8.S src/sparc/v9.S src/sparc/ffitarget.h \ src/sparc/v8.S src/sparc/v9.S src/sparc/ffitarget.h \
src/sparc/ffi.c \ src/sparc/ffi.c \
src/x86/ffi.c src/x86/sysv.S src/x86/win32.S src/x86/darwin.S \ src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \
src/x86/ffi64.c src/x86/unix64.S src/x86/ffitarget.h \ src/x86/ffi64.c src/x86/unix64.S src/x86/ffitarget.h \
src/pa/ffi.c src/pa/linux.S src/pa/hpux32.S \ src/pa/ffi.c src/pa/linux.S src/frv/eabi.S src/frv/ffitarget.h
src/frv/eabi.S src/frv/ffitarget.h
## ################################################################ ## ################################################################
@@ -94,9 +93,6 @@ endif
if X86_WIN32 if X86_WIN32
nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win32.S nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win32.S
endif endif
if X86_DARWIN
nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S
endif
if SPARC if SPARC
nodist_libffi_la_SOURCES += src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S nodist_libffi_la_SOURCES += src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
endif endif
@@ -145,12 +141,9 @@ endif
if SH64 if SH64
nodist_libffi_la_SOURCES += src/sh64/sysv.S src/sh64/ffi.c nodist_libffi_la_SOURCES += src/sh64/sysv.S src/sh64/ffi.c
endif endif
if PA_LINUX if PA
nodist_libffi_la_SOURCES += src/pa/linux.S src/pa/ffi.c nodist_libffi_la_SOURCES += src/pa/linux.S src/pa/ffi.c
endif endif
if PA_HPUX
nodist_libffi_la_SOURCES += src/pa/hpux32.S src/pa/ffi.c
endif
libffi_convenience_la_SOURCES = $(libffi_la_SOURCES) libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES) nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
@@ -161,8 +154,3 @@ libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
AM_CCASFLAGS = $(AM_CPPFLAGS) AM_CCASFLAGS = $(AM_CPPFLAGS)
# No install-html support
.PHONY: install-html
install-html:

View File

@@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am. # Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -14,15 +14,11 @@
@SET_MAKE@ @SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644 install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c
@@ -41,39 +37,37 @@ target_triplet = @target@
@MIPS_LINUX_TRUE@am__append_2 = src/mips/ffi.c src/mips/o32.S @MIPS_LINUX_TRUE@am__append_2 = src/mips/ffi.c src/mips/o32.S
@X86_TRUE@am__append_3 = src/x86/ffi.c src/x86/sysv.S @X86_TRUE@am__append_3 = src/x86/ffi.c src/x86/sysv.S
@X86_WIN32_TRUE@am__append_4 = src/x86/ffi.c src/x86/win32.S @X86_WIN32_TRUE@am__append_4 = src/x86/ffi.c src/x86/win32.S
@X86_DARWIN_TRUE@am__append_5 = src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S @SPARC_TRUE@am__append_5 = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
@SPARC_TRUE@am__append_6 = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S @ALPHA_TRUE@am__append_6 = src/alpha/ffi.c src/alpha/osf.S
@ALPHA_TRUE@am__append_7 = src/alpha/ffi.c src/alpha/osf.S @IA64_TRUE@am__append_7 = src/ia64/ffi.c src/ia64/unix.S
@IA64_TRUE@am__append_8 = src/ia64/ffi.c src/ia64/unix.S @M32R_TRUE@am__append_8 = src/m32r/sysv.S src/m32r/ffi.c
@M32R_TRUE@am__append_9 = src/m32r/sysv.S src/m32r/ffi.c @M68K_TRUE@am__append_9 = src/m68k/ffi.c src/m68k/sysv.S
@M68K_TRUE@am__append_10 = src/m68k/ffi.c src/m68k/sysv.S @POWERPC_TRUE@am__append_10 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S
@POWERPC_TRUE@am__append_11 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S @POWERPC_AIX_TRUE@am__append_11 = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
@POWERPC_AIX_TRUE@am__append_12 = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S @POWERPC_DARWIN_TRUE@am__append_12 = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
@POWERPC_DARWIN_TRUE@am__append_13 = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S @POWERPC_FREEBSD_TRUE@am__append_13 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
@POWERPC_FREEBSD_TRUE@am__append_14 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S @ARM_TRUE@am__append_14 = src/arm/sysv.S src/arm/ffi.c
@ARM_TRUE@am__append_15 = src/arm/sysv.S src/arm/ffi.c @LIBFFI_CRIS_TRUE@am__append_15 = src/cris/sysv.S src/cris/ffi.c
@LIBFFI_CRIS_TRUE@am__append_16 = src/cris/sysv.S src/cris/ffi.c @FRV_TRUE@am__append_16 = src/frv/eabi.S src/frv/ffi.c
@FRV_TRUE@am__append_17 = src/frv/eabi.S src/frv/ffi.c @S390_TRUE@am__append_17 = src/s390/sysv.S src/s390/ffi.c
@S390_TRUE@am__append_18 = src/s390/sysv.S src/s390/ffi.c @X86_64_TRUE@am__append_18 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
@X86_64_TRUE@am__append_19 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S @SH_TRUE@am__append_19 = src/sh/sysv.S src/sh/ffi.c
@SH_TRUE@am__append_20 = src/sh/sysv.S src/sh/ffi.c @SH64_TRUE@am__append_20 = src/sh64/sysv.S src/sh64/ffi.c
@SH64_TRUE@am__append_21 = src/sh64/sysv.S src/sh64/ffi.c @PA_TRUE@am__append_21 = src/pa/linux.S src/pa/ffi.c
@PA_LINUX_TRUE@am__append_22 = src/pa/linux.S src/pa/ffi.c subdir = .
@PA_HPUX_TRUE@am__append_23 = src/pa/hpux32.S src/pa/ffi.c
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/fficonfig.h.in \ $(srcdir)/Makefile.in $(srcdir)/fficonfig.h.in \
$(top_srcdir)/configure ChangeLog compile config.guess \ $(top_srcdir)/configure ChangeLog compile config.guess \
config.sub depcomp install-sh ltconfig ltmain.sh missing \ config.sub depcomp install-sh ltcf-c.sh ltcf-cxx.sh \
mkinstalldirs ltcf-gcj.sh ltconfig ltmain.sh missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = fficonfig.h CONFIG_HEADER = fficonfig.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -94,37 +88,34 @@ am_libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
@MIPS_LINUX_TRUE@am__objects_2 = src/mips/ffi.lo src/mips/o32.lo @MIPS_LINUX_TRUE@am__objects_2 = src/mips/ffi.lo src/mips/o32.lo
@X86_TRUE@am__objects_3 = src/x86/ffi.lo src/x86/sysv.lo @X86_TRUE@am__objects_3 = src/x86/ffi.lo src/x86/sysv.lo
@X86_WIN32_TRUE@am__objects_4 = src/x86/ffi.lo src/x86/win32.lo @X86_WIN32_TRUE@am__objects_4 = src/x86/ffi.lo src/x86/win32.lo
@X86_DARWIN_TRUE@am__objects_5 = src/x86/ffi.lo src/x86/darwin.lo \ @SPARC_TRUE@am__objects_5 = src/sparc/ffi.lo src/sparc/v8.lo \
@X86_DARWIN_TRUE@ src/x86/ffi64.lo src/x86/darwin64.lo
@SPARC_TRUE@am__objects_6 = src/sparc/ffi.lo src/sparc/v8.lo \
@SPARC_TRUE@ src/sparc/v9.lo @SPARC_TRUE@ src/sparc/v9.lo
@ALPHA_TRUE@am__objects_7 = src/alpha/ffi.lo src/alpha/osf.lo @ALPHA_TRUE@am__objects_6 = src/alpha/ffi.lo src/alpha/osf.lo
@IA64_TRUE@am__objects_8 = src/ia64/ffi.lo src/ia64/unix.lo @IA64_TRUE@am__objects_7 = src/ia64/ffi.lo src/ia64/unix.lo
@M32R_TRUE@am__objects_9 = src/m32r/sysv.lo src/m32r/ffi.lo @M32R_TRUE@am__objects_8 = src/m32r/sysv.lo src/m32r/ffi.lo
@M68K_TRUE@am__objects_10 = src/m68k/ffi.lo src/m68k/sysv.lo @M68K_TRUE@am__objects_9 = src/m68k/ffi.lo src/m68k/sysv.lo
@POWERPC_TRUE@am__objects_11 = src/powerpc/ffi.lo src/powerpc/sysv.lo \ @POWERPC_TRUE@am__objects_10 = src/powerpc/ffi.lo src/powerpc/sysv.lo \
@POWERPC_TRUE@ src/powerpc/ppc_closure.lo \ @POWERPC_TRUE@ src/powerpc/ppc_closure.lo \
@POWERPC_TRUE@ src/powerpc/linux64.lo \ @POWERPC_TRUE@ src/powerpc/linux64.lo \
@POWERPC_TRUE@ src/powerpc/linux64_closure.lo @POWERPC_TRUE@ src/powerpc/linux64_closure.lo
@POWERPC_AIX_TRUE@am__objects_12 = src/powerpc/ffi_darwin.lo \ @POWERPC_AIX_TRUE@am__objects_11 = src/powerpc/ffi_darwin.lo \
@POWERPC_AIX_TRUE@ src/powerpc/aix.lo \ @POWERPC_AIX_TRUE@ src/powerpc/aix.lo \
@POWERPC_AIX_TRUE@ src/powerpc/aix_closure.lo @POWERPC_AIX_TRUE@ src/powerpc/aix_closure.lo
@POWERPC_DARWIN_TRUE@am__objects_13 = src/powerpc/ffi_darwin.lo \ @POWERPC_DARWIN_TRUE@am__objects_12 = src/powerpc/ffi_darwin.lo \
@POWERPC_DARWIN_TRUE@ src/powerpc/darwin.lo \ @POWERPC_DARWIN_TRUE@ src/powerpc/darwin.lo \
@POWERPC_DARWIN_TRUE@ src/powerpc/darwin_closure.lo @POWERPC_DARWIN_TRUE@ src/powerpc/darwin_closure.lo
@POWERPC_FREEBSD_TRUE@am__objects_14 = src/powerpc/ffi.lo \ @POWERPC_FREEBSD_TRUE@am__objects_13 = src/powerpc/ffi.lo \
@POWERPC_FREEBSD_TRUE@ src/powerpc/sysv.lo \ @POWERPC_FREEBSD_TRUE@ src/powerpc/sysv.lo \
@POWERPC_FREEBSD_TRUE@ src/powerpc/ppc_closure.lo @POWERPC_FREEBSD_TRUE@ src/powerpc/ppc_closure.lo
@ARM_TRUE@am__objects_15 = src/arm/sysv.lo src/arm/ffi.lo @ARM_TRUE@am__objects_14 = src/arm/sysv.lo src/arm/ffi.lo
@LIBFFI_CRIS_TRUE@am__objects_16 = src/cris/sysv.lo src/cris/ffi.lo @LIBFFI_CRIS_TRUE@am__objects_15 = src/cris/sysv.lo src/cris/ffi.lo
@FRV_TRUE@am__objects_17 = src/frv/eabi.lo src/frv/ffi.lo @FRV_TRUE@am__objects_16 = src/frv/eabi.lo src/frv/ffi.lo
@S390_TRUE@am__objects_18 = src/s390/sysv.lo src/s390/ffi.lo @S390_TRUE@am__objects_17 = src/s390/sysv.lo src/s390/ffi.lo
@X86_64_TRUE@am__objects_19 = src/x86/ffi64.lo src/x86/unix64.lo \ @X86_64_TRUE@am__objects_18 = src/x86/ffi64.lo src/x86/unix64.lo \
@X86_64_TRUE@ src/x86/ffi.lo src/x86/sysv.lo @X86_64_TRUE@ src/x86/ffi.lo src/x86/sysv.lo
@SH_TRUE@am__objects_20 = src/sh/sysv.lo src/sh/ffi.lo @SH_TRUE@am__objects_19 = src/sh/sysv.lo src/sh/ffi.lo
@SH64_TRUE@am__objects_21 = src/sh64/sysv.lo src/sh64/ffi.lo @SH64_TRUE@am__objects_20 = src/sh64/sysv.lo src/sh64/ffi.lo
@PA_LINUX_TRUE@am__objects_22 = src/pa/linux.lo src/pa/ffi.lo @PA_TRUE@am__objects_21 = src/pa/linux.lo src/pa/ffi.lo
@PA_HPUX_TRUE@am__objects_23 = src/pa/hpux32.lo src/pa/ffi.lo
nodist_libffi_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ nodist_libffi_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
$(am__objects_3) $(am__objects_4) $(am__objects_5) \ $(am__objects_3) $(am__objects_4) $(am__objects_5) \
$(am__objects_6) $(am__objects_7) $(am__objects_8) \ $(am__objects_6) $(am__objects_7) $(am__objects_8) \
@@ -132,48 +123,56 @@ nodist_libffi_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
$(am__objects_12) $(am__objects_13) $(am__objects_14) \ $(am__objects_12) $(am__objects_13) $(am__objects_14) \
$(am__objects_15) $(am__objects_16) $(am__objects_17) \ $(am__objects_15) $(am__objects_16) $(am__objects_17) \
$(am__objects_18) $(am__objects_19) $(am__objects_20) \ $(am__objects_18) $(am__objects_19) $(am__objects_20) \
$(am__objects_21) $(am__objects_22) $(am__objects_23) $(am__objects_21)
libffi_la_OBJECTS = $(am_libffi_la_OBJECTS) \ libffi_la_OBJECTS = $(am_libffi_la_OBJECTS) \
$(nodist_libffi_la_OBJECTS) $(nodist_libffi_la_OBJECTS)
libffi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libffi_la_LDFLAGS) $(LDFLAGS) -o $@
libffi_convenience_la_LIBADD = libffi_convenience_la_LIBADD =
am__objects_24 = src/debug.lo src/prep_cif.lo src/types.lo \ am__objects_22 = src/debug.lo src/prep_cif.lo src/types.lo \
src/raw_api.lo src/java_raw_api.lo src/raw_api.lo src/java_raw_api.lo
am_libffi_convenience_la_OBJECTS = $(am__objects_24) am_libffi_convenience_la_OBJECTS = $(am__objects_22)
am__objects_25 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \ am__objects_23 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
$(am__objects_4) $(am__objects_5) $(am__objects_6) \ $(am__objects_4) $(am__objects_5) $(am__objects_6) \
$(am__objects_7) $(am__objects_8) $(am__objects_9) \ $(am__objects_7) $(am__objects_8) $(am__objects_9) \
$(am__objects_10) $(am__objects_11) $(am__objects_12) \ $(am__objects_10) $(am__objects_11) $(am__objects_12) \
$(am__objects_13) $(am__objects_14) $(am__objects_15) \ $(am__objects_13) $(am__objects_14) $(am__objects_15) \
$(am__objects_16) $(am__objects_17) $(am__objects_18) \ $(am__objects_16) $(am__objects_17) $(am__objects_18) \
$(am__objects_19) $(am__objects_20) $(am__objects_21) \ $(am__objects_19) $(am__objects_20) $(am__objects_21)
$(am__objects_22) $(am__objects_23) nodist_libffi_convenience_la_OBJECTS = $(am__objects_23)
nodist_libffi_convenience_la_OBJECTS = $(am__objects_25)
libffi_convenience_la_OBJECTS = $(am_libffi_convenience_la_OBJECTS) \ libffi_convenience_la_OBJECTS = $(am_libffi_convenience_la_OBJECTS) \
$(nodist_libffi_convenience_la_OBJECTS) $(nodist_libffi_convenience_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I. DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
LTCCASCOMPILE = $(LIBTOOL) --mode=compile $(CCAS) $(AM_CCASFLAGS) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
$(CCASFLAGS) LTCPPASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CFLAGS) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC) CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libffi_la_SOURCES) $(nodist_libffi_la_SOURCES) \ SOURCES = $(libffi_la_SOURCES) $(nodist_libffi_la_SOURCES) \
$(libffi_convenience_la_SOURCES) \ $(libffi_convenience_la_SOURCES) \
$(nodist_libffi_convenience_la_SOURCES) $(nodist_libffi_convenience_la_SOURCES)
DIST_SOURCES = $(libffi_la_SOURCES) $(libffi_convenience_la_SOURCES) DIST_SOURCES = $(libffi_la_SOURCES) $(libffi_convenience_la_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \ html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \ install-dvi-recursive install-exec-recursive \
install-recursive installcheck-recursive installdirs-recursive \ install-html-recursive install-info-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \
uninstall-recursive installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags ETAGS = etags
CTAGS = ctags CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS) DIST_SUBDIRS = $(SUBDIRS)
@@ -190,21 +189,16 @@ distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@ ALLOCA = @ALLOCA@
ALPHA_FALSE = @ALPHA_FALSE@
ALPHA_TRUE = @ALPHA_TRUE@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@ AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
AR = @AR@ AR = @AR@
ARM_FALSE = @ARM_FALSE@
ARM_TRUE = @ARM_TRUE@
AUTOCONF = @AUTOCONF@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
CC = @CC@ CC = @CC@
CCAS = @CCAS@ CCAS = @CCAS@
CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@ CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
@@ -225,38 +219,23 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
F77 = @F77@ F77 = @F77@
FFLAGS = @FFLAGS@ FFLAGS = @FFLAGS@
FRV_FALSE = @FRV_FALSE@ GREP = @GREP@
FRV_TRUE = @FRV_TRUE@
HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@ HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@
IA64_FALSE = @IA64_FALSE@ INSTALL = @INSTALL@
IA64_TRUE = @IA64_TRUE@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBFFI_CRIS_FALSE = @LIBFFI_CRIS_FALSE@
LIBFFI_CRIS_TRUE = @LIBFFI_CRIS_TRUE@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
M32R_FALSE = @M32R_FALSE@
M32R_TRUE = @M32R_TRUE@
M68K_FALSE = @M68K_FALSE@
M68K_TRUE = @M68K_TRUE@
MAINT = @MAINT@ MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MIPS_IRIX_FALSE = @MIPS_IRIX_FALSE@ MKDIR_P = @MKDIR_P@
MIPS_IRIX_TRUE = @MIPS_IRIX_TRUE@
MIPS_LINUX_FALSE = @MIPS_LINUX_FALSE@
MIPS_LINUX_TRUE = @MIPS_LINUX_TRUE@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PA64_HPUX_FALSE = @PA64_HPUX_FALSE@
PA64_HPUX_TRUE = @PA64_HPUX_TRUE@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME = @PACKAGE_NAME@
@@ -264,53 +243,21 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PA_HPUX_FALSE = @PA_HPUX_FALSE@
PA_HPUX_TRUE = @PA_HPUX_TRUE@
PA_LINUX_FALSE = @PA_LINUX_FALSE@
PA_LINUX_TRUE = @PA_LINUX_TRUE@
POWERPC_AIX_FALSE = @POWERPC_AIX_FALSE@
POWERPC_AIX_TRUE = @POWERPC_AIX_TRUE@
POWERPC_DARWIN_FALSE = @POWERPC_DARWIN_FALSE@
POWERPC_DARWIN_TRUE = @POWERPC_DARWIN_TRUE@
POWERPC_FALSE = @POWERPC_FALSE@
POWERPC_FREEBSD_FALSE = @POWERPC_FREEBSD_FALSE@
POWERPC_FREEBSD_TRUE = @POWERPC_FREEBSD_TRUE@
POWERPC_TRUE = @POWERPC_TRUE@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
S390_FALSE = @S390_FALSE@ SED = @SED@
S390_TRUE = @S390_TRUE@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SH64_FALSE = @SH64_FALSE@
SH64_TRUE = @SH64_TRUE@
SHELL = @SHELL@ SHELL = @SHELL@
SH_FALSE = @SH_FALSE@
SH_TRUE = @SH_TRUE@
SPARC_FALSE = @SPARC_FALSE@
SPARC_TRUE = @SPARC_TRUE@
STRIP = @STRIP@ STRIP = @STRIP@
TARGET = @TARGET@ TARGET = @TARGET@
TARGETDIR = @TARGETDIR@ TARGETDIR = @TARGETDIR@
TESTSUBDIR_FALSE = @TESTSUBDIR_FALSE@
TESTSUBDIR_TRUE = @TESTSUBDIR_TRUE@
VERSION = @VERSION@ VERSION = @VERSION@
X86_64_FALSE = @X86_64_FALSE@ abs_builddir = @abs_builddir@
X86_64_TRUE = @X86_64_TRUE@ abs_srcdir = @abs_srcdir@
X86_DARWIN_FALSE = @X86_DARWIN_FALSE@ abs_top_builddir = @abs_top_builddir@
X86_DARWIN_TRUE = @X86_DARWIN_TRUE@ abs_top_srcdir = @abs_top_srcdir@
X86_FALSE = @X86_FALSE@
X86_TRUE = @X86_TRUE@
X86_WIN32_FALSE = @X86_WIN32_FALSE@
X86_WIN32_TRUE = @X86_WIN32_TRUE@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@ ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
@@ -322,26 +269,35 @@ build_alias = @build_alias@
build_cpu = @build_cpu@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host = @host@ host = @host@
host_alias = @host_alias@ host_alias = @host_alias@
host_cpu = @host_cpu@ host_cpu = @host_cpu@
host_os = @host_os@ host_os = @host_os@
host_vendor = @host_vendor@ host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@ includedir = @includedir@
infodir = @infodir@ infodir = @infodir@
install_sh = @install_sh@ install_sh = @install_sh@
libdir = @libdir@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
target = @target@ target = @target@
target_alias = @target_alias@ target_alias = @target_alias@
@@ -350,8 +306,10 @@ target_os = @target_os@
target_vendor = @target_vendor@ target_vendor = @target_vendor@
toolexecdir = @toolexecdir@ toolexecdir = @toolexecdir@
toolexeclibdir = @toolexeclibdir@ toolexeclibdir = @toolexeclibdir@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign subdir-objects AUTOMAKE_OPTIONS = foreign subdir-objects
ACLOCAL_AMFLAGS = ACLOCAL_AMFLAGS = -I ..
SUBDIRS = include testsuite SUBDIRS = include testsuite
EXTRA_DIST = LICENSE ChangeLog.v1 \ EXTRA_DIST = LICENSE ChangeLog.v1 \
src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \ src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \
@@ -372,10 +330,9 @@ EXTRA_DIST = LICENSE ChangeLog.v1 \
src/sh64/ffi.c src/sh64/sysv.S src/sh64/ffitarget.h \ src/sh64/ffi.c src/sh64/sysv.S src/sh64/ffitarget.h \
src/sparc/v8.S src/sparc/v9.S src/sparc/ffitarget.h \ src/sparc/v8.S src/sparc/v9.S src/sparc/ffitarget.h \
src/sparc/ffi.c \ src/sparc/ffi.c \
src/x86/ffi.c src/x86/sysv.S src/x86/win32.S src/x86/darwin.S \ src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \
src/x86/ffi64.c src/x86/unix64.S src/x86/ffitarget.h \ src/x86/ffi64.c src/x86/unix64.S src/x86/ffitarget.h \
src/pa/ffi.c src/pa/linux.S src/pa/hpux32.S \ src/pa/ffi.c src/pa/linux.S src/frv/eabi.S src/frv/ffitarget.h
src/frv/eabi.S src/frv/ffitarget.h
# Work around what appears to be a GNU make bug handling MAKEFLAGS # Work around what appears to be a GNU make bug handling MAKEFLAGS
@@ -428,7 +385,7 @@ nodist_libffi_la_SOURCES = $(am__append_1) $(am__append_2) \
$(am__append_12) $(am__append_13) $(am__append_14) \ $(am__append_12) $(am__append_13) $(am__append_14) \
$(am__append_15) $(am__append_16) $(am__append_17) \ $(am__append_15) $(am__append_16) $(am__append_17) \
$(am__append_18) $(am__append_19) $(am__append_20) \ $(am__append_18) $(am__append_19) $(am__append_20) \
$(am__append_21) $(am__append_22) $(am__append_23) $(am__append_21)
libffi_convenience_la_SOURCES = $(libffi_la_SOURCES) libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES) nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
AM_CFLAGS = -Wall -g -fexceptions AM_CFLAGS = -Wall -g -fexceptions
@@ -477,7 +434,7 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
fficonfig.h: stamp-h1 fficonfig.h: stamp-h1
@if test ! -f $@; then \ @if test ! -f $@; then \
rm -f stamp-h1; \ rm -f stamp-h1; \
$(MAKE) stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
else :; fi else :; fi
stamp-h1: $(srcdir)/fficonfig.h.in $(top_builddir)/config.status stamp-h1: $(srcdir)/fficonfig.h.in $(top_builddir)/config.status
@@ -501,7 +458,7 @@ clean-noinstLTLIBRARIES:
done done
install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES) install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(toolexeclibdir)" || $(mkdir_p) "$(DESTDIR)$(toolexeclibdir)" test -z "$(toolexeclibdir)" || $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)"
@list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \ @list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \ if test -f $$p; then \
f=$(am__strip_dir) \ f=$(am__strip_dir) \
@@ -512,7 +469,7 @@ install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
uninstall-toolexeclibLTLIBRARIES: uninstall-toolexeclibLTLIBRARIES:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@set -x; list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \ @list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
p=$(am__strip_dir) \ p=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(toolexeclibdir)/$$p'"; \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(toolexeclibdir)/$$p'"; \
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(toolexeclibdir)/$$p"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(toolexeclibdir)/$$p"; \
@@ -527,10 +484,10 @@ clean-toolexeclibLTLIBRARIES:
rm -f "$${dir}/so_locations"; \ rm -f "$${dir}/so_locations"; \
done done
src/$(am__dirstamp): src/$(am__dirstamp):
@$(mkdir_p) src @$(MKDIR_P) src
@: > src/$(am__dirstamp) @: > src/$(am__dirstamp)
src/$(DEPDIR)/$(am__dirstamp): src/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) src/$(DEPDIR) @$(MKDIR_P) src/$(DEPDIR)
@: > src/$(DEPDIR)/$(am__dirstamp) @: > src/$(DEPDIR)/$(am__dirstamp)
src/debug.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/debug.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/prep_cif.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/prep_cif.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
@@ -538,10 +495,10 @@ src/types.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/raw_api.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/raw_api.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/java_raw_api.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/java_raw_api.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/mips/$(am__dirstamp): src/mips/$(am__dirstamp):
@$(mkdir_p) src/mips @$(MKDIR_P) src/mips
@: > src/mips/$(am__dirstamp) @: > src/mips/$(am__dirstamp)
src/mips/$(DEPDIR)/$(am__dirstamp): src/mips/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) src/mips/$(DEPDIR) @$(MKDIR_P) src/mips/$(DEPDIR)
@: > src/mips/$(DEPDIR)/$(am__dirstamp) @: > src/mips/$(DEPDIR)/$(am__dirstamp)
src/mips/ffi.lo: src/mips/$(am__dirstamp) \ src/mips/ffi.lo: src/mips/$(am__dirstamp) \
src/mips/$(DEPDIR)/$(am__dirstamp) src/mips/$(DEPDIR)/$(am__dirstamp)
@@ -550,10 +507,10 @@ src/mips/o32.lo: src/mips/$(am__dirstamp) \
src/mips/n32.lo: src/mips/$(am__dirstamp) \ src/mips/n32.lo: src/mips/$(am__dirstamp) \
src/mips/$(DEPDIR)/$(am__dirstamp) src/mips/$(DEPDIR)/$(am__dirstamp)
src/x86/$(am__dirstamp): src/x86/$(am__dirstamp):
@$(mkdir_p) src/x86 @$(MKDIR_P) src/x86
@: > src/x86/$(am__dirstamp) @: > src/x86/$(am__dirstamp)
src/x86/$(DEPDIR)/$(am__dirstamp): src/x86/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) src/x86/$(DEPDIR) @$(MKDIR_P) src/x86/$(DEPDIR)
@: > src/x86/$(DEPDIR)/$(am__dirstamp) @: > src/x86/$(DEPDIR)/$(am__dirstamp)
src/x86/ffi.lo: src/x86/$(am__dirstamp) \ src/x86/ffi.lo: src/x86/$(am__dirstamp) \
src/x86/$(DEPDIR)/$(am__dirstamp) src/x86/$(DEPDIR)/$(am__dirstamp)
@@ -561,17 +518,11 @@ src/x86/sysv.lo: src/x86/$(am__dirstamp) \
src/x86/$(DEPDIR)/$(am__dirstamp) src/x86/$(DEPDIR)/$(am__dirstamp)
src/x86/win32.lo: src/x86/$(am__dirstamp) \ src/x86/win32.lo: src/x86/$(am__dirstamp) \
src/x86/$(DEPDIR)/$(am__dirstamp) src/x86/$(DEPDIR)/$(am__dirstamp)
src/x86/darwin.lo: src/x86/$(am__dirstamp) \
src/x86/$(DEPDIR)/$(am__dirstamp)
src/x86/ffi64.lo: src/x86/$(am__dirstamp) \
src/x86/$(DEPDIR)/$(am__dirstamp)
src/x86/darwin64.lo: src/x86/$(am__dirstamp) \
src/x86/$(DEPDIR)/$(am__dirstamp)
src/sparc/$(am__dirstamp): src/sparc/$(am__dirstamp):
@$(mkdir_p) src/sparc @$(MKDIR_P) src/sparc
@: > src/sparc/$(am__dirstamp) @: > src/sparc/$(am__dirstamp)
src/sparc/$(DEPDIR)/$(am__dirstamp): src/sparc/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) src/sparc/$(DEPDIR) @$(MKDIR_P) src/sparc/$(DEPDIR)
@: > src/sparc/$(DEPDIR)/$(am__dirstamp) @: > src/sparc/$(DEPDIR)/$(am__dirstamp)
src/sparc/ffi.lo: src/sparc/$(am__dirstamp) \ src/sparc/ffi.lo: src/sparc/$(am__dirstamp) \
src/sparc/$(DEPDIR)/$(am__dirstamp) src/sparc/$(DEPDIR)/$(am__dirstamp)
@@ -580,50 +531,50 @@ src/sparc/v8.lo: src/sparc/$(am__dirstamp) \
src/sparc/v9.lo: src/sparc/$(am__dirstamp) \ src/sparc/v9.lo: src/sparc/$(am__dirstamp) \
src/sparc/$(DEPDIR)/$(am__dirstamp) src/sparc/$(DEPDIR)/$(am__dirstamp)
src/alpha/$(am__dirstamp): src/alpha/$(am__dirstamp):
@$(mkdir_p) src/alpha @$(MKDIR_P) src/alpha
@: > src/alpha/$(am__dirstamp) @: > src/alpha/$(am__dirstamp)
src/alpha/$(DEPDIR)/$(am__dirstamp): src/alpha/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) src/alpha/$(DEPDIR) @$(MKDIR_P) src/alpha/$(DEPDIR)
@: > src/alpha/$(DEPDIR)/$(am__dirstamp) @: > src/alpha/$(DEPDIR)/$(am__dirstamp)
src/alpha/ffi.lo: src/alpha/$(am__dirstamp) \ src/alpha/ffi.lo: src/alpha/$(am__dirstamp) \
src/alpha/$(DEPDIR)/$(am__dirstamp) src/alpha/$(DEPDIR)/$(am__dirstamp)
src/alpha/osf.lo: src/alpha/$(am__dirstamp) \ src/alpha/osf.lo: src/alpha/$(am__dirstamp) \
src/alpha/$(DEPDIR)/$(am__dirstamp) src/alpha/$(DEPDIR)/$(am__dirstamp)
src/ia64/$(am__dirstamp): src/ia64/$(am__dirstamp):
@$(mkdir_p) src/ia64 @$(MKDIR_P) src/ia64
@: > src/ia64/$(am__dirstamp) @: > src/ia64/$(am__dirstamp)
src/ia64/$(DEPDIR)/$(am__dirstamp): src/ia64/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) src/ia64/$(DEPDIR) @$(MKDIR_P) src/ia64/$(DEPDIR)
@: > src/ia64/$(DEPDIR)/$(am__dirstamp) @: > src/ia64/$(DEPDIR)/$(am__dirstamp)
src/ia64/ffi.lo: src/ia64/$(am__dirstamp) \ src/ia64/ffi.lo: src/ia64/$(am__dirstamp) \
src/ia64/$(DEPDIR)/$(am__dirstamp) src/ia64/$(DEPDIR)/$(am__dirstamp)
src/ia64/unix.lo: src/ia64/$(am__dirstamp) \ src/ia64/unix.lo: src/ia64/$(am__dirstamp) \
src/ia64/$(DEPDIR)/$(am__dirstamp) src/ia64/$(DEPDIR)/$(am__dirstamp)
src/m32r/$(am__dirstamp): src/m32r/$(am__dirstamp):
@$(mkdir_p) src/m32r @$(MKDIR_P) src/m32r
@: > src/m32r/$(am__dirstamp) @: > src/m32r/$(am__dirstamp)
src/m32r/$(DEPDIR)/$(am__dirstamp): src/m32r/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) src/m32r/$(DEPDIR) @$(MKDIR_P) src/m32r/$(DEPDIR)
@: > src/m32r/$(DEPDIR)/$(am__dirstamp) @: > src/m32r/$(DEPDIR)/$(am__dirstamp)
src/m32r/sysv.lo: src/m32r/$(am__dirstamp) \ src/m32r/sysv.lo: src/m32r/$(am__dirstamp) \
src/m32r/$(DEPDIR)/$(am__dirstamp) src/m32r/$(DEPDIR)/$(am__dirstamp)
src/m32r/ffi.lo: src/m32r/$(am__dirstamp) \ src/m32r/ffi.lo: src/m32r/$(am__dirstamp) \
src/m32r/$(DEPDIR)/$(am__dirstamp) src/m32r/$(DEPDIR)/$(am__dirstamp)
src/m68k/$(am__dirstamp): src/m68k/$(am__dirstamp):
@$(mkdir_p) src/m68k @$(MKDIR_P) src/m68k
@: > src/m68k/$(am__dirstamp) @: > src/m68k/$(am__dirstamp)
src/m68k/$(DEPDIR)/$(am__dirstamp): src/m68k/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) src/m68k/$(DEPDIR) @$(MKDIR_P) src/m68k/$(DEPDIR)
@: > src/m68k/$(DEPDIR)/$(am__dirstamp) @: > src/m68k/$(DEPDIR)/$(am__dirstamp)
src/m68k/ffi.lo: src/m68k/$(am__dirstamp) \ src/m68k/ffi.lo: src/m68k/$(am__dirstamp) \
src/m68k/$(DEPDIR)/$(am__dirstamp) src/m68k/$(DEPDIR)/$(am__dirstamp)
src/m68k/sysv.lo: src/m68k/$(am__dirstamp) \ src/m68k/sysv.lo: src/m68k/$(am__dirstamp) \
src/m68k/$(DEPDIR)/$(am__dirstamp) src/m68k/$(DEPDIR)/$(am__dirstamp)
src/powerpc/$(am__dirstamp): src/powerpc/$(am__dirstamp):
@$(mkdir_p) src/powerpc @$(MKDIR_P) src/powerpc
@: > src/powerpc/$(am__dirstamp) @: > src/powerpc/$(am__dirstamp)
src/powerpc/$(DEPDIR)/$(am__dirstamp): src/powerpc/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) src/powerpc/$(DEPDIR) @$(MKDIR_P) src/powerpc/$(DEPDIR)
@: > src/powerpc/$(DEPDIR)/$(am__dirstamp) @: > src/powerpc/$(DEPDIR)/$(am__dirstamp)
src/powerpc/ffi.lo: src/powerpc/$(am__dirstamp) \ src/powerpc/ffi.lo: src/powerpc/$(am__dirstamp) \
src/powerpc/$(DEPDIR)/$(am__dirstamp) src/powerpc/$(DEPDIR)/$(am__dirstamp)
@@ -646,81 +597,81 @@ src/powerpc/darwin.lo: src/powerpc/$(am__dirstamp) \
src/powerpc/darwin_closure.lo: src/powerpc/$(am__dirstamp) \ src/powerpc/darwin_closure.lo: src/powerpc/$(am__dirstamp) \
src/powerpc/$(DEPDIR)/$(am__dirstamp) src/powerpc/$(DEPDIR)/$(am__dirstamp)
src/arm/$(am__dirstamp): src/arm/$(am__dirstamp):
@$(mkdir_p) src/arm @$(MKDIR_P) src/arm
@: > src/arm/$(am__dirstamp) @: > src/arm/$(am__dirstamp)
src/arm/$(DEPDIR)/$(am__dirstamp): src/arm/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) src/arm/$(DEPDIR) @$(MKDIR_P) src/arm/$(DEPDIR)
@: > src/arm/$(DEPDIR)/$(am__dirstamp) @: > src/arm/$(DEPDIR)/$(am__dirstamp)
src/arm/sysv.lo: src/arm/$(am__dirstamp) \ src/arm/sysv.lo: src/arm/$(am__dirstamp) \
src/arm/$(DEPDIR)/$(am__dirstamp) src/arm/$(DEPDIR)/$(am__dirstamp)
src/arm/ffi.lo: src/arm/$(am__dirstamp) \ src/arm/ffi.lo: src/arm/$(am__dirstamp) \
src/arm/$(DEPDIR)/$(am__dirstamp) src/arm/$(DEPDIR)/$(am__dirstamp)
src/cris/$(am__dirstamp): src/cris/$(am__dirstamp):
@$(mkdir_p) src/cris @$(MKDIR_P) src/cris
@: > src/cris/$(am__dirstamp) @: > src/cris/$(am__dirstamp)
src/cris/$(DEPDIR)/$(am__dirstamp): src/cris/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) src/cris/$(DEPDIR) @$(MKDIR_P) src/cris/$(DEPDIR)
@: > src/cris/$(DEPDIR)/$(am__dirstamp) @: > src/cris/$(DEPDIR)/$(am__dirstamp)
src/cris/sysv.lo: src/cris/$(am__dirstamp) \ src/cris/sysv.lo: src/cris/$(am__dirstamp) \
src/cris/$(DEPDIR)/$(am__dirstamp) src/cris/$(DEPDIR)/$(am__dirstamp)
src/cris/ffi.lo: src/cris/$(am__dirstamp) \ src/cris/ffi.lo: src/cris/$(am__dirstamp) \
src/cris/$(DEPDIR)/$(am__dirstamp) src/cris/$(DEPDIR)/$(am__dirstamp)
src/frv/$(am__dirstamp): src/frv/$(am__dirstamp):
@$(mkdir_p) src/frv @$(MKDIR_P) src/frv
@: > src/frv/$(am__dirstamp) @: > src/frv/$(am__dirstamp)
src/frv/$(DEPDIR)/$(am__dirstamp): src/frv/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) src/frv/$(DEPDIR) @$(MKDIR_P) src/frv/$(DEPDIR)
@: > src/frv/$(DEPDIR)/$(am__dirstamp) @: > src/frv/$(DEPDIR)/$(am__dirstamp)
src/frv/eabi.lo: src/frv/$(am__dirstamp) \ src/frv/eabi.lo: src/frv/$(am__dirstamp) \
src/frv/$(DEPDIR)/$(am__dirstamp) src/frv/$(DEPDIR)/$(am__dirstamp)
src/frv/ffi.lo: src/frv/$(am__dirstamp) \ src/frv/ffi.lo: src/frv/$(am__dirstamp) \
src/frv/$(DEPDIR)/$(am__dirstamp) src/frv/$(DEPDIR)/$(am__dirstamp)
src/s390/$(am__dirstamp): src/s390/$(am__dirstamp):
@$(mkdir_p) src/s390 @$(MKDIR_P) src/s390
@: > src/s390/$(am__dirstamp) @: > src/s390/$(am__dirstamp)
src/s390/$(DEPDIR)/$(am__dirstamp): src/s390/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) src/s390/$(DEPDIR) @$(MKDIR_P) src/s390/$(DEPDIR)
@: > src/s390/$(DEPDIR)/$(am__dirstamp) @: > src/s390/$(DEPDIR)/$(am__dirstamp)
src/s390/sysv.lo: src/s390/$(am__dirstamp) \ src/s390/sysv.lo: src/s390/$(am__dirstamp) \
src/s390/$(DEPDIR)/$(am__dirstamp) src/s390/$(DEPDIR)/$(am__dirstamp)
src/s390/ffi.lo: src/s390/$(am__dirstamp) \ src/s390/ffi.lo: src/s390/$(am__dirstamp) \
src/s390/$(DEPDIR)/$(am__dirstamp) src/s390/$(DEPDIR)/$(am__dirstamp)
src/x86/ffi64.lo: src/x86/$(am__dirstamp) \
src/x86/$(DEPDIR)/$(am__dirstamp)
src/x86/unix64.lo: src/x86/$(am__dirstamp) \ src/x86/unix64.lo: src/x86/$(am__dirstamp) \
src/x86/$(DEPDIR)/$(am__dirstamp) src/x86/$(DEPDIR)/$(am__dirstamp)
src/sh/$(am__dirstamp): src/sh/$(am__dirstamp):
@$(mkdir_p) src/sh @$(MKDIR_P) src/sh
@: > src/sh/$(am__dirstamp) @: > src/sh/$(am__dirstamp)
src/sh/$(DEPDIR)/$(am__dirstamp): src/sh/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) src/sh/$(DEPDIR) @$(MKDIR_P) src/sh/$(DEPDIR)
@: > src/sh/$(DEPDIR)/$(am__dirstamp) @: > src/sh/$(DEPDIR)/$(am__dirstamp)
src/sh/sysv.lo: src/sh/$(am__dirstamp) \ src/sh/sysv.lo: src/sh/$(am__dirstamp) \
src/sh/$(DEPDIR)/$(am__dirstamp) src/sh/$(DEPDIR)/$(am__dirstamp)
src/sh/ffi.lo: src/sh/$(am__dirstamp) src/sh/$(DEPDIR)/$(am__dirstamp) src/sh/ffi.lo: src/sh/$(am__dirstamp) src/sh/$(DEPDIR)/$(am__dirstamp)
src/sh64/$(am__dirstamp): src/sh64/$(am__dirstamp):
@$(mkdir_p) src/sh64 @$(MKDIR_P) src/sh64
@: > src/sh64/$(am__dirstamp) @: > src/sh64/$(am__dirstamp)
src/sh64/$(DEPDIR)/$(am__dirstamp): src/sh64/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) src/sh64/$(DEPDIR) @$(MKDIR_P) src/sh64/$(DEPDIR)
@: > src/sh64/$(DEPDIR)/$(am__dirstamp) @: > src/sh64/$(DEPDIR)/$(am__dirstamp)
src/sh64/sysv.lo: src/sh64/$(am__dirstamp) \ src/sh64/sysv.lo: src/sh64/$(am__dirstamp) \
src/sh64/$(DEPDIR)/$(am__dirstamp) src/sh64/$(DEPDIR)/$(am__dirstamp)
src/sh64/ffi.lo: src/sh64/$(am__dirstamp) \ src/sh64/ffi.lo: src/sh64/$(am__dirstamp) \
src/sh64/$(DEPDIR)/$(am__dirstamp) src/sh64/$(DEPDIR)/$(am__dirstamp)
src/pa/$(am__dirstamp): src/pa/$(am__dirstamp):
@$(mkdir_p) src/pa @$(MKDIR_P) src/pa
@: > src/pa/$(am__dirstamp) @: > src/pa/$(am__dirstamp)
src/pa/$(DEPDIR)/$(am__dirstamp): src/pa/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) src/pa/$(DEPDIR) @$(MKDIR_P) src/pa/$(DEPDIR)
@: > src/pa/$(DEPDIR)/$(am__dirstamp) @: > src/pa/$(DEPDIR)/$(am__dirstamp)
src/pa/linux.lo: src/pa/$(am__dirstamp) \ src/pa/linux.lo: src/pa/$(am__dirstamp) \
src/pa/$(DEPDIR)/$(am__dirstamp) src/pa/$(DEPDIR)/$(am__dirstamp)
src/pa/ffi.lo: src/pa/$(am__dirstamp) src/pa/$(DEPDIR)/$(am__dirstamp) src/pa/ffi.lo: src/pa/$(am__dirstamp) src/pa/$(DEPDIR)/$(am__dirstamp)
src/pa/hpux32.lo: src/pa/$(am__dirstamp) \
src/pa/$(DEPDIR)/$(am__dirstamp)
libffi.la: $(libffi_la_OBJECTS) $(libffi_la_DEPENDENCIES) libffi.la: $(libffi_la_OBJECTS) $(libffi_la_DEPENDENCIES)
$(LINK) -rpath $(toolexeclibdir) $(libffi_la_LDFLAGS) $(libffi_la_OBJECTS) $(libffi_la_LIBADD) $(LIBS) $(libffi_la_LINK) -rpath $(toolexeclibdir) $(libffi_la_OBJECTS) $(libffi_la_LIBADD) $(LIBS)
libffi_convenience.la: $(libffi_convenience_la_OBJECTS) $(libffi_convenience_la_DEPENDENCIES) libffi_convenience.la: $(libffi_convenience_la_OBJECTS) $(libffi_convenience_la_DEPENDENCIES)
$(LINK) $(libffi_convenience_la_LDFLAGS) $(libffi_convenience_la_OBJECTS) $(libffi_convenience_la_LIBADD) $(LIBS) $(LINK) $(libffi_convenience_la_OBJECTS) $(libffi_convenience_la_LIBADD) $(LIBS)
mostlyclean-compile: mostlyclean-compile:
-rm -f *.$(OBJEXT) -rm -f *.$(OBJEXT)
@@ -764,8 +715,6 @@ mostlyclean-compile:
-rm -f src/mips/o32.lo -rm -f src/mips/o32.lo
-rm -f src/pa/ffi.$(OBJEXT) -rm -f src/pa/ffi.$(OBJEXT)
-rm -f src/pa/ffi.lo -rm -f src/pa/ffi.lo
-rm -f src/pa/hpux32.$(OBJEXT)
-rm -f src/pa/hpux32.lo
-rm -f src/pa/linux.$(OBJEXT) -rm -f src/pa/linux.$(OBJEXT)
-rm -f src/pa/linux.lo -rm -f src/pa/linux.lo
-rm -f src/powerpc/aix.$(OBJEXT) -rm -f src/powerpc/aix.$(OBJEXT)
@@ -812,10 +761,6 @@ mostlyclean-compile:
-rm -f src/sparc/v9.lo -rm -f src/sparc/v9.lo
-rm -f src/types.$(OBJEXT) -rm -f src/types.$(OBJEXT)
-rm -f src/types.lo -rm -f src/types.lo
-rm -f src/x86/darwin.$(OBJEXT)
-rm -f src/x86/darwin.lo
-rm -f src/x86/darwin64.$(OBJEXT)
-rm -f src/x86/darwin64.lo
-rm -f src/x86/ffi.$(OBJEXT) -rm -f src/x86/ffi.$(OBJEXT)
-rm -f src/x86/ffi.lo -rm -f src/x86/ffi.lo
-rm -f src/x86/ffi64.$(OBJEXT) -rm -f src/x86/ffi64.$(OBJEXT)
@@ -836,52 +781,93 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/raw_api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/raw_api.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/types.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/types.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/alpha/$(DEPDIR)/ffi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/alpha/$(DEPDIR)/ffi.Plo@am__quote@
@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)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/arm/$(DEPDIR)/sysv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/cris/$(DEPDIR)/ffi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/cris/$(DEPDIR)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/cris/$(DEPDIR)/sysv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/frv/$(DEPDIR)/eabi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/frv/$(DEPDIR)/ffi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/frv/$(DEPDIR)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/ia64/$(DEPDIR)/ffi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ia64/$(DEPDIR)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/ia64/$(DEPDIR)/unix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/m32r/$(DEPDIR)/ffi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/m32r/$(DEPDIR)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/m32r/$(DEPDIR)/sysv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/m68k/$(DEPDIR)/ffi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/m68k/$(DEPDIR)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/m68k/$(DEPDIR)/sysv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/mips/$(DEPDIR)/ffi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/mips/$(DEPDIR)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/mips/$(DEPDIR)/n32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/mips/$(DEPDIR)/o32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/pa/$(DEPDIR)/ffi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/pa/$(DEPDIR)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/pa/$(DEPDIR)/linux.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/powerpc/$(DEPDIR)/aix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/powerpc/$(DEPDIR)/aix_closure.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/powerpc/$(DEPDIR)/darwin.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/powerpc/$(DEPDIR)/darwin_closure.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/powerpc/$(DEPDIR)/ffi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/powerpc/$(DEPDIR)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/powerpc/$(DEPDIR)/ffi_darwin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/powerpc/$(DEPDIR)/ffi_darwin.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/powerpc/$(DEPDIR)/linux64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/powerpc/$(DEPDIR)/linux64_closure.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/powerpc/$(DEPDIR)/ppc_closure.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/powerpc/$(DEPDIR)/sysv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/s390/$(DEPDIR)/ffi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/s390/$(DEPDIR)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/s390/$(DEPDIR)/sysv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/sh/$(DEPDIR)/ffi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/sh/$(DEPDIR)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/sh/$(DEPDIR)/sysv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/sh64/$(DEPDIR)/ffi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/sh64/$(DEPDIR)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/sh64/$(DEPDIR)/sysv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/sparc/$(DEPDIR)/ffi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/sparc/$(DEPDIR)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/sparc/$(DEPDIR)/v8.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/sparc/$(DEPDIR)/v9.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/ffi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/ffi64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/ffi64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/sysv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/unix64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/win32.Plo@am__quote@
.S.o: .S.o:
$(CCASCOMPILE) -c $< @am__fastdepCCAS_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCCAS_TRUE@ mv -f $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ $<
.S.obj: .S.obj:
$(CCASCOMPILE) -c `$(CYGPATH_W) '$<'` @am__fastdepCCAS_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCCAS_TRUE@ mv -f $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.S.lo: .S.lo:
$(LTCCASCOMPILE) -c -o $@ $< @am__fastdepCCAS_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
@am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCCAS_TRUE@ mv -f $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCCAS_FALSE@ $(LTCPPASCOMPILE) -c -o $@ $<
.c.o: .c.o:
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \ @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi @am__fastdepCC_TRUE@ mv -f $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< @am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
.c.obj: .c.obj:
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`; \ @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi @am__fastdepCC_TRUE@ mv -f $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo: .c.lo:
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \ @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi @am__fastdepCC_TRUE@ mv -f $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -910,7 +896,6 @@ clean-libtool:
distclean-libtool: distclean-libtool:
-rm -f libtool -rm -f libtool
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd # This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile. # into them and run `make' without going through this Makefile.
@@ -943,8 +928,7 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail" fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \ $(RECURSIVE_CLEAN_TARGETS):
maintainer-clean-recursive:
@failcom='exit 1'; \ @failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \ for f in x $$MAKEFLAGS; do \
case $$f in \ case $$f in \
@@ -1046,24 +1030,22 @@ distclean-tags:
distdir: $(DISTFILES) distdir: $(DISTFILES)
$(am__remove_distdir) $(am__remove_distdir)
mkdir $(distdir) test -d $(distdir) || mkdir $(distdir)
$(mkdir_p) $(distdir)/include $(distdir)/src/alpha $(distdir)/src/arm $(distdir)/src/cris $(distdir)/src/frv $(distdir)/src/m32r $(distdir)/src/m68k $(distdir)/src/mips $(distdir)/src/pa $(distdir)/src/powerpc $(distdir)/src/s390 $(distdir)/src/sh $(distdir)/src/sh64 $(distdir)/src/sparc $(distdir)/src/x86 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; \
list='$(DISTFILES)'; for file in $$list; do \ dist_files=`for file in $$list; do echo $$file; done | \
case $$file in \ sed -e "s|^$$srcdirstrip/||;t" \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ case $$dist_files in \
esac; \ */*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \ fi; \
@@ -1077,7 +1059,7 @@ distdir: $(DISTFILES)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \ if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \ test -d "$(distdir)/$$subdir" \
|| $(mkdir_p) "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \ || exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \ distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -1085,6 +1067,8 @@ distdir: $(DISTFILES)
$(MAKE) $(AM_MAKEFLAGS) \ $(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \ top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \ distdir="$$distdir/$$subdir" \
am__remove_distdir=: \
am__skip_length_check=: \
distdir) \ distdir) \
|| exit 1; \ || exit 1; \
fi; \ fi; \
@@ -1092,7 +1076,7 @@ distdir: $(DISTFILES)
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir) || chmod -R a+r $(distdir)
dist-gzip: distdir dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
@@ -1167,7 +1151,7 @@ distcheck: dist
$(am__remove_distdir) $(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \ @(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck: distuninstallcheck:
@cd $(distuninstallcheck_dir) \ @cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@@ -1192,7 +1176,7 @@ all-am: Makefile $(LTLIBRARIES) fficonfig.h
installdirs: installdirs-recursive installdirs: installdirs-recursive
installdirs-am: installdirs-am:
for dir in "$(DESTDIR)$(toolexeclibdir)"; do \ for dir in "$(DESTDIR)$(toolexeclibdir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done done
install: install-recursive install: install-recursive
install-exec: install-exec-recursive install-exec: install-exec-recursive
@@ -1274,12 +1258,20 @@ info-am:
install-data-am: install-data-am:
install-dvi: install-dvi-recursive
install-exec-am: install-toolexeclibLTLIBRARIES install-exec-am: install-toolexeclibLTLIBRARIES
install-html: install-html-recursive
install-info: install-info-recursive install-info: install-info-recursive
install-man: install-man:
install-pdf: install-pdf-recursive
install-ps: install-ps-recursive
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-recursive maintainer-clean: maintainer-clean-recursive
@@ -1302,33 +1294,30 @@ ps: ps-recursive
ps-am: ps-am:
uninstall-am: uninstall-info-am uninstall-toolexeclibLTLIBRARIES uninstall-am: uninstall-toolexeclibLTLIBRARIES
uninstall-info: uninstall-info-recursive .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-strip
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
check-am clean clean-generic clean-libtool \ all all-am am--refresh check check-am clean clean-generic \
clean-noinstLTLIBRARIES clean-recursive \ clean-libtool clean-noinstLTLIBRARIES \
clean-toolexeclibLTLIBRARIES ctags ctags-recursive dist \ clean-toolexeclibLTLIBRARIES ctags ctags-recursive dist \
dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \ dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \
distcheck distclean distclean-compile distclean-generic \ distcheck distclean distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-recursive \ distclean-hdr distclean-libtool distclean-tags distcleancheck \
distclean-tags distcleancheck distdir distuninstallcheck dvi \ distdir distuninstallcheck dvi dvi-am html html-am info \
dvi-am html html-am info info-am install install-am \ info-am install install-am install-data install-data-am \
install-data install-data-am install-exec install-exec-am \ install-dvi install-dvi-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \ install-html install-html-am install-info install-info-am \
install-toolexeclibLTLIBRARIES installcheck installcheck-am \ install-man install-pdf install-pdf-am install-ps \
installdirs installdirs-am maintainer-clean \ install-ps-am install-strip install-toolexeclibLTLIBRARIES \
maintainer-clean-generic maintainer-clean-recursive \ installcheck installcheck-am installdirs installdirs-am \
mostlyclean mostlyclean-compile mostlyclean-generic \ maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
tags tags-recursive uninstall uninstall-am uninstall-info-am \ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-toolexeclibLTLIBRARIES uninstall-toolexeclibLTLIBRARIES
# No install-html support
.PHONY: install-html
install-html:
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: .NOEXPORT:

View File

@@ -372,6 +372,15 @@ single-precision anyway. This causes one test to fail (the `many
arguments' test). arguments' test).
What's With The Crazy Comments?
===============================
You might notice a number of cryptic comments in the code, delimited
by /*@ and @*/. These are annotations read by the program LCLint, a
tool for statically checking C programs. You can read all about it at
<http://larch-www.lcs.mit.edu:8001/larch/lclint/index.html>.
History History
======= =======

809
libffi/aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,32 @@
# Configure fragment invoked in the post-target section for subdirs # Configure fragment invoked in the post-target section for subdirs
# wanting multilib support. # wanting multilib support.
# #
# Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
#
# Please report bugs to <gcc-bugs@gnu.org>
# and send patches to <gcc-patches@gnu.org>.
# It is advisable to support a few --enable/--disable options to let the # It is advisable to support a few --enable/--disable options to let the
# user select which libraries s/he really wants. # user select which libraries s/he really wants.
# #
@@ -64,11 +90,6 @@
# newlib. It is up to each target to turn on multilib support for the other # newlib. It is up to each target to turn on multilib support for the other
# libraries as desired. # libraries as desired.
# We have to handle being invoked by both Cygnus configure and Autoconf.
#
# Cygnus configure incoming variables:
# srcdir, subdir, host, arguments
#
# Autoconf incoming variables: # Autoconf incoming variables:
# srcdir, host, ac_configure_args # srcdir, host, ac_configure_args
# #
@@ -78,27 +99,20 @@
# Note that `host' in this case is GCC's `target'. Target libraries are # Note that `host' in this case is GCC's `target'. Target libraries are
# configured for a particular host. # configured for a particular host.
if [ -n "${ac_configure_args}" ]; then Makefile=${ac_file-Makefile}
Makefile=${ac_file-Makefile} ml_config_shell=${CONFIG_SHELL-/bin/sh}
ml_config_shell=${CONFIG_SHELL-/bin/sh} ml_realsrcdir=${srcdir}
ml_arguments="${ac_configure_args}"
ml_realsrcdir=${srcdir}
else
Makefile=${Makefile-Makefile}
ml_config_shell=${config_shell-/bin/sh}
ml_arguments="${arguments}"
if [ -n "${subdir}" -a "${subdir}" != "." ] ; then
ml_realsrcdir=${srcdir}/${subdir}
else
ml_realsrcdir=${srcdir}
fi
fi
# Scan all the arguments and set all the ones we need. # Scan all the arguments and set all the ones we need.
ml_verbose=--verbose ml_verbose=--verbose
for option in ${ml_arguments} for option in ${ac_configure_args}
do do
# strip single quotes surrounding individual options
case $option in
\'*\') eval option=$option ;;
esac
case $option in case $option in
--*) ;; --*) ;;
-*) option=-$option ;; -*) option=-$option ;;
@@ -123,7 +137,7 @@ do
enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'` enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
eval $enableopt="$optarg" eval $enableopt="$optarg"
;; ;;
--norecursion | --no*) --norecursion | --no-recursion)
ml_norecursion=yes ml_norecursion=yes
;; ;;
--silent | --sil* | --quiet | --q*) --silent | --sil* | --quiet | --q*)
@@ -392,6 +406,28 @@ mips*-*-*)
esac esac
;; ;;
powerpc*-*-* | rs6000*-*-*) powerpc*-*-* | rs6000*-*-*)
if [ x$enable_aix64 = xno ]
then
old_multidirs="${multidirs}"
multidirs=""
for x in ${old_multidirs}; do
case "$x" in
*ppc64* ) : ;;
*) multidirs="${multidirs} ${x}" ;;
esac
done
fi
if [ x$enable_pthread = xno ]
then
old_multidirs="${multidirs}"
multidirs=""
for x in ${old_multidirs}; do
case "$x" in
*pthread* ) : ;;
*) multidirs="${multidirs} ${x}" ;;
esac
done
fi
if [ x$enable_softfloat = xno ] if [ x$enable_softfloat = xno ]
then then
old_multidirs="${multidirs}" old_multidirs="${multidirs}"
@@ -458,17 +494,6 @@ powerpc*-*-* | rs6000*-*-*)
esac esac
done done
fi fi
if [ x$enable_aix = xno ]
then
old_multidirs="${multidirs}"
multidirs=""
for x in ${old_multidirs}; do
case "$x" in
*mcall-aix* ) : ;;
*) multidirs="${multidirs} ${x}" ;;
esac
done
fi
;; ;;
sparc*-*-*) sparc*-*-*)
case " $multidirs " in case " $multidirs " in
@@ -505,14 +530,16 @@ multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ]
cat > Multi.tem <<\EOF cat > Multi.tem <<\EOF
PWD_COMMAND=$${PWDCMD-pwd}
# FIXME: There should be an @-sign in front of the `if'. # FIXME: There should be an @-sign in front of the `if'.
# Leave out until this is tested a bit more. # Leave out until this is tested a bit more.
multi-do: multi-do:
if [ -z "$(MULTIDIRS)" ]; then \ if [ -z "$(MULTIDIRS)" ]; then \
true; \ true; \
else \ else \
rootpre=`pwd`/; export rootpre; \ rootpre=`${PWD_COMMAND}`/; export rootpre; \
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ srcrootpre=`cd $(srcdir); ${PWD_COMMAND}`/; export srcrootpre; \
lib=`echo $${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \ lib=`echo $${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \
compiler="$(CC)"; \ compiler="$(CC)"; \
for i in `$${compiler} --print-multi-lib 2>/dev/null`; do \ for i in `$${compiler} --print-multi-lib 2>/dev/null`; do \
@@ -524,6 +551,9 @@ multi-do:
flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \ flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \ if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(CFLAGS) $${flags}" \ CFLAGS="$(CFLAGS) $${flags}" \
FCFLAGS="$(FCFLAGS) $${flags}" \
FFLAGS="$(FFLAGS) $${flags}" \
ADAFLAGS="$(ADAFLAGS) $${flags}" \
prefix="$(prefix)" \ prefix="$(prefix)" \
exec_prefix="$(exec_prefix)" \ exec_prefix="$(exec_prefix)" \
GCJFLAGS="$(GCJFLAGS) $${flags}" \ GCJFLAGS="$(GCJFLAGS) $${flags}" \
@@ -531,6 +561,12 @@ multi-do:
LIBCFLAGS="$(LIBCFLAGS) $${flags}" \ LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \ LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
LDFLAGS="$(LDFLAGS) $${flags}" \ LDFLAGS="$(LDFLAGS) $${flags}" \
MULTIFLAGS="$${flags}" \
DESTDIR="$(DESTDIR)" \
INSTALL="$(INSTALL)" \
INSTALL_DATA="$(INSTALL_DATA)" \
INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \
INSTALL_SCRIPT="$(INSTALL_SCRIPT)" \
$(DO)); then \ $(DO)); then \
true; \ true; \
else \ else \
@@ -548,7 +584,7 @@ multi-clean:
if [ -z "$(MULTIDIRS)" ]; then \ if [ -z "$(MULTIDIRS)" ]; then \
true; \ true; \
else \ else \
lib=`pwd | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \ lib=`${PWD_COMMAND} | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
for dir in Makefile $(MULTIDIRS); do \ for dir in Makefile $(MULTIDIRS); do \
if [ -f ../$${dir}/$${lib}/Makefile ]; then \ if [ -f ../$${dir}/$${lib}/Makefile ]; then \
if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) $(DO)); \ if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) $(DO)); \
@@ -655,10 +691,10 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
if [ "${ml_verbose}" = --verbose ]; then if [ "${ml_verbose}" = --verbose ]; then
echo "Running configure in multilib subdirs ${multidirs}" echo "Running configure in multilib subdirs ${multidirs}"
echo "pwd: `pwd`" echo "pwd: `${PWDCMD-pwd}`"
fi fi
ml_origdir=`pwd` ml_origdir=`${PWDCMD-pwd}`
ml_libdir=`echo $ml_origdir | sed -e 's,^.*/,,'` ml_libdir=`echo $ml_origdir | sed -e 's,^.*/,,'`
# cd to top-level-build-dir/${with_target_subdir} # cd to top-level-build-dir/${with_target_subdir}
cd .. cd ..
@@ -667,7 +703,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
if [ "${ml_verbose}" = --verbose ]; then if [ "${ml_verbose}" = --verbose ]; then
echo "Running configure in multilib subdir ${ml_dir}" echo "Running configure in multilib subdir ${ml_dir}"
echo "pwd: `pwd`" echo "pwd: `${PWDCMD-pwd}`"
fi fi
if [ -d ${ml_dir} ]; then true; else if [ -d ${ml_dir} ]; then true; else
@@ -695,7 +731,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
case ${srcdir} in case ${srcdir} in
".") ".")
echo Building symlink tree in `pwd`/${ml_dir}/${ml_libdir} echo Building symlink tree in `${PWDCMD-pwd}`/${ml_dir}/${ml_libdir}
if [ "${with_target_subdir}" != "." ]; then if [ "${with_target_subdir}" != "." ]; then
ml_unsubdir="../" ml_unsubdir="../"
else else
@@ -734,11 +770,11 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
esac esac
# FIXME: POPDIR=${PWD=`pwd`} doesn't work here. # FIXME: POPDIR=${PWD=`pwd`} doesn't work here.
ML_POPDIR=`pwd` ML_POPDIR=`${PWDCMD-pwd}`
cd ${ml_dir}/${ml_libdir} cd ${ml_dir}/${ml_libdir}
if [ -f ${ml_newsrcdir}/configure ]; then if [ -f ${ml_newsrcdir}/configure ]; then
ml_recprog="${ml_newsrcdir}/configure --cache-file=../config.cache" ml_recprog="${ml_newsrcdir}/configure"
fi fi
# find compiler flag corresponding to ${ml_dir} # find compiler flag corresponding to ${ml_dir}
@@ -749,12 +785,14 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
break break
fi fi
done done
ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" GCJ="${GCJ_}$flags"' ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" GCJ="${GCJ_}$flags" GFORTRAN="${GFORTRAN_}$flags"'
if [ "${with_target_subdir}" = "." ]; then if [ "${with_target_subdir}" = "." ]; then
CC_=$CC' ' CC_=$CC' '
CXX_=$CXX' ' CXX_=$CXX' '
F77_=$F77' '
GCJ_=$GCJ' ' GCJ_=$GCJ' '
GFORTRAN_=$GFORTRAN' '
else else
# Create a regular expression that matches any string as long # Create a regular expression that matches any string as long
# as ML_POPDIR. # as ML_POPDIR.
@@ -783,6 +821,18 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
esac esac
done done
F77_=
for arg in ${F77}; do
case $arg in
-[BIL]"${ML_POPDIR}"/*)
F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
"${ML_POPDIR}"/*)
F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
*)
F77_="${F77_}${arg} " ;;
esac
done
GCJ_= GCJ_=
for arg in ${GCJ}; do for arg in ${GCJ}; do
case $arg in case $arg in
@@ -795,6 +845,18 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
esac esac
done done
GFORTRAN_=
for arg in ${GFORTRAN}; do
case $arg in
-[BIL]"${ML_POPDIR}"/*)
GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
"${ML_POPDIR}"/*)
GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
*)
GFORTRAN_="${GFORTRAN_}${arg} " ;;
esac
done
if test "x${LD_LIBRARY_PATH+set}" = xset; then if test "x${LD_LIBRARY_PATH+set}" = xset; then
LD_LIBRARY_PATH_= LD_LIBRARY_PATH_=
for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do
@@ -832,7 +894,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \ if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
--with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \ --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
${ml_arguments} ${ml_srcdiroption} ; then ${ac_configure_args} ${ml_srcdiroption} ; then
true true
else else
exit 1 exit 1

85
libffi/config.guess vendored
View File

@@ -1,9 +1,10 @@
#! /bin/sh #! /bin/sh
# Attempt to guess a canonical system name. # Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
timestamp='2005-07-08' timestamp='2007-05-17'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@@ -106,7 +107,7 @@ set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ; : ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -160,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*) machine=arm-unknown ;; arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;; sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;; sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac esac
# The Operating System including object format, if it has switched # The Operating System including object format, if it has switched
@@ -206,8 +208,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:ekkoBSD:*:*) *:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;; exit ;;
*:SolidBSD:*:*)
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*) macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE} echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;; exit ;;
*:MirBSD:*:*) *:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -325,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;; exit ;;
i86pc:SunOS:5.*:*) i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;; exit ;;
sun4*:SunOS:6*:*) sun4*:SunOS:6*:*)
@@ -764,12 +769,19 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;; exit ;;
*:FreeBSD:*:*) *:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` case ${UNAME_MACHINE} in
pc98)
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;; exit ;;
i*:CYGWIN*:*) i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin echo ${UNAME_MACHINE}-pc-cygwin
exit ;; exit ;;
i*:MINGW*:*) *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32 echo ${UNAME_MACHINE}-pc-mingw32
exit ;; exit ;;
i*:windows32*:*) i*:windows32*:*)
@@ -779,9 +791,15 @@ EOF
i*:PW*:*) i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32 echo ${UNAME_MACHINE}-pc-pw32
exit ;; exit ;;
x86:Interix*:[34]*) *:Interix*:[3456]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' case ${UNAME_MACHINE} in
exit ;; x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
EM64T | authenticamd)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks echo i${UNAME_MACHINE}-pc-mks
exit ;; exit ;;
@@ -794,7 +812,7 @@ EOF
i*:UWIN*:*) i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin echo ${UNAME_MACHINE}-pc-uwin
exit ;; exit ;;
amd64:CYGWIN*:*:*) amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin echo x86_64-unknown-cygwin
exit ;; exit ;;
p*:CYGWIN*:*) p*:CYGWIN*:*)
@@ -817,6 +835,9 @@ EOF
arm*:Linux:*:*) arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;; exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*) cris:Linux:*:*)
echo cris-axis-linux-gnu echo cris-axis-linux-gnu
exit ;; exit ;;
@@ -851,7 +872,11 @@ EOF
#endif #endif
#endif #endif
EOF EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;; ;;
mips64:Linux:*:*) mips64:Linux:*:*)
@@ -870,9 +895,16 @@ EOF
#endif #endif
#endif #endif
EOF EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;; ;;
or32:Linux:*:*)
echo or32-unknown-linux-gnu
exit ;;
ppc:Linux:*:*) ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu echo powerpc-unknown-linux-gnu
exit ;; exit ;;
@@ -916,9 +948,15 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*) sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;; exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*) x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu echo x86_64-unknown-linux-gnu
exit ;; exit ;;
xtensa:Linux:*:*)
echo xtensa-unknown-linux-gnu
exit ;;
i*86:Linux:*:*) i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so # The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent # first see if it will tell us. cd to the root directory to prevent
@@ -961,7 +999,7 @@ EOF
LIBC=gnulibc1 LIBC=gnulibc1
# endif # endif
#else #else
#ifdef __INTEL_COMPILER #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu LIBC=gnu
#else #else
LIBC=gnuaout LIBC=gnuaout
@@ -971,7 +1009,11 @@ EOF
LIBC=dietlibc LIBC=dietlibc
#endif #endif
EOF EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^LIBC/{
s: ::g
p
}'`"
test x"${LIBC}" != x && { test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}" echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit exit
@@ -1173,6 +1215,15 @@ EOF
SX-6:SUPER-UX:*:*) SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE} echo sx6-nec-superux${UNAME_RELEASE}
exit ;; exit ;;
SX-7:SUPER-UX:*:*)
echo sx7-nec-superux${UNAME_RELEASE}
exit ;;
SX-8:SUPER-UX:*:*)
echo sx8-nec-superux${UNAME_RELEASE}
exit ;;
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*) Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE} echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;; exit ;;
@@ -1182,7 +1233,6 @@ EOF
*:Darwin:*:*) *:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in case $UNAME_PROCESSOR in
*86) UNAME_PROCESSOR=i686 ;;
unknown) UNAME_PROCESSOR=powerpc ;; unknown) UNAME_PROCESSOR=powerpc ;;
esac esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1261,6 +1311,9 @@ EOF
i*86:skyos:*:*) i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;; exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
esac esac
#echo '(No uname command or uname output not recognized.)' 1>&2 #echo '(No uname command or uname output not recognized.)' 1>&2

113
libffi/config.sub vendored
View File

@@ -1,9 +1,10 @@
#! /bin/sh #! /bin/sh
# Configuration validation subroutine script. # Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
timestamp='2005-07-08' timestamp='2007-04-29'
# This file is (in principle) common to ALL GNU software. # This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software # The presence of a machine in this file suggests that SOME GNU software
@@ -119,8 +120,9 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations. # Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;; ;;
@@ -171,6 +173,10 @@ case $os in
-hiux*) -hiux*)
os=-hiuxwe2 os=-hiuxwe2
;; ;;
-sco6)
os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5) -sco5)
os=-sco3.2v5 os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -187,6 +193,10 @@ case $os in
# Don't forget version if it is 3.2v4 or newer. # Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;; ;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*) -sco*)
os=-sco3.2v2 os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -231,15 +241,16 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \ | am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \ | bfin \
| c4x | clipper \ | c4x | clipper \
| d10v | d30v | dlx | dsp16xx \ | d10v | d30v | dlx | dsp16xx \
| fr30 | frv \ | fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \ | i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \ | ip2k | iq2000 \
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep \
| mips | mipsbe | mipseb | mipsel | mipsle \ | mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \ | mips16 \
| mips64 | mips64el \ | mips64 | mips64el \
@@ -257,28 +268,27 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \ | mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \ | mipstx39 | mipstx39el \
| mn10200 | mn10300 \ | mn10200 | mn10300 \
| ms1 \ | mt \
| msp430 \ | msp430 \
| nios | nios2 \
| ns16k | ns32k \ | ns16k | ns32k \
| or32 \ | or32 \
| pdp10 | pdp11 | pj | pjl \ | pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \ | pyramid \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | score \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \ | sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| strongarm \ | spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \ | tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \ | v850 | v850e \
| we32k \ | we32k \
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k) | z8k)
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
;; ;;
m32c)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12) m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12. # Motorola 68HC11/12.
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
@@ -286,6 +296,9 @@ case $basic_machine in
;; ;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;; ;;
ms1)
basic_machine=mt-unknown
;;
# We use `pc' rather than `unknown' # We use `pc' rather than `unknown'
# because (1) that's what they normally are, and # because (1) that's what they normally are, and
@@ -305,18 +318,18 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \ | avr-* | avr32-* \
| bfin-* | bs2000-* \ | bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \ | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \ | d10v-* | d30v-* | dlx-* \
| elxsi-* \ | elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \ | h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \ | i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \ | ip2k-* | iq2000-* \
| m32r-* | m32rle-* \ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \ | m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -336,31 +349,30 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \ | mipstx39-* | mipstx39el-* \
| mmix-* \ | mmix-* \
| ms1-* \ | mt-* \
| msp430-* \ | msp430-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \ | none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \ | orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \ | pyramid-* \
| romp-* | rs6000-* \ | romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \ | sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \ | tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \ | tron-* \
| v850-* | v850e-* | vax-* \ | v850-* | v850e-* | vax-* \
| we32k-* \ | we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \ | xstormy16-* | xtensa-* \
| ymp-* \ | ymp-* \
| z8k-*) | z8k-*)
;; ;;
m32c-*)
;;
# Recognize the various machine names and aliases which stand # Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS. # for a CPU type and a company and sometimes even an OS.
386bsd) 386bsd)
@@ -671,6 +683,10 @@ case $basic_machine in
basic_machine=i386-pc basic_machine=i386-pc
os=-mingw32 os=-mingw32
;; ;;
mingw32ce)
basic_machine=arm-unknown
os=-mingw32ce
;;
miniframe) miniframe)
basic_machine=m68000-convergent basic_machine=m68000-convergent
;; ;;
@@ -696,6 +712,9 @@ case $basic_machine in
basic_machine=i386-pc basic_machine=i386-pc
os=-msdos os=-msdos
;; ;;
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
mvs) mvs)
basic_machine=i370-ibm basic_machine=i370-ibm
os=-mvs os=-mvs
@@ -803,6 +822,12 @@ case $basic_machine in
pc532 | pc532-*) pc532 | pc532-*)
basic_machine=ns32k-pc532 basic_machine=ns32k-pc532
;; ;;
pc98)
basic_machine=i386-pc
;;
pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3) pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc basic_machine=i586-pc
;; ;;
@@ -859,6 +884,10 @@ case $basic_machine in
basic_machine=i586-unknown basic_machine=i586-unknown
os=-pw32 os=-pw32
;; ;;
rdos)
basic_machine=i386-pc
os=-rdos
;;
rom68k) rom68k)
basic_machine=m68k-rom68k basic_machine=m68k-rom68k
os=-coff os=-coff
@@ -885,6 +914,10 @@ case $basic_machine in
sb1el) sb1el)
basic_machine=mipsisa64sb1el-unknown basic_machine=mipsisa64sb1el-unknown
;; ;;
sde)
basic_machine=mipsisa32-sde
os=-elf
;;
sei) sei)
basic_machine=mips-sei basic_machine=mips-sei
os=-seiux os=-seiux
@@ -896,6 +929,9 @@ case $basic_machine in
basic_machine=sh-hitachi basic_machine=sh-hitachi
os=-hms os=-hms
;; ;;
sh5el)
basic_machine=sh5le-unknown
;;
sh64) sh64)
basic_machine=sh64-unknown basic_machine=sh64-unknown
;; ;;
@@ -1101,7 +1137,7 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown basic_machine=sh-unknown
;; ;;
sparc | sparcv8 | sparcv9 | sparcv9b) sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun basic_machine=sparc-sun
;; ;;
cydra) cydra)
@@ -1174,21 +1210,23 @@ case $os in
| -aos* \ | -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \ | -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku*) | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
# Remember, each alternative MUST END IN *, to match a version number. # Remember, each alternative MUST END IN *, to match a version number.
;; ;;
-qnx*) -qnx*)
@@ -1340,6 +1378,12 @@ else
# system, and we'll never get to this point. # system, and we'll never get to this point.
case $basic_machine in case $basic_machine in
score-*)
os=-elf
;;
spu-*)
os=-elf
;;
*-acorn) *-acorn)
os=-riscix1.2 os=-riscix1.2
;; ;;
@@ -1349,9 +1393,9 @@ case $basic_machine in
arm*-semi) arm*-semi)
os=-aout os=-aout
;; ;;
c4x-* | tic4x-*) c4x-* | tic4x-*)
os=-coff os=-coff
;; ;;
# This must come before the *-dec entry. # This must come before the *-dec entry.
pdp10-*) pdp10-*)
os=-tops20 os=-tops20
@@ -1377,6 +1421,9 @@ case $basic_machine in
m68*-cisco) m68*-cisco)
os=-aout os=-aout
;; ;;
mep-*)
os=-elf
;;
mips*-cisco) mips*-cisco)
os=-elf os=-elf
;; ;;

10425
libffi/configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -5,8 +5,6 @@ AC_PREREQ(2.59)
AC_INIT([libffi], [2.1], [http://gcc.gnu.org/bugs.html]) AC_INIT([libffi], [2.1], [http://gcc.gnu.org/bugs.html])
AC_CONFIG_HEADERS([fficonfig.h]) AC_CONFIG_HEADERS([fficonfig.h])
dnl LIBFFI LOCAL: no multilib here.
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
target_alias=${target_alias-$host_alias} target_alias=${target_alias-$host_alias}
@@ -46,7 +44,6 @@ i*86-*-gnu*) TARGET=X86; TARGETDIR=x86;;
i*86-*-solaris2.1[[0-9]]*) TARGET=X86_64; TARGETDIR=x86;; i*86-*-solaris2.1[[0-9]]*) TARGET=X86_64; TARGETDIR=x86;;
i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;; i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;;
i*86-*-beos*) TARGET=X86; TARGETDIR=x86;; i*86-*-beos*) TARGET=X86; TARGETDIR=x86;;
i*86-*-darwin*) TARGET=X86_DARWIN; TARGETDIR=x86;;
i*86-*-freebsd* | i*86-*-kfreebsd*-gnu) TARGET=X86; TARGETDIR=x86;; i*86-*-freebsd* | i*86-*-kfreebsd*-gnu) TARGET=X86; TARGETDIR=x86;;
i*86-*-netbsdelf* | i*86-*-knetbsd*-gnu) TARGET=X86; TARGETDIR=x86;; i*86-*-netbsdelf* | i*86-*-knetbsd*-gnu) TARGET=X86; TARGETDIR=x86;;
i*86-*-rtems*) TARGET=X86; TARGETDIR=x86;; i*86-*-rtems*) TARGET=X86; TARGETDIR=x86;;
@@ -58,7 +55,7 @@ sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;; sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
sparc-*-linux* | sparc-*-netbsdelf* | sparc-*-knetbsd*-gnu) TARGET=SPARC; TARGETDIR=sparc;; sparc-*-linux* | sparc-*-netbsdelf* | sparc-*-knetbsd*-gnu) TARGET=SPARC; TARGETDIR=sparc;;
sparc*-*-rtems*) TARGET=SPARC; TARGETDIR=sparc;; sparc*-*-rtems*) TARGET=SPARC; TARGETDIR=sparc;;
sparc64-*-linux* | sparc64-*-freebsd* | sparc64-*-netbsd* | sparc64-*-knetbsd*-gnu) TARGET=SPARC; TARGETDIR=sparc;; sparc64-*-linux* | sparc64-*-netbsd* | sparc64-*-knetbsd*-gnu) TARGET=SPARC; TARGETDIR=sparc;;
alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-netbsd* | alpha*-*-knetbsd*-gnu) TARGET=ALPHA; TARGETDIR=alpha;; alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-netbsd* | alpha*-*-knetbsd*-gnu) TARGET=ALPHA; TARGETDIR=alpha;;
ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;; ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
m32r*-*-linux* ) TARGET=M32R; TARGETDIR=m32r;; m32r*-*-linux* ) TARGET=M32R; TARGETDIR=m32r;;
@@ -80,13 +77,10 @@ cris-*-*) TARGET=LIBFFI_CRIS; TARGETDIR=cris;;
s390-*-linux-*) TARGET=S390; TARGETDIR=s390;; s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;; s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
x86_64-*-linux* | x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) TARGET=X86_64; TARGETDIR=x86;; x86_64-*-linux* | x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) TARGET=X86_64; TARGETDIR=x86;;
x86_64-*-darwin*) TARGET=X86_DARWIN; TARGETDIR=x86;;
sh-*-linux* | sh[[34]]*-*-linux*) TARGET=SH; TARGETDIR=sh;; sh-*-linux* | sh[[34]]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
sh-*-rtems*) TARGET=SH; TARGETDIR=sh;; sh-*-rtems*) TARGET=SH; TARGETDIR=sh;;
sh64-*-linux* | sh5*-*-linux*) TARGET=SH64; TARGETDIR=sh64;; sh64-*-linux* | sh5*-*-linux*) TARGET=SH64; TARGETDIR=sh64;;
hppa*-*-linux* | parisc*-*-linux*) TARGET=PA_LINUX; TARGETDIR=pa;; hppa-*-linux* | parisc-*-linux*) TARGET=PA; TARGETDIR=pa;;
hppa*64-*-hpux*) TARGET=PA64_HPUX; TARGETDIR=pa;;
hppa*-*-hpux*) TARGET=PA_HPUX; TARGETDIR=pa;;
esac esac
AC_SUBST(AM_RUNTESTFLAGS) AC_SUBST(AM_RUNTESTFLAGS)
@@ -100,7 +94,6 @@ AM_CONDITIONAL(MIPS_LINUX, test x$TARGET = xMIPS_LINUX)
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC) AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
AM_CONDITIONAL(X86, test x$TARGET = xX86) AM_CONDITIONAL(X86, test x$TARGET = xX86)
AM_CONDITIONAL(X86_WIN32, test x$TARGET = xX86_WIN32) AM_CONDITIONAL(X86_WIN32, test x$TARGET = xX86_WIN32)
AM_CONDITIONAL(X86_DARWIN, test x$TARGET = xX86_DARWIN)
AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA) AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
AM_CONDITIONAL(IA64, test x$TARGET = xIA64) AM_CONDITIONAL(IA64, test x$TARGET = xIA64)
AM_CONDITIONAL(M32R, test x$TARGET = xM32R) AM_CONDITIONAL(M32R, test x$TARGET = xM32R)
@@ -116,9 +109,7 @@ AM_CONDITIONAL(S390, test x$TARGET = xS390)
AM_CONDITIONAL(X86_64, test x$TARGET = xX86_64) AM_CONDITIONAL(X86_64, test x$TARGET = xX86_64)
AM_CONDITIONAL(SH, test x$TARGET = xSH) AM_CONDITIONAL(SH, test x$TARGET = xSH)
AM_CONDITIONAL(SH64, test x$TARGET = xSH64) AM_CONDITIONAL(SH64, test x$TARGET = xSH64)
AM_CONDITIONAL(PA_LINUX, test x$TARGET = xPA_LINUX) AM_CONDITIONAL(PA, test x$TARGET = xPA)
AM_CONDITIONAL(PA_HPUX, test x$TARGET = xPA_HPUX)
AM_CONDITIONAL(PA64_HPUX, test x$TARGET = xPA64_HPUX)
case x$TARGET in case x$TARGET in
xMIPS*) TARGET=MIPS ;; xMIPS*) TARGET=MIPS ;;

View File

@@ -1,9 +1,10 @@
#! /bin/sh #! /bin/sh
# depcomp - compile a program generating dependencies as side-effects # depcomp - compile a program generating dependencies as side-effects
scriptversion=2005-07-09.11 scriptversion=2006-10-15.18
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -91,7 +92,20 @@ gcc3)
## gcc 3 implements dependency tracking that does exactly what ## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm. ## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile" ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$? stat=$?
if test $stat -eq 0; then : if test $stat -eq 0; then :
else else
@@ -276,6 +290,46 @@ icc)
rm -f "$tmpdepfile" rm -f "$tmpdepfile"
;; ;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64) tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side # The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@@ -288,13 +342,13 @@ tru64)
if test "$libtool" = yes; then if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a # With Tru64 cc, shared objects can also be used to make a
# static library. This mecanism is used in libtool 1.4 series to # static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation. # handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
# #
# With libtool 1.5 this exception was removed, and libtool now # With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two # generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in in $dir.libs/$base.o.d and # compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because # in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer # one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is # $dir$base.o.d over $dir.libs/$base.o.d because the latter is

View File

@@ -112,15 +112,15 @@
/* Define to the version of this package. */ /* Define to the version of this package. */
#undef PACKAGE_VERSION #undef PACKAGE_VERSION
/* The size of a `double', as computed by sizeof. */ /* The size of `double', as computed by sizeof. */
#undef SIZEOF_DOUBLE #undef SIZEOF_DOUBLE
/* The size of a `long double', as computed by sizeof. */ /* The size of `long double', as computed by sizeof. */
#undef SIZEOF_LONG_DOUBLE #undef SIZEOF_LONG_DOUBLE
/* If using the C implementation of alloca, define if you know the /* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be direction of stack growth for your system; otherwise it will be
automatically deduced at run-time. automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */ STACK_DIRECTION = 0 => direction of growth unknown */

View File

@@ -5,5 +5,12 @@ AUTOMAKE_OPTIONS=foreign
DISTCLEANFILES=ffitarget.h DISTCLEANFILES=ffitarget.h
EXTRA_DIST=ffi.h.in ffi_common.h EXTRA_DIST=ffi.h.in ffi_common.h
## LIBFFI LOCAL: install in includedir. hackdir=$(includedir)
include_HEADERS = ffi.h ffitarget.h
hack_DATA= ffi.h
# Where generated headers like ffitarget.h get installed.
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
toollibffidir := $(libdir)/gcc/$(target_alias)/$(gcc_version)/include/libffi
toollibffi_HEADERS = ffitarget.h

View File

@@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am. # Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -14,15 +14,12 @@
@SET_MAKE@ @SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644 install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c
@@ -38,14 +35,14 @@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
target_triplet = @target@ target_triplet = @target@
subdir = include subdir = include
DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/Makefile.in $(srcdir)/ffi.h.in $(srcdir)/ffi.h.in $(toollibffi_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/fficonfig.h CONFIG_HEADER = $(top_builddir)/fficonfig.h
CONFIG_CLEAN_FILES = ffi.h ffitarget.h CONFIG_CLEAN_FILES = ffi.h ffitarget.h
SOURCES = SOURCES =
@@ -56,29 +53,26 @@ am__vpath_adj = case $$p in \
*) f=$$p;; \ *) f=$$p;; \
esac; esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(includedir)" am__installdirs = "$(DESTDIR)$(hackdir)" "$(DESTDIR)$(toollibffidir)"
includeHEADERS_INSTALL = $(INSTALL_HEADER) hackDATA_INSTALL = $(INSTALL_DATA)
HEADERS = $(include_HEADERS) DATA = $(hack_DATA)
toollibffiHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(toollibffi_HEADERS)
ETAGS = etags ETAGS = etags
CTAGS = ctags CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@ ALLOCA = @ALLOCA@
ALPHA_FALSE = @ALPHA_FALSE@
ALPHA_TRUE = @ALPHA_TRUE@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@ AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
AR = @AR@ AR = @AR@
ARM_FALSE = @ARM_FALSE@
ARM_TRUE = @ARM_TRUE@
AUTOCONF = @AUTOCONF@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
CC = @CC@ CC = @CC@
CCAS = @CCAS@ CCAS = @CCAS@
CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@ CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
@@ -99,38 +93,23 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
F77 = @F77@ F77 = @F77@
FFLAGS = @FFLAGS@ FFLAGS = @FFLAGS@
FRV_FALSE = @FRV_FALSE@ GREP = @GREP@
FRV_TRUE = @FRV_TRUE@
HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@ HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@
IA64_FALSE = @IA64_FALSE@ INSTALL = @INSTALL@
IA64_TRUE = @IA64_TRUE@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBFFI_CRIS_FALSE = @LIBFFI_CRIS_FALSE@
LIBFFI_CRIS_TRUE = @LIBFFI_CRIS_TRUE@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
M32R_FALSE = @M32R_FALSE@
M32R_TRUE = @M32R_TRUE@
M68K_FALSE = @M68K_FALSE@
M68K_TRUE = @M68K_TRUE@
MAINT = @MAINT@ MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MIPS_IRIX_FALSE = @MIPS_IRIX_FALSE@ MKDIR_P = @MKDIR_P@
MIPS_IRIX_TRUE = @MIPS_IRIX_TRUE@
MIPS_LINUX_FALSE = @MIPS_LINUX_FALSE@
MIPS_LINUX_TRUE = @MIPS_LINUX_TRUE@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PA64_HPUX_FALSE = @PA64_HPUX_FALSE@
PA64_HPUX_TRUE = @PA64_HPUX_TRUE@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME = @PACKAGE_NAME@
@@ -138,53 +117,21 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PA_HPUX_FALSE = @PA_HPUX_FALSE@
PA_HPUX_TRUE = @PA_HPUX_TRUE@
PA_LINUX_FALSE = @PA_LINUX_FALSE@
PA_LINUX_TRUE = @PA_LINUX_TRUE@
POWERPC_AIX_FALSE = @POWERPC_AIX_FALSE@
POWERPC_AIX_TRUE = @POWERPC_AIX_TRUE@
POWERPC_DARWIN_FALSE = @POWERPC_DARWIN_FALSE@
POWERPC_DARWIN_TRUE = @POWERPC_DARWIN_TRUE@
POWERPC_FALSE = @POWERPC_FALSE@
POWERPC_FREEBSD_FALSE = @POWERPC_FREEBSD_FALSE@
POWERPC_FREEBSD_TRUE = @POWERPC_FREEBSD_TRUE@
POWERPC_TRUE = @POWERPC_TRUE@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
S390_FALSE = @S390_FALSE@ SED = @SED@
S390_TRUE = @S390_TRUE@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SH64_FALSE = @SH64_FALSE@
SH64_TRUE = @SH64_TRUE@
SHELL = @SHELL@ SHELL = @SHELL@
SH_FALSE = @SH_FALSE@
SH_TRUE = @SH_TRUE@
SPARC_FALSE = @SPARC_FALSE@
SPARC_TRUE = @SPARC_TRUE@
STRIP = @STRIP@ STRIP = @STRIP@
TARGET = @TARGET@ TARGET = @TARGET@
TARGETDIR = @TARGETDIR@ TARGETDIR = @TARGETDIR@
TESTSUBDIR_FALSE = @TESTSUBDIR_FALSE@
TESTSUBDIR_TRUE = @TESTSUBDIR_TRUE@
VERSION = @VERSION@ VERSION = @VERSION@
X86_64_FALSE = @X86_64_FALSE@ abs_builddir = @abs_builddir@
X86_64_TRUE = @X86_64_TRUE@ abs_srcdir = @abs_srcdir@
X86_DARWIN_FALSE = @X86_DARWIN_FALSE@ abs_top_builddir = @abs_top_builddir@
X86_DARWIN_TRUE = @X86_DARWIN_TRUE@ abs_top_srcdir = @abs_top_srcdir@
X86_FALSE = @X86_FALSE@
X86_TRUE = @X86_TRUE@
X86_WIN32_FALSE = @X86_WIN32_FALSE@
X86_WIN32_TRUE = @X86_WIN32_TRUE@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@ ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
@@ -196,26 +143,35 @@ build_alias = @build_alias@
build_cpu = @build_cpu@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host = @host@ host = @host@
host_alias = @host_alias@ host_alias = @host_alias@
host_cpu = @host_cpu@ host_cpu = @host_cpu@
host_os = @host_os@ host_os = @host_os@
host_vendor = @host_vendor@ host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@ includedir = @includedir@
infodir = @infodir@ infodir = @infodir@
install_sh = @install_sh@ install_sh = @install_sh@
libdir = @libdir@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
target = @target@ target = @target@
target_alias = @target_alias@ target_alias = @target_alias@
@@ -224,10 +180,18 @@ target_os = @target_os@
target_vendor = @target_vendor@ target_vendor = @target_vendor@
toolexecdir = @toolexecdir@ toolexecdir = @toolexecdir@
toolexeclibdir = @toolexeclibdir@ toolexeclibdir = @toolexeclibdir@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
DISTCLEANFILES = ffitarget.h DISTCLEANFILES = ffitarget.h
EXTRA_DIST = ffi.h.in ffi_common.h EXTRA_DIST = ffi.h.in ffi_common.h
include_HEADERS = ffi.h ffitarget.h hackdir = $(includedir)
hack_DATA = ffi.h
# Where generated headers like ffitarget.h get installed.
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
toollibffidir := $(libdir)/gcc/$(target_alias)/$(gcc_version)/include/libffi
toollibffi_HEADERS = ffitarget.h
all: all-am all: all-am
.SUFFIXES: .SUFFIXES:
@@ -268,26 +232,39 @@ mostlyclean-libtool:
clean-libtool: clean-libtool:
-rm -rf .libs _libs -rm -rf .libs _libs
install-hackDATA: $(hack_DATA)
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" test -z "$(hackdir)" || $(MKDIR_P) "$(DESTDIR)$(hackdir)"
@list='$(include_HEADERS)'; for p in $$list; do \ @list='$(hack_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \ f=$(am__strip_dir) \
echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ echo " $(hackDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(hackdir)/$$f'"; \
$(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ $(hackDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(hackdir)/$$f"; \
done done
uninstall-includeHEADERS: uninstall-hackDATA:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(include_HEADERS)'; for p in $$list; do \ @list='$(hack_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \ f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ echo " rm -f '$(DESTDIR)$(hackdir)/$$f'"; \
rm -f "$(DESTDIR)$(includedir)/$$f"; \ rm -f "$(DESTDIR)$(hackdir)/$$f"; \
done
install-toollibffiHEADERS: $(toollibffi_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(toollibffidir)" || $(MKDIR_P) "$(DESTDIR)$(toollibffidir)"
@list='$(toollibffi_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(toollibffiHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(toollibffidir)/$$f'"; \
$(toollibffiHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(toollibffidir)/$$f"; \
done
uninstall-toollibffiHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(toollibffi_HEADERS)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(toollibffidir)/$$f'"; \
rm -f "$(DESTDIR)$(toollibffidir)/$$f"; \
done done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -339,22 +316,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES) distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; for file in $$list; do \ list='$(DISTFILES)'; \
case $$file in \ dist_files=`for file in $$list; do echo $$file; done | \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ sed -e "s|^$$srcdirstrip/||;t" \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
esac; \ case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \ fi; \
@@ -367,10 +343,10 @@ distdir: $(DISTFILES)
done done
check-am: all-am check-am: all-am
check: check-am check: check-am
all-am: Makefile $(HEADERS) all-am: Makefile $(DATA) $(HEADERS)
installdirs: installdirs:
for dir in "$(DESTDIR)$(includedir)"; do \ for dir in "$(DESTDIR)$(hackdir)" "$(DESTDIR)$(toollibffidir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done done
install: install-am install: install-am
install-exec: install-exec-am install-exec: install-exec-am
@@ -403,8 +379,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am distclean: distclean-am
-rm -f Makefile -rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool \ distclean-am: clean-am distclean-generic distclean-tags
distclean-tags
dvi: dvi-am dvi: dvi-am
@@ -416,14 +391,22 @@ info: info-am
info-am: info-am:
install-data-am: install-includeHEADERS install-data-am: install-hackDATA install-toollibffiHEADERS
install-dvi: install-dvi-am
install-exec-am: install-exec-am:
install-html: install-html-am
install-info: install-info-am install-info: install-info-am
install-man: install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
@@ -442,19 +425,23 @@ ps: ps-am
ps-am: ps-am:
uninstall-am: uninstall-includeHEADERS uninstall-info-am uninstall-am: uninstall-hackDATA uninstall-toollibffiHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool ctags distclean distclean-generic \ clean-libtool ctags distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \ distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \ html-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am \ install-data-am install-dvi install-dvi-am install-exec \
install-includeHEADERS install-info install-info-am \ install-exec-am install-hackDATA install-html install-html-am \
install-man install-strip installcheck installcheck-am \ install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
install-toollibffiHEADERS installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \ installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS \ ps ps-am tags uninstall uninstall-am uninstall-hackDATA \
uninstall-info-am uninstall-toollibffiHEADERS
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.

View File

@@ -112,24 +112,16 @@ extern "C" {
#error "int size not supported" #error "int size not supported"
#endif #endif
#define ffi_type_ulong ffi_type_uint64
#define ffi_type_slong ffi_type_sint64
#if LONG_MAX == 2147483647 #if LONG_MAX == 2147483647
# if FFI_LONG_LONG_MAX != 9223372036854775807 # if FFI_LONG_LONG_MAX != 9223372036854775807
#error "no 64-bit data type supported" #error "no 64-bit data type supported"
# endif # endif
#elif LONG_MAX != 9223372036854775807 #elif LONG_MAX != 9223372036854775807
#error "long size not supported" #error "long size not supported"
#endif #endif
#if LONG_MAX == 2147483647
# define ffi_type_ulong ffi_type_uint32
# define ffi_type_slong ffi_type_sint32
#elif LONG_MAX == 9223372036854775807
# define ffi_type_ulong ffi_type_uint64
# define ffi_type_slong ffi_type_sint64
#else
#error "long size not supported"
#endif
/* The closure code assumes that this works on pointers, i.e. a size_t */ /* The closure code assumes that this works on pointers, i.e. a size_t */
/* can hold a pointer. */ /* can hold a pointer. */
@@ -138,7 +130,7 @@ typedef struct _ffi_type
size_t size; size_t size;
unsigned short alignment; unsigned short alignment;
unsigned short type; unsigned short type;
struct _ffi_type **elements; /*@null@*/ struct _ffi_type **elements;
} ffi_type; } ffi_type;
/* These are defined in types.c */ /* These are defined in types.c */
@@ -168,8 +160,8 @@ typedef unsigned FFI_TYPE;
typedef struct { typedef struct {
ffi_abi abi; ffi_abi abi;
unsigned nargs; unsigned nargs;
ffi_type **arg_types; /*@dependent@*/ ffi_type **arg_types;
ffi_type *rtype; /*@dependent@*/ ffi_type *rtype;
unsigned bytes; unsigned bytes;
unsigned flags; unsigned flags;
#ifdef FFI_EXTRA_CIF_FIELDS #ifdef FFI_EXTRA_CIF_FIELDS
@@ -195,10 +187,10 @@ typedef union {
void* ptr; void* ptr;
} ffi_raw; } ffi_raw;
void ffi_raw_call (ffi_cif *cif, void ffi_raw_call (/*@dependent@*/ ffi_cif *cif,
void (*fn)(), void (*fn)(),
void *rvalue, /*@out@*/ void *rvalue,
ffi_raw *avalue); /*@dependent@*/ ffi_raw *avalue);
void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw); void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args); void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
@@ -208,10 +200,10 @@ size_t ffi_raw_size (ffi_cif *cif);
/* packing, even on 64-bit machines. I.e. on 64-bit machines */ /* packing, even on 64-bit machines. I.e. on 64-bit machines */
/* longs and doubles are followed by an empty 64-bit word. */ /* longs and doubles are followed by an empty 64-bit word. */
void ffi_java_raw_call (ffi_cif *cif, void ffi_java_raw_call (/*@dependent@*/ ffi_cif *cif,
void (*fn)(), void (*fn)(),
void *rvalue, /*@out@*/ void *rvalue,
ffi_raw *avalue); /*@dependent@*/ ffi_raw *avalue);
void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw); void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args); void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
@@ -271,16 +263,16 @@ ffi_prep_java_raw_closure (ffi_raw_closure*,
/* ---- Public interface definition -------------------------------------- */ /* ---- Public interface definition -------------------------------------- */
ffi_status ffi_prep_cif(ffi_cif *cif, ffi_status ffi_prep_cif(/*@out@*/ /*@partial@*/ ffi_cif *cif,
ffi_abi abi, ffi_abi abi,
unsigned int nargs, unsigned int nargs,
ffi_type *rtype, /*@dependent@*/ /*@out@*/ /*@partial@*/ ffi_type *rtype,
ffi_type **atypes); /*@dependent@*/ ffi_type **atypes);
void ffi_call(ffi_cif *cif, void ffi_call(/*@dependent@*/ ffi_cif *cif,
void (*fn)(), void (*fn)(),
void *rvalue, /*@out@*/ void *rvalue,
void **avalue); /*@dependent@*/ void **avalue);
/* Useful for eliminating compiler warnings */ /* Useful for eliminating compiler warnings */
#define FFI_FN(f) ((void (*)())f) #define FFI_FN(f) ((void (*)())f)

View File

@@ -46,9 +46,9 @@ char *alloca ();
#endif #endif
#ifdef FFI_DEBUG #ifdef FFI_DEBUG
void ffi_assert(char *expr, char *file, int line); /*@exits@*/ void ffi_assert(/*@temp@*/ char *expr, /*@temp@*/ char *file, int line);
void ffi_stop_here(void); void ffi_stop_here(void);
void ffi_type_test(ffi_type *a, char *file, int line); void ffi_type_test(/*@temp@*/ /*@out@*/ ffi_type *a, /*@temp@*/ char *file, int line);
#define FFI_ASSERT(x) ((x) ? (void)0 : ffi_assert(#x, __FILE__,__LINE__)) #define FFI_ASSERT(x) ((x) ? (void)0 : ffi_assert(#x, __FILE__,__LINE__))
#define FFI_ASSERT_AT(x, f, l) ((x) ? 0 : ffi_assert(#x, (f), (l))) #define FFI_ASSERT_AT(x, f, l) ((x) ? 0 : ffi_assert(#x, (f), (l)))
@@ -68,9 +68,9 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif);
/* Extended cif, used in callback from assembly routine */ /* Extended cif, used in callback from assembly routine */
typedef struct typedef struct
{ {
ffi_cif *cif; /*@dependent@*/ ffi_cif *cif;
void *rvalue; /*@dependent@*/ void *rvalue;
void **avalue; /*@dependent@*/ void **avalue;
} extended_cif; } extended_cif;
/* Terse sized type definitions. */ /* Terse sized type definitions. */

View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2005-05-14.22 scriptversion=2004-12-17.09
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@@ -109,7 +109,7 @@ while test -n "$1"; do
shift shift
continue;; continue;;
--help) echo "$usage"; exit $?;; --help) echo "$usage"; exit 0;;
-m) chmodcmd="$chmodprog $2" -m) chmodcmd="$chmodprog $2"
shift shift
@@ -134,7 +134,7 @@ while test -n "$1"; do
shift shift
continue;; continue;;
--version) echo "$0 $scriptversion"; exit $?;; --version) echo "$0 $scriptversion"; exit 0;;
*) # When -d is used, all remaining arguments are directories to create. *) # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified. # When -t is used, the destination is already specified.

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
# ltmain.sh - Provide generalized library-building support services. # ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun configure. # NOTE: Changing this file will not affect anything until you rerun configure.
# #
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
# Free Software Foundation, Inc. # 2007 Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@@ -43,14 +43,22 @@ EXIT_FAILURE=1
PROGRAM=ltmain.sh PROGRAM=ltmain.sh
PACKAGE=libtool PACKAGE=libtool
VERSION=1.5.22 VERSION=1.5.24
TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
# See if we are running on zsh, and set the options which allow our # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
# commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
if test -n "${ZSH_VERSION+set}" ; then emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST setopt NO_GLOB_SUBST
else
case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh
# Check that we have a working $echo. # Check that we have a working $echo.
if test "X$1" = X--no-reexec; then if test "X$1" = X--no-reexec; then
@@ -105,12 +113,14 @@ esac
# These must not be set unconditionally because not all systems understand # These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO). # e.g. LANG=C (notably SCO).
# We save the old values to restore during execute mode. # We save the old values to restore during execute mode.
if test "${LC_ALL+set}" = set; then for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL do
fi eval "if test \"\${$lt_var+set}\" = set; then
if test "${LANG+set}" = set; then save_$lt_var=\$$lt_var
save_LANG="$LANG"; LANG=C; export LANG $lt_var=C
fi export $lt_var
fi"
done
# Make sure IFS has a sensible default # Make sure IFS has a sensible default
lt_nl=' lt_nl='
@@ -136,6 +146,8 @@ duplicate_deps=no
preserve_args= preserve_args=
lo2o="s/\\.lo\$/.${objext}/" lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/" o2lo="s/\\.${objext}\$/.lo/"
extracted_archives=
extracted_serial=0
##################################### #####################################
# Shell function definitions: # Shell function definitions:
@@ -196,7 +208,13 @@ func_win32_libid ()
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
win32_nmres=`eval $NM -f posix -A $1 | \ win32_nmres=`eval $NM -f posix -A $1 | \
$SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` $SED -n -e '1,100{
/ I /{
s,.*,import,
p
q
}
}'`
case $win32_nmres in case $win32_nmres in
import*) win32_libid_type="x86 archive import";; import*) win32_libid_type="x86 archive import";;
*) win32_libid_type="x86 archive static";; *) win32_libid_type="x86 archive static";;
@@ -327,7 +345,17 @@ func_extract_archives ()
*) my_xabs=`pwd`"/$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;;
esac esac
my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
my_xdir="$my_gentop/$my_xlib" my_xlib_u=$my_xlib
while :; do
case " $extracted_archives " in
*" $my_xlib_u "*)
extracted_serial=`expr $extracted_serial + 1`
my_xlib_u=lt$extracted_serial-$my_xlib ;;
*) break ;;
esac
done
extracted_archives="$extracted_archives $my_xlib_u"
my_xdir="$my_gentop/$my_xlib_u"
$show "${rm}r $my_xdir" $show "${rm}r $my_xdir"
$run ${rm}r "$my_xdir" $run ${rm}r "$my_xdir"
@@ -454,11 +482,12 @@ do
;; ;;
--version) --version)
$echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" echo "\
$echo $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
$echo "Copyright (C) 2005 Free Software Foundation, Inc."
$echo "This is free software; see the source for copying conditions. There is NO" Copyright (C) 2007 Free Software Foundation, Inc.
$echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
exit $? exit $?
;; ;;
@@ -755,9 +784,10 @@ if test -z "$show_help"; then
*.class) xform=class ;; *.class) xform=class ;;
*.cpp) xform=cpp ;; *.cpp) xform=cpp ;;
*.cxx) xform=cxx ;; *.cxx) xform=cxx ;;
*.f90) xform=f90 ;; *.[fF][09]?) xform=[fF][09]. ;;
*.for) xform=for ;; *.for) xform=for ;;
*.java) xform=java ;; *.java) xform=java ;;
*.obj) xform=obj ;;
esac esac
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
@@ -1138,8 +1168,9 @@ EOF
for arg for arg
do do
case $arg in case $arg in
-all-static | -static) -all-static | -static | -static-libtool-libs)
if test "X$arg" = "X-all-static"; then case $arg in
-all-static)
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
fi fi
@@ -1147,12 +1178,20 @@ EOF
dlopen_self=$dlopen_self_static dlopen_self=$dlopen_self_static
fi fi
prefer_static_libs=yes prefer_static_libs=yes
else ;;
-static)
if test -z "$pic_flag" && test -n "$link_static_flag"; then if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static dlopen_self=$dlopen_self_static
fi fi
prefer_static_libs=built prefer_static_libs=built
fi ;;
-static-libtool-libs)
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=yes
;;
esac
build_libtool_libs=no build_libtool_libs=no
build_old_libs=yes build_old_libs=yes
break break
@@ -1600,7 +1639,7 @@ EOF
continue continue
;; ;;
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
compiler_flags="$compiler_flags $arg" compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg" compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg" finalize_command="$finalize_command $arg"
@@ -1620,10 +1659,11 @@ EOF
# -m* pass through architecture-specific compiler args for GCC # -m* pass through architecture-specific compiler args for GCC
# -m*, -t[45]*, -txscale* pass through architecture-specific # -m*, -t[45]*, -txscale* pass through architecture-specific
# compiler args for GCC # compiler args for GCC
# -pg pass through profiling flag for GCC # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
# -F/path gives path to uninstalled frameworks, gcc on darwin
# @file GCC response files # @file GCC response files
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|@*) -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
# Unknown arguments in both finalize_command and compile_command need # Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later. # to be aesthetically quoted because they are evaled later.
@@ -1651,9 +1691,9 @@ EOF
-no-install) -no-install)
case $host in case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
# The PATH hackery in wrapper scripts is required on Windows # The PATH hackery in wrapper scripts is required on Windows
# in order for the loader to find any dlls it needs. # and Darwin in order for the loader to find any dlls it needs.
$echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
fast_install=no fast_install=no
@@ -1712,7 +1752,7 @@ EOF
continue continue
;; ;;
-static) -static | -static-libtool-libs)
# The effects of -static are defined in a previous loop. # The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that # We used to do the same as -all-static on platforms that
# didn't have a PIC flag, but the assumption that the effects # didn't have a PIC flag, but the assumption that the effects
@@ -2094,7 +2134,7 @@ EOF
lib= lib=
found=no found=no
case $deplib in case $deplib in
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
if test "$linkmode,$pass" = "prog,link"; then if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs" compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs" finalize_deplibs="$deplib $finalize_deplibs"
@@ -2490,7 +2530,9 @@ EOF
if test "$linkmode,$pass" = "prog,link"; then if test "$linkmode,$pass" = "prog,link"; then
if test -n "$library_names" && if test -n "$library_names" &&
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then { { test "$prefer_static_libs" = no ||
test "$prefer_static_libs,$installed" = "built,yes"; } ||
test -z "$old_library"; }; then
# We need to hardcode the library path # We need to hardcode the library path
if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories. # Make sure the rpath contains only unique directories.
@@ -3186,7 +3228,7 @@ EOF
# which has an extra 1 added just for fun # which has an extra 1 added just for fun
# #
case $version_type in case $version_type in
darwin|linux|osf|windows) darwin|linux|osf|windows|none)
current=`expr $number_major + $number_minor` current=`expr $number_major + $number_minor`
age="$number_minor" age="$number_minor"
revision="$number_revision" revision="$number_revision"
@@ -3197,9 +3239,10 @@ EOF
age="0" age="0"
;; ;;
irix|nonstopux) irix|nonstopux)
current=`expr $number_major + $number_minor - 1` current=`expr $number_major + $number_minor`
age="$number_minor" age="$number_minor"
revision="$number_minor" revision="$number_minor"
lt_irix_increment=no
;; ;;
esac esac
;; ;;
@@ -3258,7 +3301,8 @@ EOF
versuffix="$major.$age.$revision" versuffix="$major.$age.$revision"
# Darwin ld doesn't like 0 for these options... # Darwin ld doesn't like 0 for these options...
minor_current=`expr $current + 1` minor_current=`expr $current + 1`
verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
;; ;;
freebsd-aout) freebsd-aout)
@@ -3272,8 +3316,11 @@ EOF
;; ;;
irix | nonstopux) irix | nonstopux)
major=`expr $current - $age + 1` if test "X$lt_irix_increment" = "Xno"; then
major=`expr $current - $age`
else
major=`expr $current - $age + 1`
fi
case $version_type in case $version_type in
nonstopux) verstring_prefix=nonstopux ;; nonstopux) verstring_prefix=nonstopux ;;
*) verstring_prefix=sgi ;; *) verstring_prefix=sgi ;;
@@ -3410,11 +3457,11 @@ EOF
fi fi
# Eliminate all temporary directories. # Eliminate all temporary directories.
for path in $notinst_path; do #for path in $notinst_path; do
lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
done #done
if test -n "$xrpath"; then if test -n "$xrpath"; then
# If the user specified any rpath flags, then add them. # If the user specified any rpath flags, then add them.
@@ -3515,13 +3562,12 @@ EOF
int main() { return 0; } int main() { return 0; }
EOF EOF
$rm conftest $rm conftest
$LTCC $LTCFLAGS -o conftest conftest.c $deplibs if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
if test "$?" -eq 0 ; then
ldd_output=`ldd conftest` ldd_output=`ldd conftest`
for i in $deplibs; do for i in $deplibs; do
name=`expr $i : '-l\(.*\)'` name=`expr $i : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument. # If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" -ne "0"; then if test "$name" != "" && test "$name" != "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in case " $predeps $postdeps " in
*" $i "*) *" $i "*)
@@ -3560,9 +3606,7 @@ EOF
# If $name is empty we are operating on a -L argument. # If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then if test "$name" != "" && test "$name" != "0"; then
$rm conftest $rm conftest
$LTCC $LTCFLAGS -o conftest conftest.c $i if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
# Did it work?
if test "$?" -eq 0 ; then
ldd_output=`ldd conftest` ldd_output=`ldd conftest`
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in case " $predeps $postdeps " in
@@ -3594,7 +3638,7 @@ EOF
droppeddeps=yes droppeddeps=yes
$echo $echo
$echo "*** Warning! Library $i is needed by this library but I was not able to" $echo "*** Warning! Library $i is needed by this library but I was not able to"
$echo "*** make it link in! You will probably need to install it or some" $echo "*** make it link in! You will probably need to install it or some"
$echo "*** library that it depends on before this library will be fully" $echo "*** library that it depends on before this library will be fully"
$echo "*** functional. Installing it before continuing would be even better." $echo "*** functional. Installing it before continuing would be even better."
fi fi
@@ -3880,7 +3924,10 @@ EOF
test -n "$hardcode_libdirs"; then test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs" libdir="$hardcode_libdirs"
if test -n "$hardcode_libdir_flag_spec_ld"; then if test -n "$hardcode_libdir_flag_spec_ld"; then
eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" case $archive_cmds in
*\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
*) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
esac
else else
eval dep_rpath=\"$hardcode_libdir_flag_spec\" eval dep_rpath=\"$hardcode_libdir_flag_spec\"
fi fi
@@ -4239,12 +4286,14 @@ EOF
reload_conv_objs= reload_conv_objs=
gentop= gentop=
# reload_cmds runs $LD directly, so let us get rid of # reload_cmds runs $LD directly, so let us get rid of
# -Wl from whole_archive_flag_spec # -Wl from whole_archive_flag_spec and hope we can get by with
# turning comma into space..
wl= wl=
if test -n "$convenience"; then if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then if test -n "$whole_archive_flag_spec"; then
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
else else
gentop="$output_objdir/${obj}x" gentop="$output_objdir/${obj}x"
generated="$generated $gentop" generated="$generated $gentop"
@@ -4692,16 +4741,16 @@ static const void *lt_preloaded_setup() {
case $host in case $host in
*cygwin* | *mingw* ) *cygwin* | *mingw* )
if test -f "$output_objdir/${outputname}.def" ; then if test -f "$output_objdir/${outputname}.def" ; then
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
else else
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
fi fi
;; ;;
* ) * )
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
;; ;;
esac esac
;; ;;
@@ -4716,13 +4765,13 @@ static const void *lt_preloaded_setup() {
# really was required. # really was required.
# Nullify the symbol file. # Nullify the symbol file.
compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
fi fi
if test "$need_relink" = no || test "$build_libtool_libs" != yes; then if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
# Replace the output file specification. # Replace the output file specification.
compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
link_command="$compile_command$compile_rpath" link_command="$compile_command$compile_rpath"
# We have no uninstalled library dependencies, so finalize right now. # We have no uninstalled library dependencies, so finalize right now.
@@ -4809,7 +4858,7 @@ static const void *lt_preloaded_setup() {
if test "$fast_install" != no; then if test "$fast_install" != no; then
link_command="$finalize_var$compile_command$finalize_rpath" link_command="$finalize_var$compile_command$finalize_rpath"
if test "$fast_install" = yes; then if test "$fast_install" = yes; then
relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
else else
# fast_install is set to needless # fast_install is set to needless
relink_command= relink_command=
@@ -4846,7 +4895,7 @@ static const void *lt_preloaded_setup() {
fi fi
done done
relink_command="(cd `pwd`; $relink_command)" relink_command="(cd `pwd`; $relink_command)"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
fi fi
# Quote $echo for shipping. # Quote $echo for shipping.
@@ -5253,6 +5302,20 @@ EOF
Xsed='${SED} -e 1s/^X//' Xsed='${SED} -e 1s/^X//'
sed_quote_subst='$sed_quote_subst' sed_quote_subst='$sed_quote_subst'
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
# is contrary to our usage. Disable this feature.
alias -g '\${1+\"\$@\"}'='\"\$@\"'
setopt NO_GLOB_SUBST
else
case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh
# The HP-UX ksh and POSIX shell print the target directory to stdout # The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set. # if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
@@ -5395,7 +5458,7 @@ else
;; ;;
esac esac
$echo >> $output "\ $echo >> $output "\
\$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" \$echo \"\$0: cannot exec \$program \$*\"
exit $EXIT_FAILURE exit $EXIT_FAILURE
fi fi
else else
@@ -5581,7 +5644,7 @@ fi\
done done
# Quote the link command for shipping. # Quote the link command for shipping.
relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
if test "$hardcode_automatic" = yes ; then if test "$hardcode_automatic" = yes ; then
relink_command= relink_command=
fi fi
@@ -5926,9 +5989,9 @@ relink_command=\"$relink_command\""
if test -n "$inst_prefix_dir"; then if test -n "$inst_prefix_dir"; then
# Stick the inst_prefix_dir data into the link command. # Stick the inst_prefix_dir data into the link command.
relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
else else
relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
fi fi
$echo "$modename: warning: relinking \`$file'" 1>&2 $echo "$modename: warning: relinking \`$file'" 1>&2
@@ -6137,7 +6200,7 @@ relink_command=\"$relink_command\""
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file" outputname="$tmpdir/$file"
# Replace the output file specification. # Replace the output file specification.
relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
$show "$relink_command" $show "$relink_command"
if $run eval "$relink_command"; then : if $run eval "$relink_command"; then :
@@ -6348,8 +6411,10 @@ relink_command=\"$relink_command\""
if test -f "$dir/$objdir/$dlname"; then if test -f "$dir/$objdir/$dlname"; then
dir="$dir/$objdir" dir="$dir/$objdir"
else else
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 if test ! -f "$dir/$dlname"; then
exit $EXIT_FAILURE $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
exit $EXIT_FAILURE
fi
fi fi
;; ;;
@@ -6413,12 +6478,12 @@ relink_command=\"$relink_command\""
fi fi
# Restore saved environment variables # Restore saved environment variables
if test "${save_LC_ALL+set}" = set; then for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
LC_ALL="$save_LC_ALL"; export LC_ALL do
fi eval "if test \"\${save_$lt_var+set}\" = set; then
if test "${save_LANG+set}" = set; then $lt_var=\$save_$lt_var; export $lt_var
LANG="$save_LANG"; export LANG fi"
fi done
# Now prepare to actually exec the command. # Now prepare to actually exec the command.
exec_cmd="\$cmd$args" exec_cmd="\$cmd$args"
@@ -6775,9 +6840,9 @@ The following components of LINK-COMMAND are treated specially:
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-export-symbols SYMFILE -export-symbols SYMFILE
try to export only the symbols listed in SYMFILE try to export only the symbols listed in SYMFILE
-export-symbols-regex REGEX -export-symbols-regex REGEX
try to export only the symbols matching REGEX try to export only the symbols matching REGEX
-LLIBDIR search LIBDIR for required installed libraries -LLIBDIR search LIBDIR for required installed libraries
-lNAME OUTPUT-FILE requires the installed library libNAME -lNAME OUTPUT-FILE requires the installed library libNAME
-module build a library that can dlopened -module build a library that can dlopened
@@ -6791,9 +6856,11 @@ The following components of LINK-COMMAND are treated specially:
-release RELEASE specify package release information -release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR -rpath LIBDIR the created library will eventually be installed in LIBDIR
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
-static do not do any dynamic linking of libtool libraries -static do not do any dynamic linking of uninstalled libtool libraries
-static-libtool-libs
do not do any dynamic linking of libtool libraries
-version-info CURRENT[:REVISION[:AGE]] -version-info CURRENT[:REVISION[:AGE]]
specify library version info [each variable defaults to 0] specify library version info [each variable defaults to 0]
All other options (arguments beginning with \`-') are ignored. All other options (arguments beginning with \`-') are ignored.

View File

@@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Common stub for a few missing GNU programs while installing. # Common stub for a few missing GNU programs while installing.
scriptversion=2005-06-08.21 scriptversion=2004-09-07.08
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
@@ -19,8 +19,8 @@ scriptversion=2005-06-08.21
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02110-1301, USA. # 02111-1307, USA.
# As a special exception to the GNU General Public License, if you # As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a # distribute this file as part of a program that contains a
@@ -87,12 +87,12 @@ Supported PROGRAM values:
yacc create \`y.tab.[ch]', if possible, from existing .[ch] yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>." Send bug reports to <bug-automake@gnu.org>."
exit $? exit 0
;; ;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version) -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)" echo "missing $scriptversion (GNU Automake)"
exit $? exit 0
;; ;;
-*) -*)
@@ -288,18 +288,11 @@ WARNING: \`$1' is $msg. You should only need it if
call might also be the consequence of using a buggy \`make' (AIX, call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site." the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then if test -z "$file"; then
# ... or it is the one specified with @setfilename ... file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file touch $file
;; ;;

View File

@@ -31,7 +31,9 @@
/* ffi_prep_args is called by the assembly routine once stack space /* ffi_prep_args is called by the assembly routine once stack space
has been allocated for the function's arguments */ has been allocated for the function's arguments */
/*@-exportheader@*/
void ffi_prep_args(char *stack, extended_cif *ecif) void ffi_prep_args(char *stack, extended_cif *ecif)
/*@=exportheader@*/
{ {
register unsigned int i; register unsigned int i;
register void **p_argv; register void **p_argv;
@@ -134,10 +136,20 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
return FFI_OK; return FFI_OK;
} }
extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, /*@-declundef@*/
unsigned, unsigned, unsigned *, void (*fn)()); /*@-exportheader@*/
extern void ffi_call_SYSV(void (*)(char *, extended_cif *),
/*@out@*/ extended_cif *,
unsigned, unsigned,
/*@out@*/ unsigned *,
void (*fn)());
/*@=declundef@*/
/*@=exportheader@*/
void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) void ffi_call(/*@dependent@*/ ffi_cif *cif,
void (*fn)(),
/*@out@*/ void *rvalue,
/*@dependent@*/ void **avalue)
{ {
extended_cif ecif; extended_cif ecif;
@@ -150,7 +162,9 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
if ((rvalue == NULL) && if ((rvalue == NULL) &&
(cif->rtype->type == FFI_TYPE_STRUCT)) (cif->rtype->type == FFI_TYPE_STRUCT))
{ {
/*@-sysunrecog@*/
ecif.rvalue = alloca(cif->rtype->size); ecif.rvalue = alloca(cif->rtype->size);
/*@=sysunrecog@*/
} }
else else
ecif.rvalue = rvalue; ecif.rvalue = rvalue;
@@ -159,9 +173,10 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
switch (cif->abi) switch (cif->abi)
{ {
case FFI_SYSV: case FFI_SYSV:
ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue, /*@-usedef@*/
fn); ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes,
cif->flags, ecif.rvalue, fn);
/*@=usedef@*/
break; break;
default: default:
FFI_ASSERT(0); FFI_ASSERT(0);

View File

@@ -50,9 +50,10 @@ void ffi_type_test(ffi_type *a, char *file, int line)
{ {
FFI_ASSERT_AT(a != NULL, file, line); FFI_ASSERT_AT(a != NULL, file, line);
/*@-usedef@*/
FFI_ASSERT_AT(a->type <= FFI_TYPE_LAST, file, line); FFI_ASSERT_AT(a->type <= FFI_TYPE_LAST, file, line);
FFI_ASSERT_AT(a->type == FFI_TYPE_VOID || a->size > 0, file, line); FFI_ASSERT_AT(a->type == FFI_TYPE_VOID || a->size > 0, file, line);
FFI_ASSERT_AT(a->type == FFI_TYPE_VOID || a->alignment > 0, file, line); FFI_ASSERT_AT(a->type == FFI_TYPE_VOID || a->alignment > 0, file, line);
FFI_ASSERT_AT(a->type != FFI_TYPE_STRUCT || a->elements != NULL, file, line); FFI_ASSERT_AT(a->type != FFI_TYPE_STRUCT || a->elements != NULL, file, line);
/*@=usedef@*/
} }

View File

@@ -69,19 +69,24 @@ endian_adjust (void *addr, size_t len)
#endif #endif
} }
/* Store VALUE to ADDR in the current cpu implementation's fp spill format. /* Store VALUE to ADDR in the current cpu implementation's fp spill format. */
This is a macro instead of a function, so that it works for all 3 floating
point types without type conversions. Type conversion to long double breaks
the denorm support. */
#define stf_spill(addr, value) \ static inline void
stf_spill(fpreg *addr, __float80 value)
{
asm ("stf.spill %0 = %1%P0" : "=m" (*addr) : "f"(value)); asm ("stf.spill %0 = %1%P0" : "=m" (*addr) : "f"(value));
}
/* Load a value from ADDR, which is in the current cpu implementation's /* Load a value from ADDR, which is in the current cpu implementation's
fp spill format. As above, this must also be a macro. */ fp spill format. */
#define ldf_fill(result, addr) \ static inline __float80
asm ("ldf.fill %0 = %1%P1" : "=f"(result) : "m"(*addr)); ldf_fill(fpreg *addr)
{
__float80 ret;
asm ("ldf.fill %0 = %1%P1" : "=f"(ret) : "m"(*addr));
return ret;
}
/* Return the size of the C type associated with with TYPE. Which will /* Return the size of the C type associated with with TYPE. Which will
be one of the FFI_IA64_TYPE_HFA_* values. */ be one of the FFI_IA64_TYPE_HFA_* values. */
@@ -105,20 +110,17 @@ hfa_type_size (int type)
/* Load from ADDR a value indicated by TYPE. Which will be one of /* Load from ADDR a value indicated by TYPE. Which will be one of
the FFI_IA64_TYPE_HFA_* values. */ the FFI_IA64_TYPE_HFA_* values. */
static void static __float80
hfa_type_load (fpreg *fpaddr, int type, void *addr) hfa_type_load (int type, void *addr)
{ {
switch (type) switch (type)
{ {
case FFI_IA64_TYPE_HFA_FLOAT: case FFI_IA64_TYPE_HFA_FLOAT:
stf_spill (fpaddr, *(float *) addr); return *(float *) addr;
return;
case FFI_IA64_TYPE_HFA_DOUBLE: case FFI_IA64_TYPE_HFA_DOUBLE:
stf_spill (fpaddr, *(double *) addr); return *(double *) addr;
return;
case FFI_IA64_TYPE_HFA_LDOUBLE: case FFI_IA64_TYPE_HFA_LDOUBLE:
stf_spill (fpaddr, *(__float80 *) addr); return *(__float80 *) addr;
return;
default: default:
abort (); abort ();
} }
@@ -128,31 +130,19 @@ hfa_type_load (fpreg *fpaddr, int type, void *addr)
the FFI_IA64_TYPE_HFA_* values. */ the FFI_IA64_TYPE_HFA_* values. */
static void static void
hfa_type_store (int type, void *addr, fpreg *fpaddr) hfa_type_store (int type, void *addr, __float80 value)
{ {
switch (type) switch (type)
{ {
case FFI_IA64_TYPE_HFA_FLOAT: case FFI_IA64_TYPE_HFA_FLOAT:
{ *(float *) addr = value;
float result; break;
ldf_fill (result, fpaddr);
*(float *) addr = result;
break;
}
case FFI_IA64_TYPE_HFA_DOUBLE: case FFI_IA64_TYPE_HFA_DOUBLE:
{ *(double *) addr = value;
double result; break;
ldf_fill (result, fpaddr);
*(double *) addr = result;
break;
}
case FFI_IA64_TYPE_HFA_LDOUBLE: case FFI_IA64_TYPE_HFA_LDOUBLE:
{ *(__float80 *) addr = value;
__float80 result; break;
ldf_fill (result, fpaddr);
*(__float80 *) addr = result;
break;
}
default: default:
abort (); abort ();
} }
@@ -361,8 +351,8 @@ ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
&& offset < size && offset < size
&& gp_offset < 8 * 8) && gp_offset < 8 * 8)
{ {
hfa_type_load (&stack->fp_regs[fpcount], hfa_type, stf_spill (&stack->fp_regs[fpcount],
avalue[i] + offset); hfa_type_load (hfa_type, avalue[i] + offset));
offset += hfa_size; offset += hfa_size;
gp_offset += hfa_size; gp_offset += hfa_size;
fpcount += 1; fpcount += 1;
@@ -485,11 +475,9 @@ ffi_closure_unix_inner (ffi_closure *closure, struct ia64_args *stack,
case FFI_TYPE_FLOAT: case FFI_TYPE_FLOAT:
if (gpcount < 8 && fpcount < 8) if (gpcount < 8 && fpcount < 8)
{ {
fpreg *addr = &stack->fp_regs[fpcount++]; void *addr = &stack->fp_regs[fpcount++];
float result;
avalue[i] = addr; avalue[i] = addr;
ldf_fill (result, addr); *(float *)addr = ldf_fill (addr);
*(float *)addr = result;
} }
else else
avalue[i] = endian_adjust(&stack->gp_regs[gpcount], 4); avalue[i] = endian_adjust(&stack->gp_regs[gpcount], 4);
@@ -499,11 +487,9 @@ ffi_closure_unix_inner (ffi_closure *closure, struct ia64_args *stack,
case FFI_TYPE_DOUBLE: case FFI_TYPE_DOUBLE:
if (gpcount < 8 && fpcount < 8) if (gpcount < 8 && fpcount < 8)
{ {
fpreg *addr = &stack->fp_regs[fpcount++]; void *addr = &stack->fp_regs[fpcount++];
double result;
avalue[i] = addr; avalue[i] = addr;
ldf_fill (result, addr); *(double *)addr = ldf_fill (addr);
*(double *)addr = result;
} }
else else
avalue[i] = &stack->gp_regs[gpcount]; avalue[i] = &stack->gp_regs[gpcount];
@@ -515,11 +501,9 @@ ffi_closure_unix_inner (ffi_closure *closure, struct ia64_args *stack,
gpcount++; gpcount++;
if (LDBL_MANT_DIG == 64 && gpcount < 8 && fpcount < 8) if (LDBL_MANT_DIG == 64 && gpcount < 8 && fpcount < 8)
{ {
fpreg *addr = &stack->fp_regs[fpcount++]; void *addr = &stack->fp_regs[fpcount++];
__float80 result;
avalue[i] = addr; avalue[i] = addr;
ldf_fill (result, addr); *(__float80 *)addr = ldf_fill (addr);
*(__float80 *)addr = result;
} }
else else
avalue[i] = &stack->gp_regs[gpcount]; avalue[i] = &stack->gp_regs[gpcount];
@@ -550,7 +534,7 @@ ffi_closure_unix_inner (ffi_closure *closure, struct ia64_args *stack,
&& gp_offset < 8 * 8) && gp_offset < 8 * 8)
{ {
hfa_type_store (hfa_type, addr + offset, hfa_type_store (hfa_type, addr + offset,
&stack->fp_regs[fpcount]); ldf_fill (&stack->fp_regs[fpcount]));
offset += hfa_size; offset += hfa_size;
gp_offset += hfa_size; gp_offset += hfa_size;
fpcount += 1; fpcount += 1;

View File

@@ -29,10 +29,10 @@
----------------------------------------------------------------------- */ ----------------------------------------------------------------------- */
/* This defines a Java- and 64-bit specific variant of the raw API. */ /* This defines a Java- and 64-bit specific variant of the raw API. */
/* It assumes that "raw" argument blocks look like Java stacks on a */ /* It assumes that "raw" argument blocks look like Java stacks on a */
/* 64-bit machine. Arguments that can be stored in a single stack */ /* 64-bit machine. Arguments that can be stored in a single stack */
/* stack slots (longs, doubles) occupy 128 bits, but only the first */ /* stack slots (longs, doubles) occupy 128 bits, but only the first */
/* 64 bits are actually used. */ /* 64 bits are actually used. */
#include <ffi.h> #include <ffi.h>
#include <ffi_common.h> #include <ffi_common.h>
@@ -285,7 +285,10 @@ ffi_java_raw_to_rvalue (ffi_cif *cif, void *rvalue)
* these following couple of functions will handle the translation forth * these following couple of functions will handle the translation forth
* and back automatically. */ * and back automatically. */
void ffi_java_raw_call (ffi_cif *cif, void (*fn)(), void *rvalue, ffi_raw *raw) void ffi_java_raw_call (/*@dependent@*/ ffi_cif *cif,
void (*fn)(),
/*@out@*/ void *rvalue,
/*@dependent@*/ ffi_raw *raw)
{ {
void **avalue = (void**) alloca (cif->nargs * sizeof (void*)); void **avalue = (void**) alloca (cif->nargs * sizeof (void*));
ffi_java_raw_to_ptrarray (cif, raw, avalue); ffi_java_raw_to_ptrarray (cif, raw, avalue);

View File

@@ -31,7 +31,9 @@
/* ffi_prep_args is called by the assembly routine once stack /* ffi_prep_args is called by the assembly routine once stack
space has been allocated for the function's arguments. */ space has been allocated for the function's arguments. */
/*@-exportheader@*/
void ffi_prep_args(char *stack, extended_cif *ecif) void ffi_prep_args(char *stack, extended_cif *ecif)
/*@=exportheader@*/
{ {
unsigned int i; unsigned int i;
int tmp; int tmp;
@@ -171,10 +173,20 @@ ffi_prep_cif_machdep(ffi_cif *cif)
return FFI_OK; return FFI_OK;
} }
extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, /*@-declundef@*/
unsigned, unsigned, unsigned *, void (*fn)()); /*@-exportheader@*/
extern void ffi_call_SYSV(void (*)(char *, extended_cif *),
/*@out@*/ extended_cif *,
unsigned, unsigned,
/*@out@*/ unsigned *,
void (*fn)());
/*@=declundef@*/
/*@=exportheader@*/
void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) void ffi_call(/*@dependent@*/ ffi_cif *cif,
void (*fn)(),
/*@out@*/ void *rvalue,
/*@dependent@*/ void **avalue)
{ {
extended_cif ecif; extended_cif ecif;
@@ -186,7 +198,9 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
if ((rvalue == NULL) && if ((rvalue == NULL) &&
(cif->rtype->type == FFI_TYPE_STRUCT)) (cif->rtype->type == FFI_TYPE_STRUCT))
{ {
/*@-sysunrecog@*/
ecif.rvalue = alloca (cif->rtype->size); ecif.rvalue = alloca (cif->rtype->size);
/*@=sysunrecog@*/
} }
else else
ecif.rvalue = rvalue; ecif.rvalue = rvalue;
@@ -194,6 +208,7 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
switch (cif->abi) switch (cif->abi)
{ {
case FFI_SYSV: case FFI_SYSV:
/*@-usedef@*/
ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes,
cif->flags, ecif.rvalue, fn); cif->flags, ecif.rvalue, fn);
if (cif->rtype->type == FFI_TYPE_STRUCT) if (cif->rtype->type == FFI_TYPE_STRUCT)
@@ -222,6 +237,7 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
} }
} }
} }
/*@=usedef@*/
break; break;
default: default:

View File

@@ -50,17 +50,17 @@ static void ffi_prep_args(char *stack,
int bytes, int bytes,
int flags) int flags)
{ {
int i; register int i;
void **p_argv; register void **p_argv;
char *argp; register char *argp;
ffi_type **p_arg; register ffi_type **p_arg;
#if _MIPS_SIM == _ABIN32 #if _MIPS_SIM == _ABIN32
/* If more than 8 double words are used, the remainder go /* If more than 8 double words are used, the remainder go
on the stack. We reorder stuff on the stack here to on the stack. We reorder stuff on the stack here to
support this easily. */ support this easily. */
if (bytes > 8 * sizeof(ffi_arg)) if (bytes > 8 * FFI_SIZEOF_ARG)
argp = &stack[bytes - (8 * sizeof(ffi_arg))]; argp = &stack[bytes - (8 * FFI_SIZEOF_ARG)];
else else
argp = stack; argp = stack;
#else #else
@@ -85,93 +85,102 @@ static void ffi_prep_args(char *stack,
for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; i; i--, p_arg++) for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; i; i--, p_arg++)
{ {
size_t z; size_t z;
unsigned int a; unsigned short a;
/* Align if necessary. */ /* Align if necessary */
a = (*p_arg)->alignment; a = (*p_arg)->alignment;
if (a < sizeof(ffi_arg)) if (a < FFI_SIZEOF_ARG)
a = sizeof(ffi_arg); a = FFI_SIZEOF_ARG;
if ((a - 1) & (unsigned int) argp) if ((a - 1) & (unsigned) argp) {
{ argp = (char *) ALIGN(argp, a);
argp = (char *) ALIGN(argp, a); FIX_ARGP;
FIX_ARGP;
}
z = (*p_arg)->size;
if (z <= sizeof(ffi_arg))
{
z = sizeof(ffi_arg);
switch ((*p_arg)->type)
{
case FFI_TYPE_SINT8:
*(ffi_arg *)argp = *(SINT8 *)(* p_argv);
break;
case FFI_TYPE_UINT8:
*(ffi_arg *)argp = *(UINT8 *)(* p_argv);
break;
case FFI_TYPE_SINT16:
*(ffi_arg *)argp = *(SINT16 *)(* p_argv);
break;
case FFI_TYPE_UINT16:
*(ffi_arg *)argp = *(UINT16 *)(* p_argv);
break;
case FFI_TYPE_SINT32:
*(ffi_arg *)argp = *(SINT32 *)(* p_argv);
break;
case FFI_TYPE_UINT32:
case FFI_TYPE_POINTER:
*(ffi_arg *)argp = *(UINT32 *)(* p_argv);
break;
/* This can only happen with 64bit slots. */
case FFI_TYPE_FLOAT:
*(float *) argp = *(float *)(* p_argv);
break;
/* Handle small structures. */
case FFI_TYPE_STRUCT:
default:
memcpy(argp, *p_argv, (*p_arg)->size);
break;
}
}
else
{
#if _MIPS_SIM == _ABIO32
memcpy(argp, *p_argv, z);
#else
{
unsigned end = (unsigned) argp+z;
unsigned cap = (unsigned) stack+bytes;
/* Check if the data will fit within the register space.
Handle it if it doesn't. */
if (end <= cap)
memcpy(argp, *p_argv, z);
else
{
unsigned portion = end - cap;
memcpy(argp, *p_argv, portion);
argp = stack;
memcpy(argp,
(void*)((unsigned)(*p_argv)+portion), z - portion);
}
}
#endif
} }
p_argv++;
argp += z; #if _MIPS_SIM == _ABIO32
FIX_ARGP; #define OFFSET 0
#else
#define OFFSET sizeof(int)
#endif
z = (*p_arg)->size;
if (z < sizeof(ffi_arg))
{
z = sizeof(ffi_arg);
switch ((*p_arg)->type)
{
case FFI_TYPE_SINT8:
*(SINT32 *) &argp[OFFSET] = (SINT32)*(SINT8 *)(* p_argv);
break;
case FFI_TYPE_UINT8:
*(UINT32 *) &argp[OFFSET] = (UINT32)*(UINT8 *)(* p_argv);
break;
case FFI_TYPE_SINT16:
*(SINT32 *) &argp[OFFSET] = (SINT32)*(SINT16 *)(* p_argv);
break;
case FFI_TYPE_UINT16:
*(UINT32 *) &argp[OFFSET] = (UINT32)*(UINT16 *)(* p_argv);
break;
case FFI_TYPE_SINT32:
*(SINT32 *) &argp[OFFSET] = (SINT32)*(SINT32 *)(* p_argv);
break;
case FFI_TYPE_UINT32:
case FFI_TYPE_POINTER:
*(UINT32 *) &argp[OFFSET] = (UINT32)*(UINT32 *)(* p_argv);
break;
/* This can only happen with 64bit slots */
case FFI_TYPE_FLOAT:
*(float *) argp = *(float *)(* p_argv);
break;
/* Handle small structures */
case FFI_TYPE_STRUCT:
memcpy(argp, *p_argv, (*p_arg)->size);
break;
default:
FFI_ASSERT(0);
}
}
else
{
#if _MIPS_SIM == _ABIO32
memcpy(argp, *p_argv, z);
#else
{
unsigned end = (unsigned) argp+z;
unsigned cap = (unsigned) stack+bytes;
/* Check if the data will fit within the register
space. Handle it if it doesn't. */
if (end <= cap)
memcpy(argp, *p_argv, z);
else
{
unsigned portion = end - cap;
memcpy(argp, *p_argv, portion);
argp = stack;
memcpy(argp,
(void*)((unsigned)(*p_argv)+portion), z - portion);
}
}
#endif
}
p_argv++;
argp += z;
FIX_ARGP;
} }
return;
} }
#if _MIPS_SIM == _ABIN32 #if _MIPS_SIM == _ABIN32
@@ -515,8 +524,8 @@ ffi_prep_closure (ffi_closure *closure,
#endif /* FFI_MIPS_O32 */ #endif /* FFI_MIPS_O32 */
tramp[0] = 0x3c190000 | (fn >> 16); /* lui $25,high(fn) */ tramp[0] = 0x3c190000 | (fn >> 16); /* lui $25,high(fn) */
tramp[1] = 0x37390000 | (fn & 0xffff); /* ori $25,low(fn) */ tramp[1] = 0x3c080000 | (ctx >> 16); /* lui $8,high(ctx) */
tramp[2] = 0x3c080000 | (ctx >> 16); /* lui $8,high(ctx) */ tramp[2] = 0x37390000 | (fn & 0xffff); /* ori $25,low(fn) */
tramp[3] = 0x03200008; /* jr $25 */ tramp[3] = 0x03200008; /* jr $25 */
tramp[4] = 0x35080000 | (ctx & 0xffff); /* ori $8,low(ctx) */ tramp[4] = 0x35080000 | (ctx & 0xffff); /* ori $8,low(ctx) */
@@ -549,18 +558,16 @@ ffi_prep_closure (ffi_closure *closure,
*/ */
int int
ffi_closure_mips_inner_O32 (ffi_closure *closure, ffi_closure_mips_inner_O32 (ffi_closure *closure,
void *rvalue, ffi_arg *ar, void *rvalue, unsigned long *ar,
double *fpr) double *fpr)
{ {
ffi_cif *cif; ffi_cif *cif;
void **avaluep; void **avalue;
ffi_arg *avalue;
ffi_type **arg_types; ffi_type **arg_types;
int i, avn, argn, seen_int; int i, avn, argn, seen_int;
cif = closure->cif; cif = closure->cif;
avalue = alloca (cif->nargs * sizeof (ffi_arg)); avalue = alloca (cif->nargs * sizeof (void *));
avaluep = alloca (cif->nargs * sizeof (ffi_arg));
seen_int = (cif->abi == FFI_O32_SOFT_FLOAT); seen_int = (cif->abi == FFI_O32_SOFT_FLOAT);
argn = 0; argn = 0;
@@ -581,43 +588,13 @@ ffi_closure_mips_inner_O32 (ffi_closure *closure,
(arg_types[i]->type == FFI_TYPE_FLOAT || (arg_types[i]->type == FFI_TYPE_FLOAT ||
arg_types[i]->type == FFI_TYPE_DOUBLE)) arg_types[i]->type == FFI_TYPE_DOUBLE))
{ {
#ifdef __MIPSEB__ avalue[i] = ((char *) &fpr[i]);
if (arg_types[i]->type == FFI_TYPE_FLOAT)
avaluep[i] = ((char *) &fpr[i]) + sizeof (float);
else
#endif
avaluep[i] = (char *) &fpr[i];
} }
else else
{ {
if (arg_types[i]->alignment == 8 && (argn & 0x1)) if (arg_types[i]->alignment == 8 && (argn & 0x1))
argn++; argn++;
switch (arg_types[i]->type) avalue[i] = ((char *) &ar[argn]);
{
case FFI_TYPE_SINT8:
avaluep[i] = &avalue[i];
*(SINT8 *) &avalue[i] = (SINT8) ar[argn];
break;
case FFI_TYPE_UINT8:
avaluep[i] = &avalue[i];
*(UINT8 *) &avalue[i] = (UINT8) ar[argn];
break;
case FFI_TYPE_SINT16:
avaluep[i] = &avalue[i];
*(SINT16 *) &avalue[i] = (SINT16) ar[argn];
break;
case FFI_TYPE_UINT16:
avaluep[i] = &avalue[i];
*(UINT16 *) &avalue[i] = (UINT16) ar[argn];
break;
default:
avaluep[i] = (char *) &ar[argn];
break;
}
seen_int = 1; seen_int = 1;
} }
argn += ALIGN(arg_types[i]->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; argn += ALIGN(arg_types[i]->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
@@ -625,7 +602,7 @@ ffi_closure_mips_inner_O32 (ffi_closure *closure,
} }
/* Invoke the closure. */ /* Invoke the closure. */
(closure->fun) (cif, rvalue, avaluep, closure->user_data); (closure->fun) (cif, rvalue, avalue, closure->user_data);
if (cif->abi == FFI_O32_SOFT_FLOAT) if (cif->abi == FFI_O32_SOFT_FLOAT)
{ {

View File

@@ -26,13 +26,17 @@
#ifndef LIBFFI_TARGET_H #ifndef LIBFFI_TARGET_H
#define LIBFFI_TARGET_H #define LIBFFI_TARGET_H
#ifndef LIBFFI_ASM
#include <sgidefs.h>
#endif
#if !defined(_MIPS_SIM) #if !defined(_MIPS_SIM)
-- something is very wrong -- -- something is very wrong --
#else #else
# if (_MIPS_SIM==_ABIN32 && defined(_ABIN32)) || (_MIPS_SIM==_ABI64 && defined(_ABI64)) # if (_MIPS_SIM==_ABIN32 && defined(_ABIN32)) || (_MIPS_SIM==_ABI64 && defined(_ABI64))
# define FFI_MIPS_N32 # define FFI_MIPS_N32
# else # else
# if (_MIPS_SIM==_ABIO32 && defined(_ABIO32)) # if _MIPS_SIM==_ABIO32 && defined(_ABIO32)
# define FFI_MIPS_O32 # define FFI_MIPS_O32
# else # else
-- this is an unsupported platform -- -- this is an unsupported platform --

View File

@@ -35,10 +35,7 @@
#define bytes a2 #define bytes a2
#define flags a3 #define flags a3
#define SIZEOF_FRAME (4 * FFI_SIZEOF_ARG + 2 * FFI_SIZEOF_ARG) #define SIZEOF_FRAME ( 4 * FFI_SIZEOF_ARG + 2 * FFI_SIZEOF_ARG )
#define A3_OFF (SIZEOF_FRAME + 3 * FFI_SIZEOF_ARG)
#define FP_OFF (SIZEOF_FRAME - 2 * FFI_SIZEOF_ARG)
#define RA_OFF (SIZEOF_FRAME - 1 * FFI_SIZEOF_ARG)
.abicalls .abicalls
.text .text
@@ -48,42 +45,48 @@
ffi_call_O32: ffi_call_O32:
$LFB0: $LFB0:
# Prologue # Prologue
SUBU $sp, SIZEOF_FRAME # Frame size SUBU $sp, SIZEOF_FRAME # Frame size
$LCFI0: $LCFI0:
REG_S $fp, FP_OFF($sp) # Save frame pointer REG_S $fp, SIZEOF_FRAME - 2*FFI_SIZEOF_ARG($sp) # Save frame pointer
$LCFI1: $LCFI1:
REG_S ra, RA_OFF($sp) # Save return address REG_S ra, SIZEOF_FRAME - 1*FFI_SIZEOF_ARG($sp) # Save return address
$LCFI2: $LCFI2:
move $fp, $sp move $fp, $sp
$LCFI3: $LCFI3:
move t9, callback # callback function pointer move t9, callback # callback function pointer
REG_S flags, A3_OFF($fp) # flags REG_S flags, SIZEOF_FRAME + 3*FFI_SIZEOF_ARG($fp) # flags
# Allocate at least 4 words in the argstack # Allocate at least 4 words in the argstack
move v0, bytes
bge bytes, 4 * FFI_SIZEOF_ARG, bigger
LI v0, 4 * FFI_SIZEOF_ARG LI v0, 4 * FFI_SIZEOF_ARG
blt bytes, v0, sixteen b sixteen
ADDU v0, bytes, 7 # make sure it is aligned bigger:
and v0, -8 # to an 8 byte boundry ADDU t0, v0, 2 * FFI_SIZEOF_ARG -1 # make sure it is aligned
and v0, t0, -2 * FFI_SIZEOF_ARG # to an 8 byte boundry
sixteen: sixteen:
SUBU $sp, v0 # move the stack pointer to reflect the SUBU $sp, $sp, v0 # move the stack pointer to reflect the
# arg space # arg space
ADDU a0, $sp, 4 * FFI_SIZEOF_ARG ADDU a0, $sp, 4 * FFI_SIZEOF_ARG
ADDU a3, $fp, SIZEOF_FRAME + 3*FFI_SIZEOF_ARG
jalr t9 jalr t9
REG_L t0, A3_OFF($fp) # load the flags word REG_L t0, SIZEOF_FRAME + 3*FFI_SIZEOF_ARG($fp) # load the flags word
SRL t2, t0, 4 # shift our arg info add t2, t0, 0 # and copy it into t2
and t0, ((1<<4)-1) # mask out the return type
ADDU $sp, 4 * FFI_SIZEOF_ARG # adjust $sp to new args and t0, ((1<<4)-1) # mask out the return type
SRL t2, 4 # shift our arg info
ADDU $sp, $sp, 4 * FFI_SIZEOF_ARG # adjust $sp to new args
bnez t0, pass_d # make it quick for int bnez t0, pass_d # make it quick for int
REG_L a0, 0*FFI_SIZEOF_ARG($sp) # just go ahead and load the REG_L a0, 0*FFI_SIZEOF_ARG($sp) # just go ahead and load the
REG_L a1, 1*FFI_SIZEOF_ARG($sp) # four regs. REG_L a1, 1*FFI_SIZEOF_ARG($sp) # four regs.
REG_L a2, 2*FFI_SIZEOF_ARG($sp) REG_L a2, 2*FFI_SIZEOF_ARG($sp)
REG_L a3, 3*FFI_SIZEOF_ARG($sp) REG_L a3, 3*FFI_SIZEOF_ARG($sp)
b call_it b call_it
@@ -173,9 +176,9 @@ noretval:
# Epilogue # Epilogue
epilogue: epilogue:
move $sp, $fp move $sp, $fp
REG_L $fp, FP_OFF($sp) # Restore frame pointer REG_L $fp, SIZEOF_FRAME - 2*FFI_SIZEOF_ARG($sp) # Restore frame pointer
REG_L ra, RA_OFF($sp) # Restore return address REG_L ra, SIZEOF_FRAME - 1*FFI_SIZEOF_ARG($sp) # Restore return address
ADDU $sp, SIZEOF_FRAME # Fix stack pointer ADDU $sp, SIZEOF_FRAME # Fix stack pointer
j ra j ra
$LFE0: $LFE0:
@@ -206,21 +209,7 @@ $LFE0:
0 - Called function a0 save our sp, fp point here 0 - Called function a0 save our sp, fp point here
*/ */
#define SIZEOF_FRAME2 (14 * FFI_SIZEOF_ARG) #define SIZEOF_FRAME2 ( 14 * FFI_SIZEOF_ARG )
#define A3_OFF2 (SIZEOF_FRAME2 + 3 * FFI_SIZEOF_ARG)
#define A2_OFF2 (SIZEOF_FRAME2 + 2 * FFI_SIZEOF_ARG)
#define A1_OFF2 (SIZEOF_FRAME2 + 1 * FFI_SIZEOF_ARG)
#define A0_OFF2 (SIZEOF_FRAME2 + 0 * FFI_SIZEOF_ARG)
#define RA_OFF2 (SIZEOF_FRAME2 - 1 * FFI_SIZEOF_ARG)
#define FP_OFF2 (SIZEOF_FRAME2 - 2 * FFI_SIZEOF_ARG)
#define S0_OFF2 (SIZEOF_FRAME2 - 3 * FFI_SIZEOF_ARG)
#define GP_OFF2 (SIZEOF_FRAME2 - 4 * FFI_SIZEOF_ARG)
#define V1_OFF2 (SIZEOF_FRAME2 - 5 * FFI_SIZEOF_ARG)
#define V0_OFF2 (SIZEOF_FRAME2 - 6 * FFI_SIZEOF_ARG)
#define FA_1_1_OFF2 (SIZEOF_FRAME2 - 7 * FFI_SIZEOF_ARG)
#define FA_1_0_OFF2 (SIZEOF_FRAME2 - 8 * FFI_SIZEOF_ARG)
#define FA_0_1_OFF2 (SIZEOF_FRAME2 - 9 * FFI_SIZEOF_ARG)
#define FA_0_0_OFF2 (SIZEOF_FRAME2 - 10 * FFI_SIZEOF_ARG)
.text .text
.align 2 .align 2
@@ -229,28 +218,28 @@ $LFE0:
ffi_closure_O32: ffi_closure_O32:
$LFB1: $LFB1:
# Prologue # Prologue
.frame $fp, SIZEOF_FRAME2, ra .frame $fp, SIZEOF_FRAME2, $31
.set noreorder .set noreorder
.cpload t9 .cpload $25
.set reorder .set reorder
SUBU $sp, SIZEOF_FRAME2 SUBU $sp, SIZEOF_FRAME2
.cprestore GP_OFF2 .cprestore SIZEOF_FRAME2 - 4*FFI_SIZEOF_ARG
$LCFI4: $LCFI4:
REG_S $16, S0_OFF2($sp) # Save s0 REG_S $16, SIZEOF_FRAME2 - 3*FFI_SIZEOF_ARG($sp) # Save s0
REG_S $fp, FP_OFF2($sp) # Save frame pointer REG_S $fp, SIZEOF_FRAME2 - 2*FFI_SIZEOF_ARG($sp) # Save frame pointer
REG_S ra, RA_OFF2($sp) # Save return address REG_S ra, SIZEOF_FRAME2 - 1*FFI_SIZEOF_ARG($sp) # Save return address
$LCFI6: $LCFI6:
move $fp, $sp move $fp, $sp
$LCFI7: $LCFI7:
# Store all possible argument registers. If there are more than # Store all possible argument registers. If there are more than
# four arguments, then they are stored above where we put a3. # four arguments, then they should be stored above where we put $7.
REG_S a0, A0_OFF2($fp) REG_S $4, SIZEOF_FRAME2 + 0*FFI_SIZEOF_ARG($fp)
REG_S a1, A1_OFF2($fp) REG_S $5, SIZEOF_FRAME2 + 1*FFI_SIZEOF_ARG($fp)
REG_S a2, A2_OFF2($fp) REG_S $6, SIZEOF_FRAME2 + 2*FFI_SIZEOF_ARG($fp)
REG_S a3, A3_OFF2($fp) REG_S $7, SIZEOF_FRAME2 + 3*FFI_SIZEOF_ARG($fp)
# Load ABI enum to s0 # Load ABI enum to $16
REG_L $16, 20($8) # cif pointer follows tramp. REG_L $16, 20($8) # cif pointer follows tramp.
REG_L $16, 0($16) # abi is first member. REG_L $16, 0($16) # abi is first member.
@@ -258,16 +247,16 @@ $LCFI7:
bne $16, $13, 1f # Skip fp save if FFI_O32_SOFT_FLOAT bne $16, $13, 1f # Skip fp save if FFI_O32_SOFT_FLOAT
# Store all possible float/double registers. # Store all possible float/double registers.
s.d $f12, FA_0_0_OFF2($fp) s.d $f12, SIZEOF_FRAME2 - 10*FFI_SIZEOF_ARG($fp)
s.d $f14, FA_1_0_OFF2($fp) s.d $f14, SIZEOF_FRAME2 - 8*FFI_SIZEOF_ARG($fp)
1: 1:
# Call ffi_closure_mips_inner_O32 to do the work. # Call ffi_closure_mips_inner_O32 to do the work.
la t9, ffi_closure_mips_inner_O32 la $25, ffi_closure_mips_inner_O32
move a0, $8 # Pointer to the ffi_closure move $4, $8 # Pointer to the ffi_closure
addu a1, $fp, V0_OFF2 addu $5, $fp, SIZEOF_FRAME2 - 6*FFI_SIZEOF_ARG
addu a2, $fp, A0_OFF2 addu $6, $fp, SIZEOF_FRAME2 + 0*FFI_SIZEOF_ARG
addu a3, $fp, FA_0_0_OFF2 addu $7, $fp, SIZEOF_FRAME2 - 10*FFI_SIZEOF_ARG
jalr t9 jalr $31, $25
# Load the return value into the appropriate register. # Load the return value into the appropriate register.
move $8, $2 move $8, $2
@@ -278,22 +267,28 @@ $LCFI7:
bne $16, $13, 1f # Skip fp restore if FFI_O32_SOFT_FLOAT bne $16, $13, 1f # Skip fp restore if FFI_O32_SOFT_FLOAT
li $9, FFI_TYPE_FLOAT li $9, FFI_TYPE_FLOAT
l.s $f0, V0_OFF2($fp) l.s $f0, SIZEOF_FRAME2 - 6*FFI_SIZEOF_ARG($fp)
beq $8, $9, closure_done beq $8, $9, closure_done
li $9, FFI_TYPE_DOUBLE li $9, FFI_TYPE_DOUBLE
l.d $f0, V0_OFF2($fp) l.d $f0, SIZEOF_FRAME2 - 6*FFI_SIZEOF_ARG($fp)
beq $8, $9, closure_done beq $8, $9, closure_done
1: 1:
REG_L $3, V1_OFF2($fp) li $9, FFI_TYPE_SINT64
REG_L $2, V0_OFF2($fp) REG_L $3, SIZEOF_FRAME2 - 5*FFI_SIZEOF_ARG($fp)
beq $8, $9, integer
li $9, FFI_TYPE_UINT64
beq $8, $9, integer
integer:
REG_L $2, SIZEOF_FRAME2 - 6*FFI_SIZEOF_ARG($fp)
closure_done: closure_done:
# Epilogue # Epilogue
move $sp, $fp move $sp, $fp
REG_L $16, S0_OFF2($sp) # Restore s0 REG_L $16, SIZEOF_FRAME2 - 3*FFI_SIZEOF_ARG($sp) # Restore s0
REG_L $fp, FP_OFF2($sp) # Restore frame pointer REG_L $fp, SIZEOF_FRAME2 - 2*FFI_SIZEOF_ARG($sp) # Restore frame pointer
REG_L ra, RA_OFF2($sp) # Restore return address REG_L ra, SIZEOF_FRAME2 - 1*FFI_SIZEOF_ARG($sp) # Restore return address
ADDU $sp, SIZEOF_FRAME2 ADDU $sp, SIZEOF_FRAME2
j ra j ra
$LFE1: $LFE1:

View File

@@ -2,7 +2,6 @@
ffi.c - (c) 2003-2004 Randolph Chung <tausq@debian.org> ffi.c - (c) 2003-2004 Randolph Chung <tausq@debian.org>
HPPA Foreign Function Interface HPPA Foreign Function Interface
HP-UX PA ABI support (c) 2006 Free Software Foundation, Inc.
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
@@ -31,19 +30,15 @@
#include <stdio.h> #include <stdio.h>
#define ROUND_UP(v, a) (((size_t)(v) + (a) - 1) & ~((a) - 1)) #define ROUND_UP(v, a) (((size_t)(v) + (a) - 1) & ~((a) - 1))
#define ROUND_DOWN(v, a) (((size_t)(v) - (a) + 1) & ~((a) - 1))
#define MIN_STACK_SIZE 64 #define MIN_STACK_SIZE 64
#define FIRST_ARG_SLOT 9 #define FIRST_ARG_SLOT 9
#define DEBUG_LEVEL 0 #define DEBUG_LEVEL 0
#define fldw(addr, fpreg) \ #define fldw(addr, fpreg) asm volatile ("fldw 0(%0), %%" #fpreg "L" : : "r"(addr) : #fpreg)
__asm__ volatile ("fldw 0(%0), %%" #fpreg "L" : : "r"(addr) : #fpreg) #define fstw(fpreg, addr) asm volatile ("fstw %%" #fpreg "L, 0(%0)" : : "r"(addr))
#define fstw(fpreg, addr) \ #define fldd(addr, fpreg) asm volatile ("fldd 0(%0), %%" #fpreg : : "r"(addr) : #fpreg)
__asm__ volatile ("fstw %%" #fpreg "L, 0(%0)" : : "r"(addr)) #define fstd(fpreg, addr) asm volatile ("fstd %%" #fpreg "L, 0(%0)" : : "r"(addr))
#define fldd(addr, fpreg) \
__asm__ volatile ("fldd 0(%0), %%" #fpreg : : "r"(addr) : #fpreg)
#define fstd(fpreg, addr) \
__asm__ volatile ("fstd %%" #fpreg "L, 0(%0)" : : "r"(addr))
#define debug(lvl, x...) do { if (lvl <= DEBUG_LEVEL) { printf(x); } } while (0) #define debug(lvl, x...) do { if (lvl <= DEBUG_LEVEL) { printf(x); } } while (0)
@@ -52,19 +47,16 @@ static inline int ffi_struct_type(ffi_type *t)
size_t sz = t->size; size_t sz = t->size;
/* Small structure results are passed in registers, /* Small structure results are passed in registers,
larger ones are passed by pointer. Note that larger ones are passed by pointer. */
small structures of size 2, 4 and 8 differ from
the corresponding integer types in that they have
different alignment requirements. */
if (sz <= 1) if (sz <= 1)
return FFI_TYPE_UINT8; return FFI_TYPE_UINT8;
else if (sz == 2) else if (sz == 2)
return FFI_TYPE_SMALL_STRUCT2; return FFI_TYPE_UINT16;
else if (sz == 3) else if (sz == 3)
return FFI_TYPE_SMALL_STRUCT3; return FFI_TYPE_SMALL_STRUCT3;
else if (sz == 4) else if (sz == 4)
return FFI_TYPE_SMALL_STRUCT4; return FFI_TYPE_UINT32;
else if (sz == 5) else if (sz == 5)
return FFI_TYPE_SMALL_STRUCT5; return FFI_TYPE_SMALL_STRUCT5;
else if (sz == 6) else if (sz == 6)
@@ -72,7 +64,7 @@ static inline int ffi_struct_type(ffi_type *t)
else if (sz == 7) else if (sz == 7)
return FFI_TYPE_SMALL_STRUCT7; return FFI_TYPE_SMALL_STRUCT7;
else if (sz <= 8) else if (sz <= 8)
return FFI_TYPE_SMALL_STRUCT8; return FFI_TYPE_UINT64;
else else
return FFI_TYPE_STRUCT; /* else, we pass it by pointer. */ return FFI_TYPE_STRUCT; /* else, we pass it by pointer. */
} }
@@ -80,46 +72,27 @@ static inline int ffi_struct_type(ffi_type *t)
/* PA has a downward growing stack, which looks like this: /* PA has a downward growing stack, which looks like this:
Offset Offset
[ Variable args ] [ Variable args ]
SP = (4*(n+9)) arg word N SP = (4*(n+9)) arg word N
... ...
SP-52 arg word 4 SP-52 arg word 4
[ Fixed args ] [ Fixed args ]
SP-48 arg word 3 SP-48 arg word 3
SP-44 arg word 2 SP-44 arg word 2
SP-40 arg word 1 SP-40 arg word 1
SP-36 arg word 0 SP-36 arg word 0
[ Frame marker ] [ Frame marker ]
... ...
SP-20 RP SP-20 RP
SP-4 previous SP SP-4 previous SP
The first four argument words on the stack are reserved for use by First 4 non-FP 32-bit args are passed in gr26, gr25, gr24 and gr23
the callee. Instead, the general and floating registers replace First 2 non-FP 64-bit args are passed in register pairs, starting
the first four argument slots. Non FP arguments are passed solely on an even numbered register (i.e. r26/r25 and r24+r23)
in the general registers. FP arguments are passed in both general First 4 FP 32-bit arguments are passed in fr4L, fr5L, fr6L and fr7L
and floating registers when using libffi. First 2 FP 64-bit arguments are passed in fr5 and fr7
The rest are passed on the stack starting at SP-52, but 64-bit
Non-FP 32-bit args are passed in gr26, gr25, gr24 and gr23. arguments need to be aligned to an 8-byte boundary
Non-FP 64-bit args are passed in register pairs, starting
on an odd numbered register (i.e. r25+r26 and r23+r24).
FP 32-bit arguments are passed in fr4L, fr5L, fr6L and fr7L.
FP 64-bit arguments are passed in fr5 and fr7.
The registers are allocated in the same manner as stack slots.
This allows the callee to save its arguments on the stack if
necessary:
arg word 3 -> gr23 or fr7L
arg word 2 -> gr24 or fr6L or fr7R
arg word 1 -> gr25 or fr5L
arg word 0 -> gr26 or fr4L or fr5R
Note that fr4R and fr6R are never used for arguments (i.e.,
doubles are not passed in fr4 or fr6).
The rest of the arguments are passed on the stack starting at SP-52,
but 64-bit arguments need to be aligned to an 8-byte boundary
This means we can have holes either in the register allocation, This means we can have holes either in the register allocation,
or in the stack. */ or in the stack. */
@@ -135,17 +108,17 @@ static inline int ffi_struct_type(ffi_type *t)
NOTE: We load floating point args in this function... that means we NOTE: We load floating point args in this function... that means we
assume gcc will not mess with fp regs in here. */ assume gcc will not mess with fp regs in here. */
void ffi_prep_args_pa32(UINT32 *stack, extended_cif *ecif, unsigned bytes) /*@-exportheader@*/
void ffi_prep_args_LINUX(UINT32 *stack, extended_cif *ecif, unsigned bytes)
/*@=exportheader@*/
{ {
register unsigned int i; register unsigned int i;
register ffi_type **p_arg; register ffi_type **p_arg;
register void **p_argv; register void **p_argv;
unsigned int slot = FIRST_ARG_SLOT; unsigned int slot = FIRST_ARG_SLOT - 1;
char *dest_cpy; char *dest_cpy;
size_t len;
debug(1, "%s: stack = %p, ecif = %p, bytes = %u\n", __FUNCTION__, stack, debug(1, "%s: stack = %p, ecif = %p, bytes = %u\n", __FUNCTION__, stack, ecif, bytes);
ecif, bytes);
p_arg = ecif->cif->arg_types; p_arg = ecif->cif->arg_types;
p_argv = ecif->avalue; p_argv = ecif->avalue;
@@ -157,105 +130,116 @@ void ffi_prep_args_pa32(UINT32 *stack, extended_cif *ecif, unsigned bytes)
switch (type) switch (type)
{ {
case FFI_TYPE_SINT8: case FFI_TYPE_SINT8:
slot++;
*(SINT32 *)(stack - slot) = *(SINT8 *)(*p_argv); *(SINT32 *)(stack - slot) = *(SINT8 *)(*p_argv);
break; break;
case FFI_TYPE_UINT8: case FFI_TYPE_UINT8:
slot++;
*(UINT32 *)(stack - slot) = *(UINT8 *)(*p_argv); *(UINT32 *)(stack - slot) = *(UINT8 *)(*p_argv);
break; break;
case FFI_TYPE_SINT16: case FFI_TYPE_SINT16:
slot++;
*(SINT32 *)(stack - slot) = *(SINT16 *)(*p_argv); *(SINT32 *)(stack - slot) = *(SINT16 *)(*p_argv);
break; break;
case FFI_TYPE_UINT16: case FFI_TYPE_UINT16:
slot++;
*(UINT32 *)(stack - slot) = *(UINT16 *)(*p_argv); *(UINT32 *)(stack - slot) = *(UINT16 *)(*p_argv);
break; break;
case FFI_TYPE_UINT32: case FFI_TYPE_UINT32:
case FFI_TYPE_SINT32: case FFI_TYPE_SINT32:
case FFI_TYPE_POINTER: case FFI_TYPE_POINTER:
debug(3, "Storing UINT32 %u in slot %u\n", *(UINT32 *)(*p_argv), slot++;
slot); debug(3, "Storing UINT32 %u in slot %u\n", *(UINT32 *)(*p_argv), slot);
*(UINT32 *)(stack - slot) = *(UINT32 *)(*p_argv); *(UINT32 *)(stack - slot) = *(UINT32 *)(*p_argv);
break; break;
case FFI_TYPE_UINT64: case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64: case FFI_TYPE_SINT64:
/* Align slot for 64-bit type. */ slot += 2;
slot += (slot & 1) ? 1 : 2; if (slot & 1)
*(UINT64 *)(stack - slot) = *(UINT64 *)(*p_argv); slot++;
*(UINT32 *)(stack - slot) = (*(UINT64 *)(*p_argv)) >> 32;
*(UINT32 *)(stack - slot + 1) = (*(UINT64 *)(*p_argv)) & 0xffffffffUL;
break; break;
case FFI_TYPE_FLOAT: case FFI_TYPE_FLOAT:
/* First 4 args go in fr4L - fr7L. */ /* First 4 args go in fr4L - fr7L */
debug(3, "Storing UINT32(float) in slot %u\n", slot); slot++;
*(UINT32 *)(stack - slot) = *(UINT32 *)(*p_argv);
switch (slot - FIRST_ARG_SLOT) switch (slot - FIRST_ARG_SLOT)
{ {
/* First 4 args go in fr4L - fr7L. */ case 0: fldw(*p_argv, fr4); break;
case 0: fldw(stack - slot, fr4); break; case 1: fldw(*p_argv, fr5); break;
case 1: fldw(stack - slot, fr5); break; case 2: fldw(*p_argv, fr6); break;
case 2: fldw(stack - slot, fr6); break; case 3: fldw(*p_argv, fr7); break;
case 3: fldw(stack - slot, fr7); break; default:
/* Other ones are just passed on the stack. */
debug(3, "Storing UINT32(float) in slot %u\n", slot);
*(UINT32 *)(stack - slot) = *(UINT32 *)(*p_argv);
break;
} }
break; break;
case FFI_TYPE_DOUBLE: case FFI_TYPE_DOUBLE:
/* Align slot for 64-bit type. */ slot += 2;
slot += (slot & 1) ? 1 : 2; if (slot & 1)
debug(3, "Storing UINT64(double) at slot %u\n", slot); slot++;
*(UINT64 *)(stack - slot) = *(UINT64 *)(*p_argv); switch (slot - FIRST_ARG_SLOT + 1)
switch (slot - FIRST_ARG_SLOT)
{ {
/* First 2 args go in fr5, fr7. */ /* First 2 args go in fr5, fr7 */
case 1: fldd(stack - slot, fr5); break; case 2: fldd(*p_argv, fr5); break;
case 3: fldd(stack - slot, fr7); break; case 4: fldd(*p_argv, fr7); break;
default:
debug(3, "Storing UINT64(double) at slot %u\n", slot);
*(UINT64 *)(stack - slot) = *(UINT64 *)(*p_argv);
break;
} }
break; break;
#ifdef PA_HPUX
case FFI_TYPE_LONGDOUBLE:
/* Long doubles are passed in the same manner as structures
larger than 8 bytes. */
*(UINT32 *)(stack - slot) = (UINT32)(*p_argv);
break;
#endif
case FFI_TYPE_STRUCT: case FFI_TYPE_STRUCT:
/* Structs smaller or equal than 4 bytes are passed in one /* Structs smaller or equal than 4 bytes are passed in one
register. Structs smaller or equal 8 bytes are passed in two register. Structs smaller or equal 8 bytes are passed in two
registers. Larger structures are passed by pointer. */ registers. Larger structures are passed by pointer. */
len = (*p_arg)->size; if((*p_arg)->size <= 4)
if (len <= 4)
{ {
dest_cpy = (char *)(stack - slot) + 4 - len; slot++;
memcpy(dest_cpy, (char *)*p_argv, len); dest_cpy = (char *)(stack - slot);
dest_cpy += 4 - (*p_arg)->size;
memcpy((char *)dest_cpy, (char *)*p_argv, (*p_arg)->size);
} }
else if (len <= 8) else if ((*p_arg)->size <= 8)
{ {
slot += (slot & 1) ? 1 : 2; slot += 2;
dest_cpy = (char *)(stack - slot) + 8 - len; if (slot & 1)
memcpy(dest_cpy, (char *)*p_argv, len); slot++;
dest_cpy = (char *)(stack - slot);
dest_cpy += 8 - (*p_arg)->size;
memcpy((char *)dest_cpy, (char *)*p_argv, (*p_arg)->size);
} }
else else
*(UINT32 *)(stack - slot) = (UINT32)(*p_argv); {
slot++;
*(UINT32 *)(stack - slot) = (UINT32)(*p_argv);
}
break; break;
default: default:
FFI_ASSERT(0); FFI_ASSERT(0);
} }
slot++;
p_arg++; p_arg++;
p_argv++; p_argv++;
} }
/* Make sure we didn't mess up and scribble on the stack. */ /* Make sure we didn't mess up and scribble on the stack. */
{ {
unsigned int n; int n;
debug(5, "Stack setup:\n"); debug(5, "Stack setup:\n");
for (n = 0; n < (bytes + 3) / 4; n++) for (n = 0; n < (bytes + 3) / 4; n++)
@@ -271,7 +255,7 @@ void ffi_prep_args_pa32(UINT32 *stack, extended_cif *ecif, unsigned bytes)
return; return;
} }
static void ffi_size_stack_pa32(ffi_cif *cif) static void ffi_size_stack_LINUX(ffi_cif *cif)
{ {
ffi_type **ptr; ffi_type **ptr;
int i; int i;
@@ -289,9 +273,6 @@ static void ffi_size_stack_pa32(ffi_cif *cif)
z += 2 + (z & 1); /* must start on even regs, so we may waste one */ z += 2 + (z & 1); /* must start on even regs, so we may waste one */
break; break;
#ifdef PA_HPUX
case FFI_TYPE_LONGDOUBLE:
#endif
case FFI_TYPE_STRUCT: case FFI_TYPE_STRUCT:
z += 1; /* pass by ptr, callee will copy */ z += 1; /* pass by ptr, callee will copy */
break; break;
@@ -323,13 +304,6 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
cif->flags = (unsigned) cif->rtype->type; cif->flags = (unsigned) cif->rtype->type;
break; break;
#ifdef PA_HPUX
case FFI_TYPE_LONGDOUBLE:
/* Long doubles are treated like a structure. */
cif->flags = FFI_TYPE_STRUCT;
break;
#endif
case FFI_TYPE_STRUCT: case FFI_TYPE_STRUCT:
/* For the return type we have to check the size of the structures. /* For the return type we have to check the size of the structures.
If the size is smaller or equal 4 bytes, the result is given back If the size is smaller or equal 4 bytes, the result is given back
@@ -353,8 +327,8 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
own stack sizing. */ own stack sizing. */
switch (cif->abi) switch (cif->abi)
{ {
case FFI_PA32: case FFI_LINUX:
ffi_size_stack_pa32(cif); ffi_size_stack_LINUX(cif);
break; break;
default: default:
@@ -365,11 +339,20 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
return FFI_OK; return FFI_OK;
} }
extern void ffi_call_pa32(void (*)(UINT32 *, extended_cif *, unsigned), /*@-declundef@*/
extended_cif *, unsigned, unsigned, unsigned *, /*@-exportheader@*/
void (*fn)()); extern void ffi_call_LINUX(void (*)(UINT32 *, extended_cif *, unsigned),
/*@out@*/ extended_cif *,
unsigned, unsigned,
/*@out@*/ unsigned *,
void (*fn)());
/*@=declundef@*/
/*@=exportheader@*/
void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) void ffi_call(/*@dependent@*/ ffi_cif *cif,
void (*fn)(),
/*@out@*/ void *rvalue,
/*@dependent@*/ void **avalue)
{ {
extended_cif ecif; extended_cif ecif;
@@ -379,15 +362,12 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
/* If the return value is a struct and we don't have a return /* If the return value is a struct and we don't have a return
value address then we need to make one. */ value address then we need to make one. */
if (rvalue == NULL if ((rvalue == NULL) &&
#ifdef PA_HPUX (cif->rtype->type == FFI_TYPE_STRUCT))
&& (cif->rtype->type == FFI_TYPE_STRUCT
|| cif->rtype->type == FFI_TYPE_LONGDOUBLE))
#else
&& cif->rtype->type == FFI_TYPE_STRUCT)
#endif
{ {
/*@-sysunrecog@*/
ecif.rvalue = alloca(cif->rtype->size); ecif.rvalue = alloca(cif->rtype->size);
/*@=sysunrecog@*/
} }
else else
ecif.rvalue = rvalue; ecif.rvalue = rvalue;
@@ -395,10 +375,12 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
switch (cif->abi) switch (cif->abi)
{ {
case FFI_PA32: case FFI_LINUX:
debug(3, "Calling ffi_call_pa32: ecif=%p, bytes=%u, flags=%u, rvalue=%p, fn=%p\n", &ecif, cif->bytes, cif->flags, ecif.rvalue, (void *)fn); /*@-usedef@*/
ffi_call_pa32(ffi_prep_args_pa32, &ecif, cif->bytes, debug(2, "Calling ffi_call_LINUX: ecif=%p, bytes=%u, flags=%u, rvalue=%p, fn=%p\n", &ecif, cif->bytes, cif->flags, ecif.rvalue, (void *)fn);
ffi_call_LINUX(ffi_prep_args_LINUX, &ecif, cif->bytes,
cif->flags, ecif.rvalue, fn); cif->flags, ecif.rvalue, fn);
/*@=usedef@*/
break; break;
default: default:
@@ -412,7 +394,7 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
the stack, and we need to fill them into a cif structure and invoke the stack, and we need to fill them into a cif structure and invoke
the user function. This really ought to be in asm to make sure the user function. This really ought to be in asm to make sure
the compiler doesn't do things we don't expect. */ the compiler doesn't do things we don't expect. */
ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack) UINT32 ffi_closure_inner_LINUX(ffi_closure *closure, UINT32 *stack)
{ {
ffi_cif *cif; ffi_cif *cif;
void **avalue; void **avalue;
@@ -420,8 +402,7 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack)
UINT32 ret[2]; /* function can return up to 64-bits in registers */ UINT32 ret[2]; /* function can return up to 64-bits in registers */
ffi_type **p_arg; ffi_type **p_arg;
char *tmp; char *tmp;
int i, avn; int i, avn, slot = FIRST_ARG_SLOT - 1;
unsigned int slot = FIRST_ARG_SLOT;
register UINT32 r28 asm("r28"); register UINT32 r28 asm("r28");
cif = closure->cif; cif = closure->cif;
@@ -449,23 +430,20 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack)
case FFI_TYPE_SINT32: case FFI_TYPE_SINT32:
case FFI_TYPE_UINT32: case FFI_TYPE_UINT32:
case FFI_TYPE_POINTER: case FFI_TYPE_POINTER:
slot++;
avalue[i] = (char *)(stack - slot) + sizeof(UINT32) - (*p_arg)->size; avalue[i] = (char *)(stack - slot) + sizeof(UINT32) - (*p_arg)->size;
break; break;
case FFI_TYPE_SINT64: case FFI_TYPE_SINT64:
case FFI_TYPE_UINT64: case FFI_TYPE_UINT64:
slot += (slot & 1) ? 1 : 2; slot += 2;
if (slot & 1)
slot++;
avalue[i] = (void *)(stack - slot); avalue[i] = (void *)(stack - slot);
break; break;
case FFI_TYPE_FLOAT: case FFI_TYPE_FLOAT:
#ifdef PA_LINUX slot++;
/* The closure call is indirect. In Linux, floating point
arguments in indirect calls with a prototype are passed
in the floating point registers instead of the general
registers. So, we need to replace what was previously
stored in the current slot with the value in the
corresponding floating point register. */
switch (slot - FIRST_ARG_SLOT) switch (slot - FIRST_ARG_SLOT)
{ {
case 0: fstw(fr4, (void *)(stack - slot)); break; case 0: fstw(fr4, (void *)(stack - slot)); break;
@@ -473,20 +451,18 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack)
case 2: fstw(fr6, (void *)(stack - slot)); break; case 2: fstw(fr6, (void *)(stack - slot)); break;
case 3: fstw(fr7, (void *)(stack - slot)); break; case 3: fstw(fr7, (void *)(stack - slot)); break;
} }
#endif
avalue[i] = (void *)(stack - slot); avalue[i] = (void *)(stack - slot);
break; break;
case FFI_TYPE_DOUBLE: case FFI_TYPE_DOUBLE:
slot += (slot & 1) ? 1 : 2; slot += 2;
#ifdef PA_LINUX if (slot & 1)
/* See previous comment for FFI_TYPE_FLOAT. */ slot++;
switch (slot - FIRST_ARG_SLOT) switch (slot - FIRST_ARG_SLOT + 1)
{ {
case 1: fstd(fr5, (void *)(stack - slot)); break; case 2: fstd(fr5, (void *)(stack - slot)); break;
case 3: fstd(fr7, (void *)(stack - slot)); break; case 4: fstd(fr7, (void *)(stack - slot)); break;
} }
#endif
avalue[i] = (void *)(stack - slot); avalue[i] = (void *)(stack - slot);
break; break;
@@ -494,36 +470,35 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack)
/* Structs smaller or equal than 4 bytes are passed in one /* Structs smaller or equal than 4 bytes are passed in one
register. Structs smaller or equal 8 bytes are passed in two register. Structs smaller or equal 8 bytes are passed in two
registers. Larger structures are passed by pointer. */ registers. Larger structures are passed by pointer. */
if((*p_arg)->size <= 4) if((*p_arg)->size <= 4) {
{ slot++;
avalue[i] = (void *)(stack - slot) + sizeof(UINT32) - avalue[i] = (void *)(stack - slot) + sizeof(UINT32) -
(*p_arg)->size; (*p_arg)->size;
} } else if ((*p_arg)->size <= 8) {
else if ((*p_arg)->size <= 8) slot += 2;
{ if (slot & 1)
slot += (slot & 1) ? 1 : 2; slot++;
avalue[i] = (void *)(stack - slot) + sizeof(UINT64) - avalue[i] = (void *)(stack - slot) + sizeof(UINT64) -
(*p_arg)->size; (*p_arg)->size;
} } else {
else slot++;
avalue[i] = (void *) *(stack - slot); avalue[i] = (void *) *(stack - slot);
}
break; break;
default: default:
FFI_ASSERT(0); FFI_ASSERT(0);
} }
slot++;
p_arg++; p_arg++;
} }
/* Invoke the closure. */ /* Invoke the closure. */
(closure->fun) (cif, rvalue, avalue, closure->user_data); (closure->fun) (cif, rvalue, avalue, closure->user_data);
debug(3, "after calling function, ret[0] = %08x, ret[1] = %08x\n", ret[0], debug(3, "after calling function, ret[0] = %08x, ret[1] = %08x\n", ret[0], ret[1]);
ret[1]);
/* Store the result using the lower 2 bytes of the flags. */ /* Store the result */
switch (cif->flags) switch (cif->flags)
{ {
case FFI_TYPE_UINT8: case FFI_TYPE_UINT8:
@@ -561,9 +536,7 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack)
/* Don't need a return value, done by caller. */ /* Don't need a return value, done by caller. */
break; break;
case FFI_TYPE_SMALL_STRUCT2:
case FFI_TYPE_SMALL_STRUCT3: case FFI_TYPE_SMALL_STRUCT3:
case FFI_TYPE_SMALL_STRUCT4:
tmp = (void*)(stack - FIRST_ARG_SLOT); tmp = (void*)(stack - FIRST_ARG_SLOT);
tmp += 4 - cif->rtype->size; tmp += 4 - cif->rtype->size;
memcpy((void*)tmp, &ret[0], cif->rtype->size); memcpy((void*)tmp, &ret[0], cif->rtype->size);
@@ -572,7 +545,6 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack)
case FFI_TYPE_SMALL_STRUCT5: case FFI_TYPE_SMALL_STRUCT5:
case FFI_TYPE_SMALL_STRUCT6: case FFI_TYPE_SMALL_STRUCT6:
case FFI_TYPE_SMALL_STRUCT7: case FFI_TYPE_SMALL_STRUCT7:
case FFI_TYPE_SMALL_STRUCT8:
{ {
unsigned int ret2[2]; unsigned int ret2[2];
int off; int off;
@@ -610,7 +582,7 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack)
cif specifies the argument and result types for fun. cif specifies the argument and result types for fun.
The cif must already be prep'ed. */ The cif must already be prep'ed. */
extern void ffi_closure_pa32(void); void ffi_closure_LINUX(void);
ffi_status ffi_status
ffi_prep_closure (ffi_closure* closure, ffi_prep_closure (ffi_closure* closure,
@@ -619,83 +591,30 @@ ffi_prep_closure (ffi_closure* closure,
void *user_data) void *user_data)
{ {
UINT32 *tramp = (UINT32 *)(closure->tramp); UINT32 *tramp = (UINT32 *)(closure->tramp);
#ifdef PA_HPUX
UINT32 *tmp;
#endif
FFI_ASSERT (cif->abi == FFI_PA32); FFI_ASSERT (cif->abi == FFI_LINUX);
/* Make a small trampoline that will branch to our /* Make a small trampoline that will branch to our
handler function. Use PC-relative addressing. */ handler function. Use PC-relative addressing. */
#ifdef PA_LINUX tramp[0] = 0xeaa00000; /* b,l .+8, %r21 ; %r21 <- pc+8 */
tramp[0] = 0xeaa00000; /* b,l .+8,%r21 ; %r21 <- pc+8 */ tramp[1] = 0xd6a01c1e; /* depi 0,31,2, %r21 ; mask priv bits */
tramp[1] = 0xd6a01c1e; /* depi 0,31,2,%r21 ; mask priv bits */ tramp[2] = 0x4aa10028; /* ldw 20(%r21), %r1 ; load plabel */
tramp[2] = 0x4aa10028; /* ldw 20(%r21),%r1 ; load plabel */ tramp[3] = 0x36b53ff1; /* ldo -8(%r21), %r21 ; get closure addr */
tramp[3] = 0x36b53ff1; /* ldo -8(%r21),%r21 ; get closure addr */ tramp[4] = 0x0c201096; /* ldw 0(%r1), %r22 ; address of handler */
tramp[4] = 0x0c201096; /* ldw 0(%r1),%r22 ; address of handler */ tramp[5] = 0xeac0c000; /* bv %r0(%r22) ; branch to handler */
tramp[5] = 0xeac0c000; /* bv%r0(%r22) ; branch to handler */ tramp[6] = 0x0c281093; /* ldw 4(%r1), %r19 ; GP of handler */
tramp[6] = 0x0c281093; /* ldw 4(%r1),%r19 ; GP of handler */ tramp[7] = ((UINT32)(ffi_closure_LINUX) & ~2);
tramp[7] = ((UINT32)(ffi_closure_pa32) & ~2);
/* Flush d/icache -- have to flush up 2 two lines because of /* Flush d/icache -- have to flush up 2 two lines because of
alignment. */ alignment. */
__asm__ volatile( asm volatile (
"fdc 0(%0)\n\t" "fdc 0(%0)\n"
"fdc %1(%0)\n\t" "fdc %1(%0)\n"
"fic 0(%%sr4, %0)\n\t" "fic 0(%%sr4, %0)\n"
"fic %1(%%sr4, %0)\n\t" "fic %1(%%sr4, %0)\n"
"sync\n\t" "sync\n"
"nop\n\t" : : "r"((unsigned long)tramp & ~31), "r"(32 /* stride */));
"nop\n\t"
"nop\n\t"
"nop\n\t"
"nop\n\t"
"nop\n\t"
"nop\n"
:
: "r"((unsigned long)tramp & ~31),
"r"(32 /* stride */)
: "memory");
#endif
#ifdef PA_HPUX
tramp[0] = 0xeaa00000; /* b,l .+8,%r21 ; %r21 <- pc+8 */
tramp[1] = 0xd6a01c1e; /* depi 0,31,2,%r21 ; mask priv bits */
tramp[2] = 0x4aa10038; /* ldw 28(%r21),%r1 ; load plabel */
tramp[3] = 0x36b53ff1; /* ldo -8(%r21),%r21 ; get closure addr */
tramp[4] = 0x0c201096; /* ldw 0(%r1),%r22 ; address of handler */
tramp[5] = 0x02c010b4; /* ldsid (%r22),%r20 ; load space id */
tramp[6] = 0x00141820; /* mtsp %r20,%sr0 ; into %sr0 */
tramp[7] = 0xe2c00000; /* be 0(%sr0,%r22) ; branch to handler */
tramp[8] = 0x0c281093; /* ldw 4(%r1),%r19 ; GP of handler */
tramp[9] = ((UINT32)(ffi_closure_pa32) & ~2);
/* Flush d/icache -- have to flush three lines because of alignment. */
__asm__ volatile(
"copy %1,%0\n\t"
"fdc,m %2(%0)\n\t"
"fdc,m %2(%0)\n\t"
"fdc,m %2(%0)\n\t"
"ldsid (%1),%0\n\t"
"mtsp %0,%%sr0\n\t"
"copy %1,%0\n\t"
"fic,m %2(%%sr0,%0)\n\t"
"fic,m %2(%%sr0,%0)\n\t"
"fic,m %2(%%sr0,%0)\n\t"
"sync\n\t"
"nop\n\t"
"nop\n\t"
"nop\n\t"
"nop\n\t"
"nop\n\t"
"nop\n\t"
"nop\n"
: "=&r" ((unsigned long)tmp)
: "r" ((unsigned long)tramp & ~31),
"r" (32/* stride */)
: "memory");
#endif
closure->cif = cif; closure->cif = cif;
closure->user_data = user_data; closure->user_data = user_data;

View File

@@ -35,20 +35,9 @@ typedef signed long ffi_sarg;
typedef enum ffi_abi { typedef enum ffi_abi {
FFI_FIRST_ABI = 0, FFI_FIRST_ABI = 0,
#ifdef PA_LINUX #ifdef PA
FFI_PA32, FFI_LINUX,
FFI_DEFAULT_ABI = FFI_PA32, FFI_DEFAULT_ABI = FFI_LINUX,
#endif
#ifdef PA_HPUX
FFI_PA32,
FFI_DEFAULT_ABI = FFI_PA32,
#endif
#ifdef PA64_HPUX
#error "PA64_HPUX FFI is not yet implemented"
FFI_PA64,
FFI_DEFAULT_ABI = FFI_PA64,
#endif #endif
FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
@@ -60,17 +49,11 @@ typedef enum ffi_abi {
#define FFI_CLOSURES 1 #define FFI_CLOSURES 1
#define FFI_NATIVE_RAW_API 0 #define FFI_NATIVE_RAW_API 0
#ifdef PA_LINUX
#define FFI_TRAMPOLINE_SIZE 32 #define FFI_TRAMPOLINE_SIZE 32
#else
#define FFI_TRAMPOLINE_SIZE 40 #define FFI_TYPE_SMALL_STRUCT3 -1
#define FFI_TYPE_SMALL_STRUCT5 -2
#define FFI_TYPE_SMALL_STRUCT6 -3
#define FFI_TYPE_SMALL_STRUCT7 -4
#endif #endif
#define FFI_TYPE_SMALL_STRUCT2 -1
#define FFI_TYPE_SMALL_STRUCT3 -2
#define FFI_TYPE_SMALL_STRUCT4 -3
#define FFI_TYPE_SMALL_STRUCT5 -4
#define FFI_TYPE_SMALL_STRUCT6 -5
#define FFI_TYPE_SMALL_STRUCT7 -6
#define FFI_TYPE_SMALL_STRUCT8 -7
#endif

View File

@@ -31,7 +31,7 @@
.level 1.1 .level 1.1
.align 4 .align 4
/* void ffi_call_pa32(void (*)(char *, extended_cif *), /* void ffi_call_LINUX(void (*)(char *, extended_cif *),
extended_cif *ecif, extended_cif *ecif,
unsigned bytes, unsigned bytes,
unsigned flags, unsigned flags,
@@ -39,12 +39,12 @@
void (*fn)()); void (*fn)());
*/ */
.export ffi_call_pa32,code .export ffi_call_LINUX,code
.import ffi_prep_args_pa32,code .import ffi_prep_args_LINUX,code
.type ffi_call_pa32, @function .type ffi_call_LINUX, @function
.LFB1: .LFB1:
ffi_call_pa32: ffi_call_LINUX:
.proc .proc
.callinfo FRAME=64,CALLS,SAVE_RP,SAVE_SP,ENTRY_GR=4 .callinfo FRAME=64,CALLS,SAVE_RP,SAVE_SP,ENTRY_GR=4
.entry .entry
@@ -63,7 +63,7 @@ ffi_call_pa32:
[ 64-bytes register save area ] <- %r4 [ 64-bytes register save area ] <- %r4
[ Stack space for actual call, passed as ] <- %arg0 [ Stack space for actual call, passed as ] <- %arg0
[ arg0 to ffi_prep_args_pa32 ] [ arg0 to ffi_prep_args_LINUX ]
[ Stack for calling prep_args ] <- %sp [ Stack for calling prep_args ] <- %sp
*/ */
@@ -73,14 +73,14 @@ ffi_call_pa32:
.LCFI13: .LCFI13:
copy %sp, %r4 copy %sp, %r4
addl %arg2, %r4, %arg0 /* arg stack */ addl %arg2, %r4, %arg0 /* arg stack */
stw %arg3, -48(%r3) /* save flags; we need it later */ stw %arg3, -48(%r3) /* save flags; we need it later */
/* Call prep_args: /* Call prep_args:
%arg0(stack) -- set up above %arg0(stack) -- set up above
%arg1(ecif) -- same as incoming param %arg1(ecif) -- same as incoming param
%arg2(bytes) -- same as incoming param */ %arg2(bytes) -- same as incoming param */
bl ffi_prep_args_pa32,%r2 bl ffi_prep_args_LINUX,%r2
ldo 64(%arg0), %sp ldo 64(%arg0), %sp
ldo -64(%sp), %sp ldo -64(%sp), %sp
@@ -106,139 +106,90 @@ ffi_call_pa32:
/* Store the result according to the return type. */ /* Store the result according to the return type. */
.Lcheckint: checksmst3:
comib,<>,n FFI_TYPE_INT, %r21, .Lcheckint8 comib,<>,n FFI_TYPE_SMALL_STRUCT3, %r21, checksmst567
b .Ldone /* 3-byte structs are returned in ret0 as ??xxyyzz. Shift
stw %ret0, 0(%r20) left 8 bits to write to the result structure. */
zdep %ret0, 23, 24, %r22
b done
stw %r22, 0(%r20)
.Lcheckint8: checksmst567:
comib,<>,n FFI_TYPE_UINT8, %r21, .Lcheckint16 /* 5-7 byte values are returned right justified:
b .Ldone
stb %ret0, 0(%r20)
.Lcheckint16:
comib,<>,n FFI_TYPE_UINT16, %r21, .Lcheckdbl
b .Ldone
sth %ret0, 0(%r20)
.Lcheckdbl:
comib,<>,n FFI_TYPE_DOUBLE, %r21, .Lcheckfloat
b .Ldone
fstd %fr4,0(%r20)
.Lcheckfloat:
comib,<>,n FFI_TYPE_FLOAT, %r21, .Lcheckll
b .Ldone
fstw %fr4L,0(%r20)
.Lcheckll:
comib,<>,n FFI_TYPE_UINT64, %r21, .Lchecksmst2
stw %ret0, 0(%r20)
b .Ldone
stw %ret1, 4(%r20)
.Lchecksmst2:
comib,<>,n FFI_TYPE_SMALL_STRUCT2, %r21, .Lchecksmst3
/* 2-byte structs are returned in ret0 as ????xxyy. */
extru %ret0, 23, 8, %r22
stbs,ma %r22, 1(%r20)
b .Ldone
stb %ret0, 0(%r20)
.Lchecksmst3:
comib,<>,n FFI_TYPE_SMALL_STRUCT3, %r21, .Lchecksmst4
/* 3-byte structs are returned in ret0 as ??xxyyzz. */
extru %ret0, 15, 8, %r22
stbs,ma %r22, 1(%r20)
extru %ret0, 23, 8, %r22
stbs,ma %r22, 1(%r20)
b .Ldone
stb %ret0, 0(%r20)
.Lchecksmst4:
comib,<>,n FFI_TYPE_SMALL_STRUCT4, %r21, .Lchecksmst5
/* 4-byte structs are returned in ret0 as wwxxyyzz. */
extru %ret0, 7, 8, %r22
stbs,ma %r22, 1(%r20)
extru %ret0, 15, 8, %r22
stbs,ma %r22, 1(%r20)
extru %ret0, 23, 8, %r22
stbs,ma %r22, 1(%r20)
b .Ldone
stb %ret0, 0(%r20)
.Lchecksmst5:
comib,<>,n FFI_TYPE_SMALL_STRUCT5, %r21, .Lchecksmst6
/* 5 byte values are returned right justified:
ret0 ret1 ret0 ret1
5: ??????aa bbccddee */ 5: ??????aa bbccddee
stbs,ma %ret0, 1(%r20) 6: ????aabb ccddeeff
extru %ret1, 7, 8, %r22 7: ??aabbcc ddeeffgg
stbs,ma %r22, 1(%r20)
extru %ret1, 15, 8, %r22
stbs,ma %r22, 1(%r20)
extru %ret1, 23, 8, %r22
stbs,ma %r22, 1(%r20)
b .Ldone
stb %ret1, 0(%r20)
.Lchecksmst6: To store this in the result, write the first 4 bytes into a temp
comib,<>,n FFI_TYPE_SMALL_STRUCT6, %r21, .Lchecksmst7 register using shrpw (t1 = aabbccdd), followed by a rotation of
/* 6 byte values are returned right justified: ret1:
ret0 ret1
6: ????aabb ccddeeff */
extru %ret0, 23, 8, %r22
stbs,ma %r22, 1(%r20)
stbs,ma %ret0, 1(%r20)
extru %ret1, 7, 8, %r22
stbs,ma %r22, 1(%r20)
extru %ret1, 15, 8, %r22
stbs,ma %r22, 1(%r20)
extru %ret1, 23, 8, %r22
stbs,ma %r22, 1(%r20)
b .Ldone
stb %ret1, 0(%r20)
.Lchecksmst7: ret0 ret1 ret1
comib,<>,n FFI_TYPE_SMALL_STRUCT7, %r21, .Lchecksmst8 5: ??????aa bbccddee -> eebbccdd (rotate 8)
/* 7 byte values are returned right justified: 6: ????aabb ccddeeff -> eeffccdd (rotate 16)
ret0 ret1 7: ??aabbcc ddeeffgg -> eeffggdd (rotate 24)
7: ??aabbcc ddeeffgg */
extru %ret0, 15, 8, %r22
stbs,ma %r22, 1(%r20)
extru %ret0, 23, 8, %r22
stbs,ma %r22, 1(%r20)
stbs,ma %ret0, 1(%r20)
extru %ret1, 7, 8, %r22
stbs,ma %r22, 1(%r20)
extru %ret1, 15, 8, %r22
stbs,ma %r22, 1(%r20)
extru %ret1, 23, 8, %r22
stbs,ma %r22, 1(%r20)
b .Ldone
stb %ret1, 0(%r20)
.Lchecksmst8: then we write (t1, ret1) into the result. */
comib,<>,n FFI_TYPE_SMALL_STRUCT8, %r21, .Ldone
/* 8 byte values are returned right justified:
ret0 ret1
8: aabbccdd eeffgghh */
extru %ret0, 7, 8, %r22
stbs,ma %r22, 1(%r20)
extru %ret0, 15, 8, %r22
stbs,ma %r22, 1(%r20)
extru %ret0, 23, 8, %r22
stbs,ma %r22, 1(%r20)
stbs,ma %ret0, 1(%r20)
extru %ret1, 7, 8, %r22
stbs,ma %r22, 1(%r20)
extru %ret1, 15, 8, %r22
stbs,ma %r22, 1(%r20)
extru %ret1, 23, 8, %r22
stbs,ma %r22, 1(%r20)
stb %ret1, 0(%r20)
.Ldone: addi,<> -FFI_TYPE_SMALL_STRUCT5,%r21,%r0
ldi 8, %r22
addi,<> -FFI_TYPE_SMALL_STRUCT6,%r21,%r0
ldi 16, %r22
addi,<> -FFI_TYPE_SMALL_STRUCT7,%r21,%r0
ldi 24, %r22
/* This relies on all the FFI_TYPE_*_STRUCT* defines being <0 */
cmpib,<=,n 0, %r21, checkint8
mtsar %r22
shrpw %ret0, %ret1, %sar, %ret0 /* ret0 = aabbccdd */
shrpw %ret1, %ret1, %sar, %ret1 /* rotate ret1 */
stw %ret0, 0(%r20)
b done
stw %ret1, 4(%r20)
checkint8:
comib,<>,n FFI_TYPE_UINT8, %r21, checkint16
b done
stb %ret0, 0(%r20)
checkint16:
comib,<>,n FFI_TYPE_UINT16, %r21, checkint32
b done
sth %ret0, 0(%r20)
checkint32:
comib,<>,n FFI_TYPE_UINT32, %r21, checkint
b done
stw %ret0, 0(%r20)
checkint:
comib,<>,n FFI_TYPE_INT, %r21, checkll
b done
stw %ret0, 0(%r20)
checkll:
comib,<>,n FFI_TYPE_UINT64, %r21, checkdbl
stw %ret0, 0(%r20)
b done
stw %ret1, 4(%r20)
checkdbl:
comib,<>,n FFI_TYPE_DOUBLE, %r21, checkfloat
b done
fstd %fr4,0(%r20)
checkfloat:
comib,<>,n FFI_TYPE_FLOAT, %r21, done
fstw %fr4L,0(%r20)
/* structure returns are either handled by one of the
INT/UINT64 cases above, or, if passed by pointer,
is handled by the callee. */
done:
/* all done, return */ /* all done, return */
copy %r4, %sp /* pop arg stack */ copy %r4, %sp /* pop arg stack */
ldw 12(%r3), %r4 ldw 12(%r3), %r4
@@ -250,14 +201,14 @@ ffi_call_pa32:
.procend .procend
.LFE1: .LFE1:
/* void ffi_closure_pa32(void); /* void ffi_closure_LINUX(void);
Called with closure argument in %r21 */ Called with closure argument in %r21 */
.export ffi_closure_pa32,code .export ffi_closure_LINUX,code
.import ffi_closure_inner_pa32,code .import ffi_closure_inner_LINUX,code
.type ffi_closure_pa32, @function .type ffi_closure_LINUX, @function
.LFB2: .LFB2:
ffi_closure_pa32: ffi_closure_LINUX:
.proc .proc
.callinfo FRAME=64,CALLS,SAVE_RP,SAVE_SP,ENTRY_GR=3 .callinfo FRAME=64,CALLS,SAVE_RP,SAVE_SP,ENTRY_GR=3
.entry .entry
@@ -277,7 +228,7 @@ ffi_closure_pa32:
stw %arg3, -48(%r3) stw %arg3, -48(%r3)
copy %r21, %arg0 copy %r21, %arg0
bl ffi_closure_inner_pa32, %r2 bl ffi_closure_inner_LINUX, %r2
copy %r3, %arg1 copy %r3, %arg1
ldwm -64(%sp), %r3 ldwm -64(%sp), %r3
@@ -348,7 +299,7 @@ ffi_closure_pa32:
.sleb128 -5 .sleb128 -5
.byte 0x4 ;# DW_CFA_advance_loc4 .byte 0x4 ;# DW_CFA_advance_loc4
.word .LCFI22-.LCFI21 .word .LCFI12-.LCFI11
.byte 0xd ;# DW_CFA_def_cfa_register = r3 .byte 0xd ;# DW_CFA_def_cfa_register = r3
.uleb128 0x3 .uleb128 0x3

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,10 @@
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
ffi_darwin.c ffi.c - Copyright (c) 1998 Geoffrey Keating
Copyright (C) 1998 Geoffrey Keating PowerPC Foreign Function Interface
Copyright (C) 2001 John Hornkvist
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
FFI support for Darwin and AIX. Darwin ABI support (c) 2001 John Hornkvist
AIX ABI support (c) 2002 Free Software Foundation, Inc.
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
@@ -80,7 +79,9 @@ enum { ASM_NEEDS_REGISTERS = 4 };
*/ */
/*@-exportheader@*/
void ffi_prep_args(extended_cif *ecif, unsigned *const stack) void ffi_prep_args(extended_cif *ecif, unsigned *const stack)
/*@=exportheader@*/
{ {
const unsigned bytes = ecif->cif->bytes; const unsigned bytes = ecif->cif->bytes;
const unsigned flags = ecif->cif->flags; const unsigned flags = ecif->cif->flags;
@@ -226,48 +227,6 @@ void ffi_prep_args(extended_cif *ecif, unsigned *const stack)
//FFI_ASSERT(flags & FLAG_4_GPR_ARGUMENTS || intarg_count <= 4); //FFI_ASSERT(flags & FLAG_4_GPR_ARGUMENTS || intarg_count <= 4);
} }
/* Adjust the size of S to be correct for Darwin.
On Darwin, the first field of a structure has natural alignment. */
static void
darwin_adjust_aggregate_sizes (ffi_type *s)
{
int i;
if (s->type != FFI_TYPE_STRUCT)
return;
s->size = 0;
for (i = 0; s->elements[i] != NULL; i++)
{
ffi_type *p;
int align;
p = s->elements[i];
darwin_adjust_aggregate_sizes (p);
if (i == 0
&& (p->type == FFI_TYPE_UINT64
|| p->type == FFI_TYPE_SINT64
|| p->type == FFI_TYPE_DOUBLE
|| p->alignment == 8))
align = 8;
else if (p->alignment == 16 || p->alignment < 4)
align = p->alignment;
else
align = 4;
s->size = ALIGN(s->size, align) + p->size;
}
s->size = ALIGN(s->size, s->alignment);
if (s->elements[0]->type == FFI_TYPE_UINT64
|| s->elements[0]->type == FFI_TYPE_SINT64
|| s->elements[0]->type == FFI_TYPE_DOUBLE
|| s->elements[0]->alignment == 8)
s->alignment = s->alignment > 8 ? s->alignment : 8;
/* Do not add additional tail padding. */
}
/* Perform machine dependent cif processing. */ /* Perform machine dependent cif processing. */
ffi_status ffi_prep_cif_machdep(ffi_cif *cif) ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
{ {
@@ -280,16 +239,8 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
unsigned size_al = 0; unsigned size_al = 0;
/* All the machine-independent calculation of cif->bytes will be wrong. /* All the machine-independent calculation of cif->bytes will be wrong.
All the calculation of structure sizes will also be wrong.
Redo the calculation for DARWIN. */ Redo the calculation for DARWIN. */
if (cif->abi == FFI_DARWIN)
{
darwin_adjust_aggregate_sizes (cif->rtype);
for (i = 0; i < cif->nargs; i++)
darwin_adjust_aggregate_sizes (cif->arg_types[i]);
}
/* Space for the frame pointer, callee's LR, CR, etc, and for /* Space for the frame pointer, callee's LR, CR, etc, and for
the asm's temp regs. */ the asm's temp regs. */
@@ -424,12 +375,25 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
return FFI_OK; return FFI_OK;
} }
extern void ffi_call_AIX(extended_cif *, unsigned, unsigned, unsigned *, /*@-declundef@*/
void (*fn)(), void (*fn2)()); /*@-exportheader@*/
extern void ffi_call_DARWIN(extended_cif *, unsigned, unsigned, unsigned *, extern void ffi_call_AIX(/*@out@*/ extended_cif *,
void (*fn)(), void (*fn2)()); unsigned, unsigned,
/*@out@*/ unsigned *,
void (*fn)(),
void (*fn2)());
extern void ffi_call_DARWIN(/*@out@*/ extended_cif *,
unsigned, unsigned,
/*@out@*/ unsigned *,
void (*fn)(),
void (*fn2)());
/*@=declundef@*/
/*@=exportheader@*/
void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) void ffi_call(/*@dependent@*/ ffi_cif *cif,
void (*fn)(),
/*@out@*/ void *rvalue,
/*@dependent@*/ void **avalue)
{ {
extended_cif ecif; extended_cif ecif;
@@ -442,7 +406,9 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
if ((rvalue == NULL) && if ((rvalue == NULL) &&
(cif->rtype->type == FFI_TYPE_STRUCT)) (cif->rtype->type == FFI_TYPE_STRUCT))
{ {
/*@-sysunrecog@*/
ecif.rvalue = alloca(cif->rtype->size); ecif.rvalue = alloca(cif->rtype->size);
/*@=sysunrecog@*/
} }
else else
ecif.rvalue = rvalue; ecif.rvalue = rvalue;
@@ -450,12 +416,16 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
switch (cif->abi) switch (cif->abi)
{ {
case FFI_AIX: case FFI_AIX:
ffi_call_AIX(&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn, /*@-usedef@*/
ffi_prep_args); ffi_call_AIX(&ecif, -cif->bytes,
cif->flags, ecif.rvalue, fn, ffi_prep_args);
/*@=usedef@*/
break; break;
case FFI_DARWIN: case FFI_DARWIN:
ffi_call_DARWIN(&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn, /*@-usedef@*/
ffi_prep_args); ffi_call_DARWIN(&ecif, -cif->bytes,
cif->flags, ecif.rvalue, fn, ffi_prep_args);
/*@=usedef@*/
break; break;
default: default:
FFI_ASSERT(0); FFI_ASSERT(0);

View File

@@ -43,15 +43,10 @@ typedef enum ffi_abi {
FFI_SYSV, FFI_SYSV,
FFI_GCC_SYSV, FFI_GCC_SYSV,
FFI_LINUX64, FFI_LINUX64,
FFI_LINUX,
# ifdef POWERPC64 # ifdef POWERPC64
FFI_DEFAULT_ABI = FFI_LINUX64, FFI_DEFAULT_ABI = FFI_LINUX64,
# else # else
# if __LDBL_MANT_DIG__ == 106
FFI_DEFAULT_ABI = FFI_LINUX,
# else
FFI_DEFAULT_ABI = FFI_GCC_SYSV, FFI_DEFAULT_ABI = FFI_GCC_SYSV,
# endif
# endif # endif
#endif #endif
@@ -74,7 +69,7 @@ typedef enum ffi_abi {
FFI_DEFAULT_ABI = FFI_SYSV, FFI_DEFAULT_ABI = FFI_SYSV,
#endif #endif
FFI_LAST_ABI FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
} ffi_abi; } ffi_abi;
#endif #endif

View File

@@ -120,9 +120,12 @@ ffi_call_LINUX64:
blr blr
.Lfp_return_value: .Lfp_return_value:
bt 27, .Lfd_return_value
bf 28, .Lfloat_return_value bf 28, .Lfloat_return_value
stfd %f1, 0(%r30) stfd %f1, 0(%r30)
bf 27, .Ldone_return_value b .Ldone_return_value
.Lfd_return_value:
stfd %f1, 0(%r30)
stfd %f2, 8(%r30) stfd %f2, 8(%r30)
b .Ldone_return_value b .Ldone_return_value
.Lfloat_return_value: .Lfloat_return_value:

View File

@@ -58,178 +58,223 @@ ENTRY(ffi_closure_SYSV)
# make the call # make the call
bl ffi_closure_helper_SYSV@local bl ffi_closure_helper_SYSV@local
.Lret:
# now r3 contains the return type # now r3 contains the return type
# so use it to look up in a table # so use it to look up in a table
# so we know how to deal with each type # so we know how to deal with each type
# Extract the size of the return type for small structures.
# Then calculate (4 - size) and multiply the result by 8.
# This gives the value needed for the shift operation below.
# This part is only needed for FFI_SYSV and small structures.
addi %r5,%r3,-(FFI_SYSV_TYPE_SMALL_STRUCT)
cmpwi cr0,%r5,4
ble cr0,.Lnext
addi %r5,%r5,-4
.Lnext:
addi %r5,%r5,-4
neg %r5,%r5
slwi %r5,%r5,3
# look up the proper starting point in table # look up the proper starting point in table
# by using return type as offset # by using return type as offset
addi %r6,%r1,112 # get pointer to results area
mflr %r4 # move address of .Lret to r4 bl .Lget_ret_type0_addr # get pointer to .Lret_type0 into LR
slwi %r3,%r3,4 # now multiply return type by 16 mflr %r4 # move to r4
addi %r4, %r4, .Lret_type0 - .Lret slwi %r3,%r3,4 # now multiply return type by 16
lwz %r0,148(%r1) add %r3,%r3,%r4 # add contents of table to table address
add %r3,%r3,%r4 # add contents of table to table address
mtctr %r3 mtctr %r3
bctr # jump to it bctr # jump to it
.LFE1: .LFE1:
# Each of the ret_typeX code fragments has to be exactly 16 bytes long # Each of the ret_typeX code fragments has to be exactly 16 bytes long
# (4 instructions). For cache effectiveness we align to a 16 byte boundary # (4 instructions). For cache effectiveness we align to a 16 byte boundary
# first. # first.
.align 4 .align 4
nop
nop
nop
.Lget_ret_type0_addr:
blrl
# case FFI_TYPE_VOID # case FFI_TYPE_VOID
.Lret_type0: .Lret_type0:
mtlr %r0 b .Lfinish
addi %r1,%r1,144 nop
blr nop
nop nop
# case FFI_TYPE_INT # case FFI_TYPE_INT
lwz %r3,112+0(%r1) .Lret_type1:
mtlr %r0 lwz %r3,0(%r6)
.Lfinish: b .Lfinish
addi %r1,%r1,144 nop
blr nop
# case FFI_TYPE_FLOAT # case FFI_TYPE_FLOAT
lfs %f1,112+0(%r1) .Lret_type2:
mtlr %r0 lfs %f1,0(%r6)
addi %r1,%r1,144 b .Lfinish
blr nop
nop
# case FFI_TYPE_DOUBLE # case FFI_TYPE_DOUBLE
lfd %f1,112+0(%r1) .Lret_type3:
mtlr %r0 lfd %f1,0(%r6)
addi %r1,%r1,144 b .Lfinish
blr nop
nop
# case FFI_TYPE_LONGDOUBLE # case FFI_TYPE_LONGDOUBLE
lfd %f1,112+0(%r1) .Lret_type4:
lfd %f2,112+8(%r1) lfd %f1,0(%r6)
mtlr %r0
b .Lfinish b .Lfinish
nop
nop
# case FFI_TYPE_UINT8 # case FFI_TYPE_UINT8
lbz %r3,112+3(%r1) .Lret_type5:
mtlr %r0 lbz %r3,3(%r6)
addi %r1,%r1,144 b .Lfinish
blr nop
nop
# case FFI_TYPE_SINT8 # case FFI_TYPE_SINT8
lbz %r3,112+3(%r1) .Lret_type6:
lbz %r3,3(%r6)
extsb %r3,%r3 extsb %r3,%r3
mtlr %r0
b .Lfinish b .Lfinish
nop
# case FFI_TYPE_UINT16 # case FFI_TYPE_UINT16
lhz %r3,112+2(%r1) .Lret_type7:
mtlr %r0 lhz %r3,2(%r6)
addi %r1,%r1,144 b .Lfinish
blr nop
nop
# case FFI_TYPE_SINT16 # case FFI_TYPE_SINT16
lha %r3,112+2(%r1) .Lret_type8:
mtlr %r0 lha %r3,2(%r6)
addi %r1,%r1,144 b .Lfinish
blr nop
nop
# case FFI_TYPE_UINT32 # case FFI_TYPE_UINT32
lwz %r3,112+0(%r1) .Lret_type9:
mtlr %r0 lwz %r3,0(%r6)
addi %r1,%r1,144 b .Lfinish
blr nop
nop
# case FFI_TYPE_SINT32 # case FFI_TYPE_SINT32
lwz %r3,112+0(%r1) .Lret_type10:
mtlr %r0 lwz %r3,0(%r6)
addi %r1,%r1,144 b .Lfinish
blr nop
nop
# case FFI_TYPE_UINT64 # case FFI_TYPE_UINT64
lwz %r3,112+0(%r1) .Lret_type11:
lwz %r4,112+4(%r1) lwz %r3,0(%r6)
mtlr %r0 lwz %r4,4(%r6)
b .Lfinish b .Lfinish
nop
# case FFI_TYPE_SINT64 # case FFI_TYPE_SINT64
lwz %r3,112+0(%r1) .Lret_type12:
lwz %r4,112+4(%r1) lwz %r3,0(%r6)
mtlr %r0 lwz %r4,4(%r6)
b .Lfinish b .Lfinish
nop
# case FFI_TYPE_STRUCT # case FFI_TYPE_STRUCT
mtlr %r0 .Lret_type13:
addi %r1,%r1,144 b .Lfinish
blr nop
nop
nop nop
# case FFI_TYPE_POINTER # case FFI_TYPE_POINTER
lwz %r3,112+0(%r1) .Lret_type14:
mtlr %r0 lwz %r3,0(%r6)
addi %r1,%r1,144 b .Lfinish
blr nop
nop
# The return types below are only used when the ABI type is FFI_SYSV. # The return types below are only used when the ABI type is FFI_SYSV.
# case FFI_SYSV_TYPE_SMALL_STRUCT + 1. One byte struct. # case FFI_SYSV_TYPE_SMALL_STRUCT + 1. One byte struct.
lbz %r3,112+0(%r1) .Lret_type15:
mtlr %r0 # fall through.
addi %r1,%r1,144 nop
blr nop
nop
nop
# case FFI_SYSV_TYPE_SMALL_STRUCT + 2. Two byte struct. # case FFI_SYSV_TYPE_SMALL_STRUCT + 2. Two byte struct.
lhz %r3,112+0(%r1) .Lret_type16:
mtlr %r0 # fall through.
addi %r1,%r1,144 nop
blr nop
nop
nop
# case FFI_SYSV_TYPE_SMALL_STRUCT + 3. Three byte struct. # case FFI_SYSV_TYPE_SMALL_STRUCT + 3. Three byte struct.
lwz %r3,112+0(%r1) .Lret_type17:
srwi %r3,%r3,8 # fall through.
mtlr %r0 nop
b .Lfinish nop
nop
nop
# case FFI_SYSV_TYPE_SMALL_STRUCT + 4. Four byte struct. # case FFI_SYSV_TYPE_SMALL_STRUCT + 4. Four byte struct.
lwz %r3,112+0(%r1) .Lret_type18:
mtlr %r0 # this one handles the structs from above too.
addi %r1,%r1,144 lwz %r3,0(%r6)
blr srw %r3,%r3,%r5
b .Lfinish
nop
# case FFI_SYSV_TYPE_SMALL_STRUCT + 5. Five byte struct. # case FFI_SYSV_TYPE_SMALL_STRUCT + 5. Five byte struct.
lwz %r3,112+0(%r1) .Lret_type19:
lwz %r4,112+4(%r1) # fall through.
li %r5,24 nop
b .Lstruct567 nop
nop
nop
# case FFI_SYSV_TYPE_SMALL_STRUCT + 6. Six byte struct. # case FFI_SYSV_TYPE_SMALL_STRUCT + 6. Six byte struct.
lwz %r3,112+0(%r1) .Lret_type20:
lwz %r4,112+4(%r1) # fall through.
li %r5,16 nop
b .Lstruct567 nop
nop
nop
# case FFI_SYSV_TYPE_SMALL_STRUCT + 7. Seven byte struct. # case FFI_SYSV_TYPE_SMALL_STRUCT + 7. Seven byte struct.
lwz %r3,112+0(%r1) .Lret_type21:
lwz %r4,112+4(%r1) # fall through.
li %r5,8 nop
b .Lstruct567 nop
nop
nop
# case FFI_SYSV_TYPE_SMALL_STRUCT + 8. Eight byte struct. # case FFI_SYSV_TYPE_SMALL_STRUCT + 8. Eight byte struct.
lwz %r3,112+0(%r1) .Lret_type22:
lwz %r4,112+4(%r1) # this one handles the above unhandled structs.
mtlr %r0 lwz %r3,0(%r6)
lwz %r4,4(%r6)
bl __lshrdi3 # libgcc function to shift r3/r4, shift value in r5.
b .Lfinish b .Lfinish
.Lstruct567: # case done
subfic %r6,%r5,32 .Lfinish:
srw %r4,%r4,%r5
slw %r6,%r3,%r6 lwz %r0,148(%r1)
srw %r3,%r3,%r5
or %r4,%r6,%r4
mtlr %r0 mtlr %r0
addi %r1,%r1,144 addi %r1,%r1,144
blr blr
END(ffi_closure_SYSV) END(ffi_closure_SYSV)
.section ".eh_frame",EH_FRAME_FLAGS,@progbits .section ".eh_frame",EH_FRAME_FLAGS,@progbits

View File

@@ -121,8 +121,6 @@ L(done_return_value):
L(fp_return_value): L(fp_return_value):
bf 28,L(float_return_value) bf 28,L(float_return_value)
stfd %f1,0(%r30) stfd %f1,0(%r30)
bf 27,L(done_return_value)
stfd %f2,8(%r30)
b L(done_return_value) b L(done_return_value)
L(float_return_value): L(float_return_value):
stfs %f1,0(%r30) stfs %f1,0(%r30)
@@ -142,14 +140,8 @@ L(smst_one_register):
b L(done_return_value) b L(done_return_value)
L(smst_two_register): L(smst_two_register):
rlwinm %r5,%r31,5+23,32-5,31 /* Extract the value to shift. */ rlwinm %r5,%r31,5+23,32-5,31 /* Extract the value to shift. */
cmpwi %r5,0 bl __ashldi3 /* libgcc function to shift r3/r4,
subfic %r9,%r5,32 shift value in r5. */
slw %r29,%r3,%r5
srw %r9,%r4,%r9
beq- L(smst_8byte)
or %r3,%r9,%r29
slw %r4,%r4,%r5
L(smst_8byte):
stw %r3,0(%r30) stw %r3,0(%r30)
stw %r4,4(%r30) stw %r4,4(%r30)
b L(done_return_value) b L(done_return_value)

View File

@@ -25,6 +25,7 @@
#include <ffi_common.h> #include <ffi_common.h>
#include <stdlib.h> #include <stdlib.h>
/* Round up to FFI_SIZEOF_ARG. */ /* Round up to FFI_SIZEOF_ARG. */
#define STACK_ARG_SIZE(x) ALIGN(x, FFI_SIZEOF_ARG) #define STACK_ARG_SIZE(x) ALIGN(x, FFI_SIZEOF_ARG)
@@ -32,12 +33,14 @@
/* Perform machine independent initialization of aggregate type /* Perform machine independent initialization of aggregate type
specifications. */ specifications. */
static ffi_status initialize_aggregate(ffi_type *arg) static ffi_status initialize_aggregate(/*@out@*/ ffi_type *arg)
{ {
ffi_type **ptr; ffi_type **ptr;
FFI_ASSERT(arg != NULL); FFI_ASSERT(arg != NULL);
/*@-usedef@*/
FFI_ASSERT(arg->elements != NULL); FFI_ASSERT(arg->elements != NULL);
FFI_ASSERT(arg->size == 0); FFI_ASSERT(arg->size == 0);
FFI_ASSERT(arg->alignment == 0); FFI_ASSERT(arg->alignment == 0);
@@ -74,6 +77,8 @@ static ffi_status initialize_aggregate(ffi_type *arg)
return FFI_BAD_TYPEDEF; return FFI_BAD_TYPEDEF;
else else
return FFI_OK; return FFI_OK;
/*@=usedef@*/
} }
#ifndef __CRIS__ #ifndef __CRIS__
@@ -84,8 +89,10 @@ static ffi_status initialize_aggregate(ffi_type *arg)
/* Perform machine independent ffi_cif preparation, then call /* Perform machine independent ffi_cif preparation, then call
machine dependent routine. */ machine dependent routine. */
ffi_status ffi_prep_cif(ffi_cif *cif, ffi_abi abi, unsigned int nargs, ffi_status ffi_prep_cif(/*@out@*/ /*@partial@*/ ffi_cif *cif,
ffi_type *rtype, ffi_type **atypes) ffi_abi abi, unsigned int nargs,
/*@dependent@*/ /*@out@*/ /*@partial@*/ ffi_type *rtype,
/*@dependent@*/ ffi_type **atypes)
{ {
unsigned bytes = 0; unsigned bytes = 0;
unsigned int i; unsigned int i;
@@ -102,8 +109,10 @@ ffi_status ffi_prep_cif(ffi_cif *cif, ffi_abi abi, unsigned int nargs,
cif->flags = 0; cif->flags = 0;
/* Initialize the return type if necessary */ /* Initialize the return type if necessary */
/*@-usedef@*/
if ((cif->rtype->size == 0) && (initialize_aggregate(cif->rtype) != FFI_OK)) if ((cif->rtype->size == 0) && (initialize_aggregate(cif->rtype) != FFI_OK))
return FFI_BAD_TYPEDEF; return FFI_BAD_TYPEDEF;
/*@=usedef@*/
/* Perform a sanity check on the return type */ /* Perform a sanity check on the return type */
FFI_ASSERT_VALID_TYPE(cif->rtype); FFI_ASSERT_VALID_TYPE(cif->rtype);
@@ -115,10 +124,7 @@ ffi_status ffi_prep_cif(ffi_cif *cif, ffi_abi abi, unsigned int nargs,
#ifdef SPARC #ifdef SPARC
&& (cif->abi != FFI_V9 || cif->rtype->size > 32) && (cif->abi != FFI_V9 || cif->rtype->size > 32)
#endif #endif
#ifdef X86_DARWIN )
&& (cif->rtype->size > 8)
#endif
)
bytes = STACK_ARG_SIZE(sizeof(void*)); bytes = STACK_ARG_SIZE(sizeof(void*));
#endif #endif

View File

@@ -189,7 +189,10 @@ ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw)
* these following couple of functions will handle the translation forth * these following couple of functions will handle the translation forth
* and back automatically. */ * and back automatically. */
void ffi_raw_call (ffi_cif *cif, void (*fn)(), void *rvalue, ffi_raw *raw) void ffi_raw_call (/*@dependent@*/ ffi_cif *cif,
void (*fn)(),
/*@out@*/ void *rvalue,
/*@dependent@*/ ffi_raw *raw)
{ {
void **avalue = (void**) alloca (cif->nargs * sizeof (void*)); void **avalue = (void**) alloca (cif->nargs * sizeof (void*));
ffi_raw_to_ptrarray (cif, raw, avalue); ffi_raw_to_ptrarray (cif, raw, avalue);

View File

@@ -1,5 +1,5 @@
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
ffi.c - Copyright (c) 2002, 2003, 2004, 2005, 2006 Kaz Kojima ffi.c - Copyright (c) 2002, 2003, 2004, 2005 Kaz Kojima
SuperH Foreign Function Interface SuperH Foreign Function Interface
@@ -106,7 +106,9 @@ return_type (ffi_type *arg)
/* ffi_prep_args is called by the assembly routine once stack space /* ffi_prep_args is called by the assembly routine once stack space
has been allocated for the function's arguments */ has been allocated for the function's arguments */
/*@-exportheader@*/
void ffi_prep_args(char *stack, extended_cif *ecif) void ffi_prep_args(char *stack, extended_cif *ecif)
/*@=exportheader@*/
{ {
register unsigned int i; register unsigned int i;
register int tmp; register int tmp;
@@ -404,10 +406,20 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
return FFI_OK; return FFI_OK;
} }
extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, /*@-declundef@*/
unsigned, unsigned, unsigned *, void (*fn)()); /*@-exportheader@*/
extern void ffi_call_SYSV(void (*)(char *, extended_cif *),
/*@out@*/ extended_cif *,
unsigned, unsigned,
/*@out@*/ unsigned *,
void (*fn)());
/*@=declundef@*/
/*@=exportheader@*/
void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) void ffi_call(/*@dependent@*/ ffi_cif *cif,
void (*fn)(),
/*@out@*/ void *rvalue,
/*@dependent@*/ void **avalue)
{ {
extended_cif ecif; extended_cif ecif;
UINT64 trvalue; UINT64 trvalue;
@@ -424,7 +436,9 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
else if ((rvalue == NULL) && else if ((rvalue == NULL) &&
(cif->rtype->type == FFI_TYPE_STRUCT)) (cif->rtype->type == FFI_TYPE_STRUCT))
{ {
/*@-sysunrecog@*/
ecif.rvalue = alloca(cif->rtype->size); ecif.rvalue = alloca(cif->rtype->size);
/*@=sysunrecog@*/
} }
else else
ecif.rvalue = rvalue; ecif.rvalue = rvalue;
@@ -432,8 +446,10 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
switch (cif->abi) switch (cif->abi)
{ {
case FFI_SYSV: case FFI_SYSV:
ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue, /*@-usedef@*/
fn); ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes,
cif->flags, ecif.rvalue, fn);
/*@=usedef@*/
break; break;
default: default:
FFI_ASSERT(0); FFI_ASSERT(0);
@@ -519,6 +535,7 @@ ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
int freg = 0; int freg = 0;
#endif #endif
ffi_cif *cif; ffi_cif *cif;
double temp;
cif = closure->cif; cif = closure->cif;
avalue = alloca(cif->nargs * sizeof(void *)); avalue = alloca(cif->nargs * sizeof(void *));
@@ -527,7 +544,7 @@ ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
returns the data directly to the caller. */ returns the data directly to the caller. */
if (cif->rtype->type == FFI_TYPE_STRUCT && STRUCT_VALUE_ADDRESS_WITH_ARG) if (cif->rtype->type == FFI_TYPE_STRUCT && STRUCT_VALUE_ADDRESS_WITH_ARG)
{ {
rvalue = (void *) *pgr++; rvalue = *pgr++;
ireg = 1; ireg = 1;
} }
else else
@@ -594,8 +611,6 @@ ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
{ {
if (freg + 1 >= NFREGARG) if (freg + 1 >= NFREGARG)
continue; continue;
if (freg & 1)
pfr++;
freg = (freg + 1) & ~1; freg = (freg + 1) & ~1;
freg += 2; freg += 2;
avalue[i] = pfr; avalue[i] = pfr;

View File

@@ -1,5 +1,5 @@
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
sysv.S - Copyright (c) 2002, 2003, 2004, 2006 Kaz Kojima sysv.S - Copyright (c) 2002, 2003, 2004 Kaz Kojima
SuperH Foreign Function Interface SuperH Foreign Function Interface
@@ -829,13 +829,13 @@ __FRAME_BEGIN__:
.byte 0x6 /* uleb128 0x6 */ .byte 0x6 /* uleb128 0x6 */
.byte 0x8e /* DW_CFA_offset, column 0xe */ .byte 0x8e /* DW_CFA_offset, column 0xe */
.byte 0x5 /* uleb128 0x5 */ .byte 0x5 /* uleb128 0x5 */
.byte 0x84 /* DW_CFA_offset, column 0x4 */ .byte 0x8b /* DW_CFA_offset, column 0xb */
.byte 0x4 /* uleb128 0x4 */ .byte 0x4 /* uleb128 0x4 */
.byte 0x85 /* DW_CFA_offset, column 0x5 */ .byte 0x8a /* DW_CFA_offset, column 0xa */
.byte 0x3 /* uleb128 0x3 */ .byte 0x3 /* uleb128 0x3 */
.byte 0x86 /* DW_CFA_offset, column 0x6 */ .byte 0x89 /* DW_CFA_offset, column 0x9 */
.byte 0x2 /* uleb128 0x2 */ .byte 0x2 /* uleb128 0x2 */
.byte 0x87 /* DW_CFA_offset, column 0x7 */ .byte 0x88 /* DW_CFA_offset, column 0x8 */
.byte 0x1 /* uleb128 0x1 */ .byte 0x1 /* uleb128 0x1 */
.byte 0x4 /* DW_CFA_advance_loc4 */ .byte 0x4 /* DW_CFA_advance_loc4 */
.4byte .LCFIE-.LCFID .4byte .LCFIE-.LCFID

View File

@@ -1,5 +1,5 @@
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
ffi.c - Copyright (c) 2003, 2004, 2006 Kaz Kojima ffi.c - Copyright (c) 2003, 2004 Kaz Kojima
SuperH SHmedia Foreign Function Interface SuperH SHmedia Foreign Function Interface
@@ -54,7 +54,9 @@ return_type (ffi_type *arg)
/* ffi_prep_args is called by the assembly routine once stack space /* ffi_prep_args is called by the assembly routine once stack space
has been allocated for the function's arguments */ has been allocated for the function's arguments */
/*@-exportheader@*/
void ffi_prep_args(char *stack, extended_cif *ecif) void ffi_prep_args(char *stack, extended_cif *ecif)
/*@=exportheader@*/
{ {
register unsigned int i; register unsigned int i;
register unsigned int avn; register unsigned int avn;
@@ -158,7 +160,6 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
int n, m; int n, m;
int greg; int greg;
int freg; int freg;
int fpair = -1;
greg = (return_type (cif->rtype) == FFI_TYPE_STRUCT ? 1 : 0); greg = (return_type (cif->rtype) == FFI_TYPE_STRUCT ? 1 : 0);
freg = 0; freg = 0;
@@ -174,13 +175,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
cif->bytes += sizeof (UINT64) - sizeof (float); cif->bytes += sizeof (UINT64) - sizeof (float);
if (freg >= NFREGARG - 1) if (freg >= NFREGARG - 1)
continue; continue;
if (fpair < 0) freg++;
{
fpair = freg;
freg += 2;
}
else
fpair = -1;
cif->flags2 += ((cif->arg_types)[i]->type) << (2 * j++); cif->flags2 += ((cif->arg_types)[i]->type) << (2 * j++);
break; break;
@@ -189,6 +184,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
continue; continue;
if ((freg + 1) < NFREGARG) if ((freg + 1) < NFREGARG)
{ {
freg = (freg + 1) & ~1;
freg += 2; freg += 2;
cif->flags2 += ((cif->arg_types)[i]->type) << (2 * j++); cif->flags2 += ((cif->arg_types)[i]->type) << (2 * j++);
} }
@@ -236,11 +232,20 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
return FFI_OK; return FFI_OK;
} }
extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, /*@-declundef@*/
unsigned, unsigned, long long, unsigned *, /*@-exportheader@*/
extern void ffi_call_SYSV(void (*)(char *, extended_cif *),
/*@out@*/ extended_cif *,
unsigned, unsigned, long long,
/*@out@*/ unsigned *,
void (*fn)()); void (*fn)());
/*@=declundef@*/
/*@=exportheader@*/
void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) void ffi_call(/*@dependent@*/ ffi_cif *cif,
void (*fn)(),
/*@out@*/ void *rvalue,
/*@dependent@*/ void **avalue)
{ {
extended_cif ecif; extended_cif ecif;
UINT64 trvalue; UINT64 trvalue;
@@ -257,7 +262,9 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
else if ((rvalue == NULL) && else if ((rvalue == NULL) &&
(cif->rtype->type == FFI_TYPE_STRUCT)) (cif->rtype->type == FFI_TYPE_STRUCT))
{ {
/*@-sysunrecog@*/
ecif.rvalue = alloca(cif->rtype->size); ecif.rvalue = alloca(cif->rtype->size);
/*@=sysunrecog@*/
} }
else else
ecif.rvalue = rvalue; ecif.rvalue = rvalue;
@@ -265,8 +272,10 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
switch (cif->abi) switch (cif->abi)
{ {
case FFI_SYSV: case FFI_SYSV:
ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, cif->flags2, /*@-usedef@*/
ecif.rvalue, fn); ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes,
cif->flags, cif->flags2, ecif.rvalue, fn);
/*@=usedef@*/
break; break;
default: default:
FFI_ASSERT(0); FFI_ASSERT(0);
@@ -341,7 +350,6 @@ ffi_closure_helper_SYSV (ffi_closure *closure, UINT64 *rvalue,
int i, avn; int i, avn;
int greg, freg; int greg, freg;
ffi_cif *cif; ffi_cif *cif;
int fpair = -1;
cif = closure->cif; cif = closure->cif;
avalue = alloca (cif->nargs * sizeof (void *)); avalue = alloca (cif->nargs * sizeof (void *));
@@ -350,7 +358,7 @@ ffi_closure_helper_SYSV (ffi_closure *closure, UINT64 *rvalue,
returns the data directly to the caller. */ returns the data directly to the caller. */
if (return_type (cif->rtype) == FFI_TYPE_STRUCT) if (return_type (cif->rtype) == FFI_TYPE_STRUCT)
{ {
rvalue = (UINT64 *) *pgr; rvalue = *pgr;
greg = 1; greg = 1;
} }
else else
@@ -394,24 +402,11 @@ ffi_closure_helper_SYSV (ffi_closure *closure, UINT64 *rvalue,
if ((*p_arg)->type == FFI_TYPE_FLOAT) if ((*p_arg)->type == FFI_TYPE_FLOAT)
{ {
if (freg < NFREGARG - 1) if (freg < NFREGARG - 1)
{
if (fpair >= 0)
{
avalue[i] = (UINT32 *) pfr + fpair;
fpair = -1;
}
else
{
#ifdef __LITTLE_ENDIAN__ #ifdef __LITTLE_ENDIAN__
fpair = freg; avalue[i] = (UINT32 *) pfr + (1 ^ freg++);
avalue[i] = (UINT32 *) pfr + (1 ^ freg);
#else #else
fpair = 1 ^ freg; avalue[i] = (UINT32 *) pfr + freg++;
avalue[i] = (UINT32 *) pfr + freg;
#endif #endif
freg += 2;
}
}
else else
#ifdef __LITTLE_ENDIAN__ #ifdef __LITTLE_ENDIAN__
avalue[i] = pgr + greg; avalue[i] = pgr + greg;
@@ -433,6 +428,7 @@ ffi_closure_helper_SYSV (ffi_closure *closure, UINT64 *rvalue,
avalue[i] = pgr + greg; avalue[i] = pgr + greg;
else else
{ {
freg = (freg + 1) & ~1;
avalue[i] = pfr + (freg >> 1); avalue[i] = pfr + (freg >> 1);
freg += 2; freg += 2;
} }

View File

@@ -1,5 +1,5 @@
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
sysv.S - Copyright (c) 2003, 2004, 2006 Kaz Kojima sysv.S - Copyright (c) 2003, 2004 Kaz Kojima
SuperH SHmedia Foreign Function Interface SuperH SHmedia Foreign Function Interface
@@ -84,7 +84,6 @@ ENTRY(ffi_call_SYSV)
addi r15, 64, r22 addi r15, 64, r22
movi 0, r0 movi 0, r0
movi 0, r1 movi 0, r1
movi -1, r23
pt/l 1f, tr1 pt/l 1f, tr1
bnei/l r29, FFI_TYPE_STRUCT, tr1 bnei/l r29, FFI_TYPE_STRUCT, tr1
@@ -107,6 +106,9 @@ ENTRY(ffi_call_SYSV)
.L_pass_d: .L_pass_d:
addi r0, 1, r0 addi r0, 1, r0
addi r1, 1, r1
andi r1, ~1, r1
pt/l 3f, tr0 pt/l 3f, tr0
movi 12, r20 movi 12, r20
bge/l r1, r20, tr0 bge/l r1, r20, tr0
@@ -156,23 +158,13 @@ ENTRY(ffi_call_SYSV)
addi.l r15, 8, r15 addi.l r15, 8, r15
3: 3:
pt/l .L_pass, tr0 pt/l .L_pass, tr0
addi r1, 1, r1
blink tr0, r63 blink tr0, r63
.L_pop_f: .L_pop_f:
pt/l .L_pop_f_tbl, tr1 pt/l .L_pop_f_tbl, tr1
pt/l 5f, tr2
gettr tr1, r20 gettr tr1, r20
bge/l r23, r63, tr2
add r1, r63, r23
shlli r1, 3, r21 shlli r1, 3, r21
addi r1, 2, r1
add r20, r21, r20
ptabs/l r20, tr1
blink tr1, r63
5:
addi r23, 1, r21
movi -1, r23
shlli r21, 3, r21
add r20, r21, r20 add r20, r21, r20
ptabs/l r20, tr1 ptabs/l r20, tr1
blink tr1, r63 blink tr1, r63

View File

@@ -36,7 +36,9 @@
/* ffi_prep_args is called by the assembly routine once stack space /* ffi_prep_args is called by the assembly routine once stack space
has been allocated for the function's arguments */ has been allocated for the function's arguments */
/*@-exportheader@*/
void ffi_prep_args(char *stack, extended_cif *ecif) void ffi_prep_args(char *stack, extended_cif *ecif)
/*@=exportheader@*/
{ {
register unsigned int i; register unsigned int i;
register void **p_argv; register void **p_argv;
@@ -119,7 +121,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
switch (cif->rtype->type) switch (cif->rtype->type)
{ {
case FFI_TYPE_VOID: case FFI_TYPE_VOID:
#ifdef X86 #ifndef X86_WIN32
case FFI_TYPE_STRUCT: case FFI_TYPE_STRUCT:
#endif #endif
case FFI_TYPE_SINT64: case FFI_TYPE_SINT64:
@@ -133,7 +135,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
cif->flags = FFI_TYPE_SINT64; cif->flags = FFI_TYPE_SINT64;
break; break;
#ifndef X86 #ifdef X86_WIN32
case FFI_TYPE_STRUCT: case FFI_TYPE_STRUCT:
if (cif->rtype->size == 1) if (cif->rtype->size == 1)
{ {
@@ -163,23 +165,35 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
break; break;
} }
#ifdef X86_DARWIN
cif->bytes = (cif->bytes + 15) & ~0xF;
#endif
return FFI_OK; return FFI_OK;
} }
extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, /*@-declundef@*/
unsigned, unsigned, unsigned *, void (*fn)()); /*@-exportheader@*/
extern void ffi_call_SYSV(void (*)(char *, extended_cif *),
/*@out@*/ extended_cif *,
unsigned, unsigned,
/*@out@*/ unsigned *,
void (*fn)());
/*@=declundef@*/
/*@=exportheader@*/
#ifdef X86_WIN32 #ifdef X86_WIN32
extern void ffi_call_STDCALL(void (*)(char *, extended_cif *), extended_cif *, /*@-declundef@*/
unsigned, unsigned, unsigned *, void (*fn)()); /*@-exportheader@*/
extern void ffi_call_STDCALL(void (*)(char *, extended_cif *),
/*@out@*/ extended_cif *,
unsigned, unsigned,
/*@out@*/ unsigned *,
void (*fn)());
/*@=declundef@*/
/*@=exportheader@*/
#endif /* X86_WIN32 */ #endif /* X86_WIN32 */
void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) void ffi_call(/*@dependent@*/ ffi_cif *cif,
void (*fn)(),
/*@out@*/ void *rvalue,
/*@dependent@*/ void **avalue)
{ {
extended_cif ecif; extended_cif ecif;
@@ -192,7 +206,9 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
if ((rvalue == NULL) && if ((rvalue == NULL) &&
(cif->flags == FFI_TYPE_STRUCT)) (cif->flags == FFI_TYPE_STRUCT))
{ {
/*@-sysunrecog@*/
ecif.rvalue = alloca(cif->rtype->size); ecif.rvalue = alloca(cif->rtype->size);
/*@=sysunrecog@*/
} }
else else
ecif.rvalue = rvalue; ecif.rvalue = rvalue;
@@ -201,13 +217,17 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
switch (cif->abi) switch (cif->abi)
{ {
case FFI_SYSV: case FFI_SYSV:
ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue, /*@-usedef@*/
fn); ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes,
cif->flags, ecif.rvalue, fn);
/*@=usedef@*/
break; break;
#ifdef X86_WIN32 #ifdef X86_WIN32
case FFI_STDCALL: case FFI_STDCALL:
ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes, cif->flags, /*@-usedef@*/
ecif.rvalue, fn); ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes,
cif->flags, ecif.rvalue, fn);
/*@=usedef@*/
break; break;
#endif /* X86_WIN32 */ #endif /* X86_WIN32 */
default: default:
@@ -256,9 +276,11 @@ ffi_closure_SYSV_inner (closure, respp, args)
return cif->flags; return cif->flags;
} }
/*@-exportheader@*/
static void static void
ffi_prep_incoming_args_SYSV(char *stack, void **rvalue, void **avalue, ffi_prep_incoming_args_SYSV(char *stack, void **rvalue,
ffi_cif *cif) void **avalue, ffi_cif *cif)
/*@=exportheader@*/
{ {
register unsigned int i; register unsigned int i;
register void **p_argv; register void **p_argv;
@@ -379,17 +401,26 @@ ffi_prep_args_raw(char *stack, extended_cif *ecif)
*/ */
extern void extern void
ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, unsigned, ffi_call_SYSV(void (*)(char *, extended_cif *),
unsigned, unsigned *, void (*fn)()); /*@out@*/ extended_cif *,
unsigned, unsigned,
/*@out@*/ unsigned *,
void (*fn)());
#ifdef X86_WIN32 #ifdef X86_WIN32
extern void extern void
ffi_call_STDCALL(void (*)(char *, extended_cif *), extended_cif *, unsigned, ffi_call_STDCALL(void (*)(char *, extended_cif *),
unsigned, unsigned *, void (*fn)()); /*@out@*/ extended_cif *,
unsigned, unsigned,
/*@out@*/ unsigned *,
void (*fn)());
#endif /* X86_WIN32 */ #endif /* X86_WIN32 */
void void
ffi_raw_call(ffi_cif *cif, void (*fn)(), void *rvalue, ffi_raw *fake_avalue) ffi_raw_call(/*@dependent@*/ ffi_cif *cif,
void (*fn)(),
/*@out@*/ void *rvalue,
/*@dependent@*/ ffi_raw *fake_avalue)
{ {
extended_cif ecif; extended_cif ecif;
void **avalue = (void **)fake_avalue; void **avalue = (void **)fake_avalue;
@@ -403,7 +434,9 @@ ffi_raw_call(ffi_cif *cif, void (*fn)(), void *rvalue, ffi_raw *fake_avalue)
if ((rvalue == NULL) && if ((rvalue == NULL) &&
(cif->rtype->type == FFI_TYPE_STRUCT)) (cif->rtype->type == FFI_TYPE_STRUCT))
{ {
/*@-sysunrecog@*/
ecif.rvalue = alloca(cif->rtype->size); ecif.rvalue = alloca(cif->rtype->size);
/*@=sysunrecog@*/
} }
else else
ecif.rvalue = rvalue; ecif.rvalue = rvalue;
@@ -412,13 +445,17 @@ ffi_raw_call(ffi_cif *cif, void (*fn)(), void *rvalue, ffi_raw *fake_avalue)
switch (cif->abi) switch (cif->abi)
{ {
case FFI_SYSV: case FFI_SYSV:
ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags, /*@-usedef@*/
ecif.rvalue, fn); ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes,
cif->flags, ecif.rvalue, fn);
/*@=usedef@*/
break; break;
#ifdef X86_WIN32 #ifdef X86_WIN32
case FFI_STDCALL: case FFI_STDCALL:
ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags, /*@-usedef@*/
ecif.rvalue, fn); ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes,
cif->flags, ecif.rvalue, fn);
/*@=usedef@*/
break; break;
#endif /* X86_WIN32 */ #endif /* X86_WIN32 */
default: default:

View File

@@ -69,7 +69,7 @@ typedef enum ffi_abi {
#define FFI_CLOSURES 1 #define FFI_CLOSURES 1
#if defined (X86_64) || (defined (__x86_64__) && defined (X86_DARWIN)) #ifdef X86_64
#define FFI_TRAMPOLINE_SIZE 24 #define FFI_TRAMPOLINE_SIZE 24
#define FFI_NATIVE_RAW_API 0 #define FFI_NATIVE_RAW_API 0
#else #else

View File

@@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am. # Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -13,15 +13,11 @@
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
@SET_MAKE@ @SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644 install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c
@@ -43,7 +39,7 @@ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/fficonfig.h CONFIG_HEADER = $(top_builddir)/fficonfig.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
SOURCES = SOURCES =
@@ -53,21 +49,16 @@ RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@ ALLOCA = @ALLOCA@
ALPHA_FALSE = @ALPHA_FALSE@
ALPHA_TRUE = @ALPHA_TRUE@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
AM_RUNTESTFLAGS = AM_RUNTESTFLAGS =
AR = @AR@ AR = @AR@
ARM_FALSE = @ARM_FALSE@
ARM_TRUE = @ARM_TRUE@
AUTOCONF = @AUTOCONF@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
CC = @CC@ CC = @CC@
CCAS = @CCAS@ CCAS = @CCAS@
CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@ CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
@@ -88,38 +79,23 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
F77 = @F77@ F77 = @F77@
FFLAGS = @FFLAGS@ FFLAGS = @FFLAGS@
FRV_FALSE = @FRV_FALSE@ GREP = @GREP@
FRV_TRUE = @FRV_TRUE@
HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@ HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@
IA64_FALSE = @IA64_FALSE@ INSTALL = @INSTALL@
IA64_TRUE = @IA64_TRUE@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBFFI_CRIS_FALSE = @LIBFFI_CRIS_FALSE@
LIBFFI_CRIS_TRUE = @LIBFFI_CRIS_TRUE@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
M32R_FALSE = @M32R_FALSE@
M32R_TRUE = @M32R_TRUE@
M68K_FALSE = @M68K_FALSE@
M68K_TRUE = @M68K_TRUE@
MAINT = @MAINT@ MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MIPS_IRIX_FALSE = @MIPS_IRIX_FALSE@ MKDIR_P = @MKDIR_P@
MIPS_IRIX_TRUE = @MIPS_IRIX_TRUE@
MIPS_LINUX_FALSE = @MIPS_LINUX_FALSE@
MIPS_LINUX_TRUE = @MIPS_LINUX_TRUE@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PA64_HPUX_FALSE = @PA64_HPUX_FALSE@
PA64_HPUX_TRUE = @PA64_HPUX_TRUE@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME = @PACKAGE_NAME@
@@ -127,53 +103,21 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PA_HPUX_FALSE = @PA_HPUX_FALSE@
PA_HPUX_TRUE = @PA_HPUX_TRUE@
PA_LINUX_FALSE = @PA_LINUX_FALSE@
PA_LINUX_TRUE = @PA_LINUX_TRUE@
POWERPC_AIX_FALSE = @POWERPC_AIX_FALSE@
POWERPC_AIX_TRUE = @POWERPC_AIX_TRUE@
POWERPC_DARWIN_FALSE = @POWERPC_DARWIN_FALSE@
POWERPC_DARWIN_TRUE = @POWERPC_DARWIN_TRUE@
POWERPC_FALSE = @POWERPC_FALSE@
POWERPC_FREEBSD_FALSE = @POWERPC_FREEBSD_FALSE@
POWERPC_FREEBSD_TRUE = @POWERPC_FREEBSD_TRUE@
POWERPC_TRUE = @POWERPC_TRUE@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
S390_FALSE = @S390_FALSE@ SED = @SED@
S390_TRUE = @S390_TRUE@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SH64_FALSE = @SH64_FALSE@
SH64_TRUE = @SH64_TRUE@
SHELL = @SHELL@ SHELL = @SHELL@
SH_FALSE = @SH_FALSE@
SH_TRUE = @SH_TRUE@
SPARC_FALSE = @SPARC_FALSE@
SPARC_TRUE = @SPARC_TRUE@
STRIP = @STRIP@ STRIP = @STRIP@
TARGET = @TARGET@ TARGET = @TARGET@
TARGETDIR = @TARGETDIR@ TARGETDIR = @TARGETDIR@
TESTSUBDIR_FALSE = @TESTSUBDIR_FALSE@
TESTSUBDIR_TRUE = @TESTSUBDIR_TRUE@
VERSION = @VERSION@ VERSION = @VERSION@
X86_64_FALSE = @X86_64_FALSE@ abs_builddir = @abs_builddir@
X86_64_TRUE = @X86_64_TRUE@ abs_srcdir = @abs_srcdir@
X86_DARWIN_FALSE = @X86_DARWIN_FALSE@ abs_top_builddir = @abs_top_builddir@
X86_DARWIN_TRUE = @X86_DARWIN_TRUE@ abs_top_srcdir = @abs_top_srcdir@
X86_FALSE = @X86_FALSE@
X86_TRUE = @X86_TRUE@
X86_WIN32_FALSE = @X86_WIN32_FALSE@
X86_WIN32_TRUE = @X86_WIN32_TRUE@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@ ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
@@ -185,26 +129,35 @@ build_alias = @build_alias@
build_cpu = @build_cpu@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host = @host@ host = @host@
host_alias = @host_alias@ host_alias = @host_alias@
host_cpu = @host_cpu@ host_cpu = @host_cpu@
host_os = @host_os@ host_os = @host_os@
host_vendor = @host_vendor@ host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@ includedir = @includedir@
infodir = @infodir@ infodir = @infodir@
install_sh = @install_sh@ install_sh = @install_sh@
libdir = @libdir@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
target = @target@ target = @target@
target_alias = @target_alias@ target_alias = @target_alias@
@@ -213,6 +166,8 @@ target_os = @target_os@
target_vendor = @target_vendor@ target_vendor = @target_vendor@
toolexecdir = @toolexecdir@ toolexecdir = @toolexecdir@
toolexeclibdir = @toolexeclibdir@ toolexeclibdir = @toolexeclibdir@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign dejagnu AUTOMAKE_OPTIONS = foreign dejagnu
# Setup the testing framework, if you have one # Setup the testing framework, if you have one
@@ -263,10 +218,6 @@ mostlyclean-libtool:
clean-libtool: clean-libtool:
-rm -rf .libs _libs -rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS tags: TAGS
TAGS: TAGS:
@@ -279,11 +230,13 @@ check-DEJAGNU: site.exp
EXPECT=$(EXPECT); export EXPECT; \ EXPECT=$(EXPECT); export EXPECT; \
runtest=$(RUNTEST); \ runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
l='$(DEJATOOL)'; for tool in $$l; do \ exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
$$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
then :; else exit_status=1; fi; \
done; \ done; \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\ else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi fi; \
exit $$exit_status
site.exp: Makefile site.exp: Makefile
@echo 'Making a new site.exp file...' @echo 'Making a new site.exp file...'
@echo '## these variables are automatically generated by make ##' >site.tmp @echo '## these variables are automatically generated by make ##' >site.tmp
@@ -311,22 +264,21 @@ distclean-DEJAGNU:
done done
distdir: $(DISTFILES) distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; for file in $$list; do \ list='$(DISTFILES)'; \
case $$file in \ dist_files=`for file in $$list; do echo $$file; done | \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ sed -e "s|^$$srcdirstrip/||;t" \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
esac; \ case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \ fi; \
@@ -373,8 +325,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am distclean: distclean-am
-rm -f Makefile -rm -f Makefile
distclean-am: clean-am distclean-DEJAGNU distclean-generic \ distclean-am: clean-am distclean-DEJAGNU distclean-generic
distclean-libtool
dvi: dvi-am dvi: dvi-am
@@ -388,12 +339,20 @@ info-am:
install-data-am: install-data-am:
install-dvi: install-dvi-am
install-exec-am: install-exec-am:
install-html: install-html-am
install-info: install-info-am install-info: install-info-am
install-man: install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
@@ -412,17 +371,21 @@ ps: ps-am
ps-am: ps-am:
uninstall-am: uninstall-info-am uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \ .PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \
clean-libtool distclean distclean-DEJAGNU distclean-generic \ clean-libtool distclean distclean-DEJAGNU distclean-generic \
distclean-libtool distdir dvi dvi-am html html-am info info-am \ distclean-libtool distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \ install install-am install-data install-data-am install-dvi \
install-exec-am install-info install-info-am install-man \ install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \ install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \ maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall uninstall-am uninstall-info-am uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.

View File

@@ -120,7 +120,7 @@ proc libffi-init { args } {
if { [is_remote host] == 0 && [which $compiler] != 0 } { if { [is_remote host] == 0 && [which $compiler] != 0 } {
foreach i "[exec $compiler --print-multi-lib]" { foreach i "[exec $compiler --print-multi-lib]" {
set mldir "" set mldir ""
regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
set mldir [string trimright $mldir "\;@"] set mldir [string trimright $mldir "\;@"]
if { "$mldir" == "." } { if { "$mldir" == "." } {
continue continue

View File

@@ -1,4 +1,4 @@
# Copyright (C) 2003, 2006 Free Software Foundation, Inc. # Copyright (C) 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# libffi testsuite that uses the 'dg.exp' driver. # libffi testsuite that uses the 'dg.exp' driver.
@@ -23,10 +23,7 @@ libffi-init
global srcdir subdir global srcdir subdir
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O0 -W -Wall" "" dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" ""
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O2" ""
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O3" ""
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-Os" ""
dg-finish dg-finish

View File

@@ -10,8 +10,7 @@
#include "ffitest.h" #include "ffitest.h"
static void static void
closure_test_fn0(ffi_cif* cif __UNUSED__, void* resp, void** args, closure_test_fn0(ffi_cif* cif,void* resp,void** args, void* userdata)
void* userdata)
{ {
*(ffi_arg*)resp = *(ffi_arg*)resp =
(int)*(unsigned long long *)args[0] + (int)(*(int *)args[1]) + (int)*(unsigned long long *)args[0] + (int)(*(int *)args[1]) +

View File

@@ -10,7 +10,7 @@
#include "ffitest.h" #include "ffitest.h"
static void closure_test_fn1(ffi_cif* cif __UNUSED__, void* resp, void** args, static void closure_test_fn1(ffi_cif* cif,void* resp,void** args,
void* userdata) void* userdata)
{ {
*(ffi_arg*)resp = *(ffi_arg*)resp =

View File

@@ -9,7 +9,7 @@
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h" #include "ffitest.h"
static void closure_test_fn2(ffi_cif* cif __UNUSED__, void* resp, void** args, static void closure_test_fn2(ffi_cif* cif,void* resp,void** args,
void* userdata) void* userdata)
{ {
*(ffi_arg*)resp = *(ffi_arg*)resp =

View File

@@ -9,7 +9,7 @@
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h" #include "ffitest.h"
static void closure_test_fn3(ffi_cif* cif __UNUSED__, void* resp, void** args, static void closure_test_fn3(ffi_cif* cif,void* resp,void** args,
void* userdata) void* userdata)
{ {
*(ffi_arg*)resp = *(ffi_arg*)resp =

View File

@@ -11,8 +11,7 @@
#include "ffitest.h" #include "ffitest.h"
static void static void
closure_test_fn0(ffi_cif* cif __UNUSED__, void* resp, void** args, closure_test_fn0(ffi_cif* cif,void* resp,void** args, void* userdata)
void* userdata)
{ {
*(ffi_arg*)resp = *(ffi_arg*)resp =
(int)*(unsigned long long *)args[0] + (int)*(unsigned long long *)args[1] + (int)*(unsigned long long *)args[0] + (int)*(unsigned long long *)args[1] +

View File

@@ -7,11 +7,11 @@
Originator: <andreast@gcc.gnu.org> 20031026 */ Originator: <andreast@gcc.gnu.org> 20031026 */
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h" #include "ffitest.h"
static void static void
closure_test_fn5(ffi_cif* cif __UNUSED__, void* resp, void** args, closure_test_fn5(ffi_cif* cif,void* resp,void** args, void* userdata)
void* userdata)
{ {
*(ffi_arg*)resp = *(ffi_arg*)resp =
(int)*(unsigned long long *)args[0] + (int)*(unsigned long long *)args[1] + (int)*(unsigned long long *)args[0] + (int)*(unsigned long long *)args[1] +

View File

@@ -28,8 +28,7 @@ cls_struct_12byte cls_struct_12byte_fn(struct cls_struct_12byte b1,
return result; return result;
} }
static void cls_struct_12byte_gn(ffi_cif* cif __UNUSED__, void* resp, static void cls_struct_12byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void** args , void* userdata __UNUSED__)
{ {
struct cls_struct_12byte b1, b2; struct cls_struct_12byte b1, b2;

View File

@@ -29,8 +29,7 @@ cls_struct_16byte cls_struct_16byte_fn(struct cls_struct_16byte b1,
return result; return result;
} }
static void cls_struct_16byte_gn(ffi_cif* cif __UNUSED__, void* resp, static void cls_struct_16byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void** args, void* userdata __UNUSED__)
{ {
struct cls_struct_16byte b1, b2; struct cls_struct_16byte b1, b2;

View File

@@ -33,8 +33,7 @@ cls_struct_18byte cls_struct_18byte_fn(struct cls_struct_18byte a1,
} }
static void static void
cls_struct_18byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_18byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_18byte a1, a2; struct cls_struct_18byte a1, a2;

View File

@@ -36,8 +36,7 @@ cls_struct_19byte cls_struct_19byte_fn(struct cls_struct_19byte a1,
} }
static void static void
cls_struct_19byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_19byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_19byte a1, a2; struct cls_struct_19byte a1, a2;

View File

@@ -26,8 +26,7 @@ cls_struct_1_1byte cls_struct_1_1byte_fn(struct cls_struct_1_1byte a1,
} }
static void static void
cls_struct_1_1byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_1_1byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_1_1byte a1, a2; struct cls_struct_1_1byte a1, a2;

View File

@@ -29,8 +29,7 @@ cls_struct_20byte cls_struct_20byte_fn(struct cls_struct_20byte a1,
} }
static void static void
cls_struct_20byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_20byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_20byte a1, a2; struct cls_struct_20byte a1, a2;

View File

@@ -29,8 +29,7 @@ cls_struct_20byte cls_struct_20byte_fn(struct cls_struct_20byte a1,
} }
static void static void
cls_struct_20byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_20byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_20byte a1, a2; struct cls_struct_20byte a1, a2;

View File

@@ -38,8 +38,7 @@ cls_struct_24byte cls_struct_24byte_fn(struct cls_struct_24byte b0,
} }
static void static void
cls_struct_24byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_24byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_24byte b0, b1, b2, b3; struct cls_struct_24byte b0, b1, b2, b3;

View File

@@ -28,8 +28,7 @@ cls_struct_2byte cls_struct_2byte_fn(struct cls_struct_2byte a1,
} }
static void static void
cls_struct_2byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_2byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_2byte a1, a2; struct cls_struct_2byte a1, a2;

View File

@@ -32,8 +32,7 @@ cls_struct_3_1byte cls_struct_3_1byte_fn(struct cls_struct_3_1byte a1,
} }
static void static void
cls_struct_3_1byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_3_1byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_3_1byte a1, a2; struct cls_struct_3_1byte a1, a2;

View File

@@ -28,8 +28,7 @@ cls_struct_3byte cls_struct_3byte_fn(struct cls_struct_3byte a1,
} }
static void static void
cls_struct_3byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_3byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_3byte a1, a2; struct cls_struct_3byte a1, a2;

View File

@@ -28,8 +28,7 @@ cls_struct_3byte_1 cls_struct_3byte_fn1(struct cls_struct_3byte_1 a1,
} }
static void static void
cls_struct_3byte_gn1(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_3byte_gn1(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_3byte_1 a1, a2; struct cls_struct_3byte_1 a1, a2;

View File

@@ -34,8 +34,7 @@ cls_struct_4_1byte cls_struct_4_1byte_fn(struct cls_struct_4_1byte a1,
} }
static void static void
cls_struct_4_1byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_4_1byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_4_1byte a1, a2; struct cls_struct_4_1byte a1, a2;

View File

@@ -28,8 +28,7 @@ cls_struct_4byte cls_struct_4byte_fn(struct cls_struct_4byte a1,
} }
static void static void
cls_struct_4byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_4byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_4byte a1, a2; struct cls_struct_4byte a1, a2;

View File

@@ -36,8 +36,7 @@ cls_struct_5byte cls_struct_5byte_fn(struct cls_struct_5byte a1,
} }
static void static void
cls_struct_5byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_5byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_5byte a1, a2; struct cls_struct_5byte a1, a2;

View File

@@ -31,8 +31,7 @@ cls_struct_5byte cls_struct_5byte_fn(struct cls_struct_5byte a1,
} }
static void static void
cls_struct_5byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_5byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_5byte a1, a2; struct cls_struct_5byte a1, a2;

View File

@@ -43,8 +43,7 @@ cls_struct_64byte cls_struct_64byte_fn(struct cls_struct_64byte b0,
} }
static void static void
cls_struct_64byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_64byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_64byte b0, b1, b2, b3; struct cls_struct_64byte b0, b1, b2, b3;

View File

@@ -38,8 +38,7 @@ cls_struct_6byte cls_struct_6byte_fn(struct cls_struct_6byte a1,
} }
static void static void
cls_struct_6byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_6byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_6byte a1, a2; struct cls_struct_6byte a1, a2;

View File

@@ -33,8 +33,7 @@ cls_struct_6byte cls_struct_6byte_fn(struct cls_struct_6byte a1,
} }
static void static void
cls_struct_6byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_6byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_6byte a1, a2; struct cls_struct_6byte a1, a2;

View File

@@ -40,8 +40,7 @@ cls_struct_7byte cls_struct_7byte_fn(struct cls_struct_7byte a1,
} }
static void static void
cls_struct_7byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_7byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_7byte a1, a2; struct cls_struct_7byte a1, a2;

View File

@@ -33,8 +33,7 @@ cls_struct_7byte cls_struct_7byte_fn(struct cls_struct_7byte a1,
} }
static void static void
cls_struct_7byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_7byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_7byte a1, a2; struct cls_struct_7byte a1, a2;

View File

@@ -27,8 +27,7 @@ cls_struct_8byte cls_struct_8byte_fn(struct cls_struct_8byte a1,
} }
static void static void
cls_struct_8byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_8byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_8byte a1, a2; struct cls_struct_8byte a1, a2;

View File

@@ -29,8 +29,8 @@ cls_struct_9byte cls_struct_9byte_fn(struct cls_struct_9byte b1,
return result; return result;
} }
static void cls_struct_9byte_gn(ffi_cif* cif __UNUSED__, void* resp, static void cls_struct_9byte_gn(ffi_cif* cif, void* resp, void** args,
void** args, void* userdata __UNUSED__) void* userdata)
{ {
struct cls_struct_9byte b1, b2; struct cls_struct_9byte b1, b2;

View File

@@ -29,8 +29,8 @@ cls_struct_9byte cls_struct_9byte_fn(struct cls_struct_9byte b1,
return result; return result;
} }
static void cls_struct_9byte_gn(ffi_cif* cif __UNUSED__, void* resp, static void cls_struct_9byte_gn(ffi_cif* cif, void* resp, void** args,
void** args, void* userdata __UNUSED__) void* userdata)
{ {
struct cls_struct_9byte b1, b2; struct cls_struct_9byte b1, b2;

View File

@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
} }
static void static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_align a1, a2; struct cls_struct_align a1, a2;

View File

@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
} }
static void static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_align a1, a2; struct cls_struct_align a1, a2;

View File

@@ -29,8 +29,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
} }
static void static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_align a1, a2; struct cls_struct_align a1, a2;

View File

@@ -19,19 +19,16 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
struct cls_struct_align result; struct cls_struct_align result;
result.a = a1.a + a2.a; result.a = a1.a + a2.a;
result.b = (void *)((unsigned long)a1.b + (unsigned long)a2.b); result.b = (void *)((size_t)a1.b + (size_t)a2.b);
result.c = a1.c + a2.c; result.c = a1.c + a2.c;
printf("%d %lu %d %d %lu %d: %d %lu %d\n", a1.a, (unsigned long)a1.b, a1.c, printf("%d %d %d %d %d %d: %d %d %d\n", a1.a, (size_t)a1.b, a1.c, a2.a, (size_t)a2.b, a2.c, result.a, (size_t)result.b, result.c);
a2.a, (unsigned long)a2.b, a2.c, result.a, (unsigned long)result.b,
result.c);
return result; return result;
} }
static void static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_align a1, a2; struct cls_struct_align a1, a2;
@@ -87,14 +84,14 @@ int main (void)
ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl); ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl);
/* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */ /* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %lu %d\n", res_dbl.a, (unsigned long)res_dbl.b, res_dbl.c); printf("res: %d %d %d\n", res_dbl.a, (size_t)res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */ /* { dg-output "\nres: 13 14271 140" } */
CHECK(ffi_prep_closure(pcl, &cif, cls_struct_align_gn, NULL) == FFI_OK); CHECK(ffi_prep_closure(pcl, &cif, cls_struct_align_gn, NULL) == FFI_OK);
res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(pcl))(g_dbl, f_dbl); res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(pcl))(g_dbl, f_dbl);
/* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */ /* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %lu %d\n", res_dbl.a, (unsigned long)res_dbl.b, res_dbl.c); printf("res: %d %d %d\n", res_dbl.a, (size_t)res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */ /* { dg-output "\nres: 13 14271 140" } */
exit(0); exit(0);

View File

@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
} }
static void static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_align a1, a2; struct cls_struct_align a1, a2;

View File

@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
} }
static void static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_align a1, a2; struct cls_struct_align a1, a2;

View File

@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
} }
static void static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_align a1, a2; struct cls_struct_align a1, a2;

View File

@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
} }
static void static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_align a1, a2; struct cls_struct_align a1, a2;

View File

@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
} }
static void static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_align a1, a2; struct cls_struct_align a1, a2;

View File

@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
} }
static void static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
void* userdata __UNUSED__)
{ {
struct cls_struct_align a1, a2; struct cls_struct_align a1, a2;

View File

@@ -7,8 +7,8 @@
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h" #include "ffitest.h"
static void cls_ret_double_fn(ffi_cif* cif __UNUSED__, void* resp, void** args, static void cls_ret_double_fn(ffi_cif* cif,void* resp,void** args,
void* userdata __UNUSED__) void* userdata)
{ {
*(double *)resp = *(double *)args[0]; *(double *)resp = *(double *)args[0];

View File

@@ -7,8 +7,8 @@
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h" #include "ffitest.h"
static void cls_ret_float_fn(ffi_cif* cif __UNUSED__, void* resp, void** args, static void cls_ret_float_fn(ffi_cif* cif,void* resp,void** args,
void* userdata __UNUSED__) void* userdata)
{ {
*(float *)resp = *(float *)args[0]; *(float *)resp = *(float *)args[0];

View File

@@ -19,8 +19,7 @@ signed char test_func_fn(signed char a1, signed char a2)
} }
static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals, static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
void *data __UNUSED__)
{ {
signed char a1, a2; signed char a1, a2;
@@ -68,7 +67,7 @@ int main (void)
ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl); ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
/* { dg-output "2 125: 127" } */ /* { dg-output "2 125: 127" } */
printf("res: %d\n", (signed char)res_call); printf("res: %d\n", res_call);
/* { dg-output "\nres: 127" } */ /* { dg-output "\nres: 127" } */
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK); CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);

View File

@@ -19,8 +19,7 @@ signed short test_func_fn(signed short a1, signed short a2)
} }
static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals, static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
void *data __UNUSED__)
{ {
signed short a1, a2; signed short a1, a2;
@@ -68,7 +67,7 @@ int main (void)
ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl); ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
/* { dg-output "2 32765: 32767" } */ /* { dg-output "2 32765: 32767" } */
printf("res: %d\n", (unsigned short)res_call); printf("res: %d\n", res_call);
/* { dg-output "\nres: 32767" } */ /* { dg-output "\nres: 32767" } */
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK); CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);

View File

@@ -20,8 +20,7 @@ signed short test_func_fn(signed char a1, signed short a2,
} }
static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals, static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
void *data __UNUSED__)
{ {
signed char a1, a3; signed char a1, a3;
signed short a2, a4; signed short a2, a4;
@@ -80,7 +79,7 @@ int main (void)
ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl); ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
/* { dg-output "1 32765 127 -128: 32765" } */ /* { dg-output "1 32765 127 -128: 32765" } */
printf("res: %d\n", (signed short)res_call); printf("res: %d\n", res_call);
/* { dg-output "\nres: 32765" } */ /* { dg-output "\nres: 32765" } */
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK); CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);

View File

@@ -20,8 +20,7 @@ unsigned char test_func_fn(unsigned char a1, unsigned char a2,
} }
static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals, static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
void *data __UNUSED__)
{ {
unsigned char a1, a2, a3, a4; unsigned char a1, a2, a3, a4;
@@ -36,9 +35,7 @@ static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals,
typedef unsigned char (*test_type)(unsigned char, unsigned char, typedef unsigned char (*test_type)(unsigned char, unsigned char,
unsigned char, unsigned char); unsigned char, unsigned char);
void test_func(ffi_cif *cif, void *rval, void **avals, void *data)
void test_func(ffi_cif *cif __UNUSED__, void *rval __UNUSED__, void **avals,
void *data __UNUSED__)
{ {
printf("%d %d %d %d\n", *(unsigned char *)avals[0], printf("%d %d %d %d\n", *(unsigned char *)avals[0],
*(unsigned char *)avals[1], *(unsigned char *)avals[2], *(unsigned char *)avals[1], *(unsigned char *)avals[2],
@@ -85,7 +82,7 @@ int main (void)
ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl); ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
/* { dg-output "1 2 127 125: 255" } */ /* { dg-output "1 2 127 125: 255" } */
printf("res: %d\n", (unsigned char)res_call); printf("res: %d\n", res_call);
/* { dg-output "\nres: 255" } */ /* { dg-output "\nres: 255" } */
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK); CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);

View File

@@ -19,8 +19,7 @@ unsigned short test_func_fn(unsigned short a1, unsigned short a2)
} }
static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals, static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
void *data __UNUSED__)
{ {
unsigned short a1, a2; unsigned short a1, a2;
@@ -68,7 +67,7 @@ int main (void)
ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl); ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
/* { dg-output "2 32765: 32767" } */ /* { dg-output "2 32765: 32767" } */
printf("res: %d\n", (unsigned short)res_call); printf("res: %d\n", res_call);
/* { dg-output "\nres: 32767" } */ /* { dg-output "\nres: 32767" } */
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK); CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);

View File

@@ -20,8 +20,7 @@ unsigned short test_func_fn(unsigned char a1, unsigned short a2,
} }
static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals, static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
void *data __UNUSED__)
{ {
unsigned char a1, a3; unsigned char a1, a3;
unsigned short a2, a4; unsigned short a2, a4;
@@ -80,7 +79,7 @@ int main (void)
ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl); ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
/* { dg-output "1 2 127 128: 258" } */ /* { dg-output "1 2 127 128: 258" } */
printf("res: %d\n", (unsigned short)res_call); printf("res: %d\n", res_call);
/* { dg-output "\nres: 258" } */ /* { dg-output "\nres: 258" } */
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK); CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);

View File

@@ -7,12 +7,12 @@
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h" #include "ffitest.h"
static void cls_ret_schar_fn(ffi_cif* cif __UNUSED__, void* resp, void** args, static void cls_ret_schar_fn(ffi_cif* cif,void* resp,void** args,
void* userdata __UNUSED__) void* userdata)
{ {
*(ffi_arg*)resp = *(signed char *)args[0]; *(ffi_arg*)resp = *(signed char *)args[0];
printf("%d: %d\n",*(signed char *)args[0], printf("%d: %d\n",*(signed char *)args[0],
(int)*(ffi_arg *)(resp)); *(ffi_arg*)resp);
} }
typedef signed char (*cls_ret_schar)(signed char); typedef signed char (*cls_ret_schar)(signed char);

View File

@@ -7,12 +7,12 @@
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h" #include "ffitest.h"
static void cls_ret_sint_fn(ffi_cif* cif __UNUSED__, void* resp, void** args, static void cls_ret_sint_fn(ffi_cif* cif,void* resp,void** args,
void* userdata __UNUSED__) void* userdata)
{ {
*(ffi_arg*)resp = *(signed int *)args[0]; *(ffi_arg*)resp = *(signed int *)args[0];
printf("%d: %d\n",*(signed int *)args[0], printf("%d: %d\n",*(signed int *)args[0],
(int)*(ffi_arg *)(resp)); *(ffi_arg*)resp);
} }
typedef signed int (*cls_ret_sint)(signed int); typedef signed int (*cls_ret_sint)(signed int);

View File

@@ -7,12 +7,12 @@
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h" #include "ffitest.h"
static void cls_ret_sshort_fn(ffi_cif* cif __UNUSED__, void* resp, void** args, static void cls_ret_sshort_fn(ffi_cif* cif,void* resp,void** args,
void* userdata __UNUSED__) void* userdata)
{ {
*(ffi_arg*)resp = *(signed short *)args[0]; *(ffi_arg*)resp = *(signed short *)args[0];
printf("%d: %d\n",*(signed short *)args[0], printf("%d: %d\n",*(signed short *)args[0],
(int)*(ffi_arg *)(resp)); *(ffi_arg*)resp);
} }
typedef signed short (*cls_ret_sshort)(signed short); typedef signed short (*cls_ret_sshort)(signed short);

View File

@@ -7,12 +7,12 @@
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ /* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h" #include "ffitest.h"
static void cls_ret_uchar_fn(ffi_cif* cif __UNUSED__, void* resp, void** args, static void cls_ret_uchar_fn(ffi_cif* cif,void* resp,void** args,
void* userdata __UNUSED__) void* userdata)
{ {
*(ffi_arg*)resp = *(unsigned char *)args[0]; *(ffi_arg*)resp = *(unsigned char *)args[0];
printf("%d: %d\n",*(unsigned char *)args[0], printf("%d: %d\n",*(unsigned char *)args[0],
(int)*(ffi_arg *)(resp)); *(ffi_arg*)resp);
} }
typedef unsigned char (*cls_ret_uchar)(unsigned char); typedef unsigned char (*cls_ret_uchar)(unsigned char);

Some files were not shown because too many files have changed in this diff Show More