Merge from gcc
This commit is contained in:
431
libffi/ChangeLog
431
libffi/ChangeLog
@@ -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>
|
||||
|
||||
* testsuite/lib/libffi-dg.exp (libffi_target_compile): For
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## Process this with automake to create Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign subdir-objects
|
||||
ACLOCAL_AMFLAGS =
|
||||
ACLOCAL_AMFLAGS = -I ..
|
||||
|
||||
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/sparc/v8.S src/sparc/v9.S src/sparc/ffitarget.h \
|
||||
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/pa/ffi.c src/pa/linux.S src/pa/hpux32.S \
|
||||
src/frv/eabi.S src/frv/ffitarget.h
|
||||
src/pa/ffi.c src/pa/linux.S src/frv/eabi.S src/frv/ffitarget.h
|
||||
|
||||
## ################################################################
|
||||
|
||||
@@ -94,9 +93,6 @@ endif
|
||||
if X86_WIN32
|
||||
nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win32.S
|
||||
endif
|
||||
if X86_DARWIN
|
||||
nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S
|
||||
endif
|
||||
if SPARC
|
||||
nodist_libffi_la_SOURCES += src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
|
||||
endif
|
||||
@@ -145,12 +141,9 @@ endif
|
||||
if SH64
|
||||
nodist_libffi_la_SOURCES += src/sh64/sysv.S src/sh64/ffi.c
|
||||
endif
|
||||
if PA_LINUX
|
||||
if PA
|
||||
nodist_libffi_la_SOURCES += src/pa/linux.S src/pa/ffi.c
|
||||
endif
|
||||
if PA_HPUX
|
||||
nodist_libffi_la_SOURCES += src/pa/hpux32.S src/pa/ffi.c
|
||||
endif
|
||||
|
||||
libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
|
||||
nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
|
||||
@@ -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_CCASFLAGS = $(AM_CPPFLAGS)
|
||||
|
||||
# No install-html support
|
||||
.PHONY: install-html
|
||||
install-html:
|
||||
|
||||
|
||||
@@ -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@
|
||||
|
||||
# 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
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -14,15 +14,11 @@
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = .
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(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
|
||||
@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_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_6 = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
|
||||
@ALPHA_TRUE@am__append_7 = src/alpha/ffi.c src/alpha/osf.S
|
||||
@IA64_TRUE@am__append_8 = src/ia64/ffi.c src/ia64/unix.S
|
||||
@M32R_TRUE@am__append_9 = src/m32r/sysv.S src/m32r/ffi.c
|
||||
@M68K_TRUE@am__append_10 = src/m68k/ffi.c src/m68k/sysv.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_12 = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_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_14 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
|
||||
@ARM_TRUE@am__append_15 = src/arm/sysv.S src/arm/ffi.c
|
||||
@LIBFFI_CRIS_TRUE@am__append_16 = src/cris/sysv.S src/cris/ffi.c
|
||||
@FRV_TRUE@am__append_17 = src/frv/eabi.S src/frv/ffi.c
|
||||
@S390_TRUE@am__append_18 = src/s390/sysv.S src/s390/ffi.c
|
||||
@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_20 = src/sh/sysv.S src/sh/ffi.c
|
||||
@SH64_TRUE@am__append_21 = src/sh64/sysv.S src/sh64/ffi.c
|
||||
@PA_LINUX_TRUE@am__append_22 = src/pa/linux.S src/pa/ffi.c
|
||||
@PA_HPUX_TRUE@am__append_23 = src/pa/hpux32.S src/pa/ffi.c
|
||||
@SPARC_TRUE@am__append_5 = 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
|
||||
@IA64_TRUE@am__append_7 = src/ia64/ffi.c src/ia64/unix.S
|
||||
@M32R_TRUE@am__append_8 = src/m32r/sysv.S src/m32r/ffi.c
|
||||
@M68K_TRUE@am__append_9 = 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_AIX_TRUE@am__append_11 = 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_FREEBSD_TRUE@am__append_13 = 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
|
||||
@LIBFFI_CRIS_TRUE@am__append_15 = src/cris/sysv.S src/cris/ffi.c
|
||||
@FRV_TRUE@am__append_16 = src/frv/eabi.S src/frv/ffi.c
|
||||
@S390_TRUE@am__append_17 = 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
|
||||
@SH_TRUE@am__append_19 = src/sh/sysv.S src/sh/ffi.c
|
||||
@SH64_TRUE@am__append_20 = src/sh64/sysv.S src/sh64/ffi.c
|
||||
@PA_TRUE@am__append_21 = src/pa/linux.S src/pa/ffi.c
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/fficonfig.h.in \
|
||||
$(top_srcdir)/configure ChangeLog compile config.guess \
|
||||
config.sub depcomp install-sh ltconfig ltmain.sh missing \
|
||||
mkinstalldirs
|
||||
subdir = .
|
||||
config.sub depcomp install-sh ltcf-c.sh ltcf-cxx.sh \
|
||||
ltcf-gcj.sh ltconfig ltmain.sh missing
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = fficonfig.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
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
|
||||
@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_DARWIN_TRUE@am__objects_5 = src/x86/ffi.lo src/x86/darwin.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@am__objects_5 = src/sparc/ffi.lo src/sparc/v8.lo \
|
||||
@SPARC_TRUE@ src/sparc/v9.lo
|
||||
@ALPHA_TRUE@am__objects_7 = src/alpha/ffi.lo src/alpha/osf.lo
|
||||
@IA64_TRUE@am__objects_8 = src/ia64/ffi.lo src/ia64/unix.lo
|
||||
@M32R_TRUE@am__objects_9 = src/m32r/sysv.lo src/m32r/ffi.lo
|
||||
@M68K_TRUE@am__objects_10 = src/m68k/ffi.lo src/m68k/sysv.lo
|
||||
@POWERPC_TRUE@am__objects_11 = src/powerpc/ffi.lo src/powerpc/sysv.lo \
|
||||
@ALPHA_TRUE@am__objects_6 = src/alpha/ffi.lo src/alpha/osf.lo
|
||||
@IA64_TRUE@am__objects_7 = src/ia64/ffi.lo src/ia64/unix.lo
|
||||
@M32R_TRUE@am__objects_8 = src/m32r/sysv.lo src/m32r/ffi.lo
|
||||
@M68K_TRUE@am__objects_9 = src/m68k/ffi.lo src/m68k/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/linux64.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_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_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/ppc_closure.lo
|
||||
@ARM_TRUE@am__objects_15 = src/arm/sysv.lo src/arm/ffi.lo
|
||||
@LIBFFI_CRIS_TRUE@am__objects_16 = src/cris/sysv.lo src/cris/ffi.lo
|
||||
@FRV_TRUE@am__objects_17 = src/frv/eabi.lo src/frv/ffi.lo
|
||||
@S390_TRUE@am__objects_18 = src/s390/sysv.lo src/s390/ffi.lo
|
||||
@X86_64_TRUE@am__objects_19 = src/x86/ffi64.lo src/x86/unix64.lo \
|
||||
@ARM_TRUE@am__objects_14 = src/arm/sysv.lo src/arm/ffi.lo
|
||||
@LIBFFI_CRIS_TRUE@am__objects_15 = src/cris/sysv.lo src/cris/ffi.lo
|
||||
@FRV_TRUE@am__objects_16 = src/frv/eabi.lo src/frv/ffi.lo
|
||||
@S390_TRUE@am__objects_17 = src/s390/sysv.lo src/s390/ffi.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
|
||||
@SH_TRUE@am__objects_20 = src/sh/sysv.lo src/sh/ffi.lo
|
||||
@SH64_TRUE@am__objects_21 = src/sh64/sysv.lo src/sh64/ffi.lo
|
||||
@PA_LINUX_TRUE@am__objects_22 = src/pa/linux.lo src/pa/ffi.lo
|
||||
@PA_HPUX_TRUE@am__objects_23 = src/pa/hpux32.lo src/pa/ffi.lo
|
||||
@SH_TRUE@am__objects_19 = src/sh/sysv.lo src/sh/ffi.lo
|
||||
@SH64_TRUE@am__objects_20 = src/sh64/sysv.lo src/sh64/ffi.lo
|
||||
@PA_TRUE@am__objects_21 = src/pa/linux.lo src/pa/ffi.lo
|
||||
nodist_libffi_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
|
||||
$(am__objects_3) $(am__objects_4) $(am__objects_5) \
|
||||
$(am__objects_6) $(am__objects_7) $(am__objects_8) \
|
||||
@@ -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_15) $(am__objects_16) $(am__objects_17) \
|
||||
$(am__objects_18) $(am__objects_19) $(am__objects_20) \
|
||||
$(am__objects_21) $(am__objects_22) $(am__objects_23)
|
||||
$(am__objects_21)
|
||||
libffi_la_OBJECTS = $(am_libffi_la_OBJECTS) \
|
||||
$(nodist_libffi_la_OBJECTS)
|
||||
libffi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(libffi_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
libffi_convenience_la_LIBADD =
|
||||
am__objects_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
|
||||
am_libffi_convenience_la_OBJECTS = $(am__objects_24)
|
||||
am__objects_25 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
|
||||
am_libffi_convenience_la_OBJECTS = $(am__objects_22)
|
||||
am__objects_23 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
|
||||
$(am__objects_4) $(am__objects_5) $(am__objects_6) \
|
||||
$(am__objects_7) $(am__objects_8) $(am__objects_9) \
|
||||
$(am__objects_10) $(am__objects_11) $(am__objects_12) \
|
||||
$(am__objects_13) $(am__objects_14) $(am__objects_15) \
|
||||
$(am__objects_16) $(am__objects_17) $(am__objects_18) \
|
||||
$(am__objects_19) $(am__objects_20) $(am__objects_21) \
|
||||
$(am__objects_22) $(am__objects_23)
|
||||
nodist_libffi_convenience_la_OBJECTS = $(am__objects_25)
|
||||
$(am__objects_19) $(am__objects_20) $(am__objects_21)
|
||||
nodist_libffi_convenience_la_OBJECTS = $(am__objects_23)
|
||||
libffi_convenience_la_OBJECTS = $(am_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
|
||||
am__depfiles_maybe = depfiles
|
||||
CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
|
||||
LTCCASCOMPILE = $(LIBTOOL) --mode=compile $(CCAS) $(AM_CCASFLAGS) \
|
||||
$(CCASFLAGS)
|
||||
CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_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) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
SOURCES = $(libffi_la_SOURCES) $(nodist_libffi_la_SOURCES) \
|
||||
$(libffi_convenience_la_SOURCES) \
|
||||
$(nodist_libffi_convenience_la_SOURCES)
|
||||
DIST_SOURCES = $(libffi_la_SOURCES) $(libffi_convenience_la_SOURCES)
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-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
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
@@ -190,21 +189,16 @@ distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALPHA_FALSE = @ALPHA_FALSE@
|
||||
ALPHA_TRUE = @ALPHA_TRUE@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
|
||||
AR = @AR@
|
||||
ARM_FALSE = @ARM_FALSE@
|
||||
ARM_TRUE = @ARM_TRUE@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASDEPMODE = @CCASDEPMODE@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
@@ -225,38 +219,23 @@ EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
FRV_FALSE = @FRV_FALSE@
|
||||
FRV_TRUE = @FRV_TRUE@
|
||||
GREP = @GREP@
|
||||
HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@
|
||||
IA64_FALSE = @IA64_FALSE@
|
||||
IA64_TRUE = @IA64_TRUE@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBFFI_CRIS_FALSE = @LIBFFI_CRIS_FALSE@
|
||||
LIBFFI_CRIS_TRUE = @LIBFFI_CRIS_TRUE@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
M32R_FALSE = @M32R_FALSE@
|
||||
M32R_TRUE = @M32R_TRUE@
|
||||
M68K_FALSE = @M68K_FALSE@
|
||||
M68K_TRUE = @M68K_TRUE@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MIPS_IRIX_FALSE = @MIPS_IRIX_FALSE@
|
||||
MIPS_IRIX_TRUE = @MIPS_IRIX_TRUE@
|
||||
MIPS_LINUX_FALSE = @MIPS_LINUX_FALSE@
|
||||
MIPS_LINUX_TRUE = @MIPS_LINUX_TRUE@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PA64_HPUX_FALSE = @PA64_HPUX_FALSE@
|
||||
PA64_HPUX_TRUE = @PA64_HPUX_TRUE@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
@@ -264,53 +243,21 @@ PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
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@
|
||||
S390_FALSE = @S390_FALSE@
|
||||
S390_TRUE = @S390_TRUE@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SH64_FALSE = @SH64_FALSE@
|
||||
SH64_TRUE = @SH64_TRUE@
|
||||
SHELL = @SHELL@
|
||||
SH_FALSE = @SH_FALSE@
|
||||
SH_TRUE = @SH_TRUE@
|
||||
SPARC_FALSE = @SPARC_FALSE@
|
||||
SPARC_TRUE = @SPARC_TRUE@
|
||||
STRIP = @STRIP@
|
||||
TARGET = @TARGET@
|
||||
TARGETDIR = @TARGETDIR@
|
||||
TESTSUBDIR_FALSE = @TESTSUBDIR_FALSE@
|
||||
TESTSUBDIR_TRUE = @TESTSUBDIR_TRUE@
|
||||
VERSION = @VERSION@
|
||||
X86_64_FALSE = @X86_64_FALSE@
|
||||
X86_64_TRUE = @X86_64_TRUE@
|
||||
X86_DARWIN_FALSE = @X86_DARWIN_FALSE@
|
||||
X86_DARWIN_TRUE = @X86_DARWIN_TRUE@
|
||||
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@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
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__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
@@ -322,26 +269,35 @@ build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
@@ -350,8 +306,10 @@ target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
toolexecdir = @toolexecdir@
|
||||
toolexeclibdir = @toolexeclibdir@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = foreign subdir-objects
|
||||
ACLOCAL_AMFLAGS =
|
||||
ACLOCAL_AMFLAGS = -I ..
|
||||
SUBDIRS = include testsuite
|
||||
EXTRA_DIST = LICENSE ChangeLog.v1 \
|
||||
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/sparc/v8.S src/sparc/v9.S src/sparc/ffitarget.h \
|
||||
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/pa/ffi.c src/pa/linux.S src/pa/hpux32.S \
|
||||
src/frv/eabi.S src/frv/ffitarget.h
|
||||
src/pa/ffi.c src/pa/linux.S src/frv/eabi.S src/frv/ffitarget.h
|
||||
|
||||
|
||||
# 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_15) $(am__append_16) $(am__append_17) \
|
||||
$(am__append_18) $(am__append_19) $(am__append_20) \
|
||||
$(am__append_21) $(am__append_22) $(am__append_23)
|
||||
$(am__append_21)
|
||||
libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
|
||||
nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
|
||||
AM_CFLAGS = -Wall -g -fexceptions
|
||||
@@ -477,7 +434,7 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
fficonfig.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) stamp-h1; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/fficonfig.h.in $(top_builddir)/config.status
|
||||
@@ -501,7 +458,7 @@ clean-noinstLTLIBRARIES:
|
||||
done
|
||||
install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(toolexeclibdir)" || $(mkdir_p) "$(DESTDIR)$(toolexeclibdir)"
|
||||
test -z "$(toolexeclibdir)" || $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)"
|
||||
@list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
@@ -512,7 +469,7 @@ install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
|
||||
|
||||
uninstall-toolexeclibLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@set -x; list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
|
||||
@list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(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"; \
|
||||
done
|
||||
src/$(am__dirstamp):
|
||||
@$(mkdir_p) src
|
||||
@$(MKDIR_P) src
|
||||
@: > src/$(am__dirstamp)
|
||||
src/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) src/$(DEPDIR)
|
||||
@$(MKDIR_P) src/$(DEPDIR)
|
||||
@: > 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)
|
||||
@@ -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/java_raw_api.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/mips/$(am__dirstamp):
|
||||
@$(mkdir_p) src/mips
|
||||
@$(MKDIR_P) src/mips
|
||||
@: > src/mips/$(am__dirstamp)
|
||||
src/mips/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) src/mips/$(DEPDIR)
|
||||
@$(MKDIR_P) src/mips/$(DEPDIR)
|
||||
@: > src/mips/$(DEPDIR)/$(am__dirstamp)
|
||||
src/mips/ffi.lo: src/mips/$(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/$(DEPDIR)/$(am__dirstamp)
|
||||
src/x86/$(am__dirstamp):
|
||||
@$(mkdir_p) src/x86
|
||||
@$(MKDIR_P) src/x86
|
||||
@: > src/x86/$(am__dirstamp)
|
||||
src/x86/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) src/x86/$(DEPDIR)
|
||||
@$(MKDIR_P) src/x86/$(DEPDIR)
|
||||
@: > src/x86/$(DEPDIR)/$(am__dirstamp)
|
||||
src/x86/ffi.lo: src/x86/$(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/win32.lo: src/x86/$(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):
|
||||
@$(mkdir_p) src/sparc
|
||||
@$(MKDIR_P) src/sparc
|
||||
@: > src/sparc/$(am__dirstamp)
|
||||
src/sparc/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) src/sparc/$(DEPDIR)
|
||||
@$(MKDIR_P) src/sparc/$(DEPDIR)
|
||||
@: > src/sparc/$(DEPDIR)/$(am__dirstamp)
|
||||
src/sparc/ffi.lo: src/sparc/$(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/$(DEPDIR)/$(am__dirstamp)
|
||||
src/alpha/$(am__dirstamp):
|
||||
@$(mkdir_p) src/alpha
|
||||
@$(MKDIR_P) src/alpha
|
||||
@: > src/alpha/$(am__dirstamp)
|
||||
src/alpha/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) src/alpha/$(DEPDIR)
|
||||
@$(MKDIR_P) src/alpha/$(DEPDIR)
|
||||
@: > src/alpha/$(DEPDIR)/$(am__dirstamp)
|
||||
src/alpha/ffi.lo: src/alpha/$(am__dirstamp) \
|
||||
src/alpha/$(DEPDIR)/$(am__dirstamp)
|
||||
src/alpha/osf.lo: src/alpha/$(am__dirstamp) \
|
||||
src/alpha/$(DEPDIR)/$(am__dirstamp)
|
||||
src/ia64/$(am__dirstamp):
|
||||
@$(mkdir_p) src/ia64
|
||||
@$(MKDIR_P) src/ia64
|
||||
@: > src/ia64/$(am__dirstamp)
|
||||
src/ia64/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) src/ia64/$(DEPDIR)
|
||||
@$(MKDIR_P) src/ia64/$(DEPDIR)
|
||||
@: > src/ia64/$(DEPDIR)/$(am__dirstamp)
|
||||
src/ia64/ffi.lo: src/ia64/$(am__dirstamp) \
|
||||
src/ia64/$(DEPDIR)/$(am__dirstamp)
|
||||
src/ia64/unix.lo: src/ia64/$(am__dirstamp) \
|
||||
src/ia64/$(DEPDIR)/$(am__dirstamp)
|
||||
src/m32r/$(am__dirstamp):
|
||||
@$(mkdir_p) src/m32r
|
||||
@$(MKDIR_P) src/m32r
|
||||
@: > src/m32r/$(am__dirstamp)
|
||||
src/m32r/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) src/m32r/$(DEPDIR)
|
||||
@$(MKDIR_P) src/m32r/$(DEPDIR)
|
||||
@: > src/m32r/$(DEPDIR)/$(am__dirstamp)
|
||||
src/m32r/sysv.lo: src/m32r/$(am__dirstamp) \
|
||||
src/m32r/$(DEPDIR)/$(am__dirstamp)
|
||||
src/m32r/ffi.lo: src/m32r/$(am__dirstamp) \
|
||||
src/m32r/$(DEPDIR)/$(am__dirstamp)
|
||||
src/m68k/$(am__dirstamp):
|
||||
@$(mkdir_p) src/m68k
|
||||
@$(MKDIR_P) src/m68k
|
||||
@: > src/m68k/$(am__dirstamp)
|
||||
src/m68k/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) src/m68k/$(DEPDIR)
|
||||
@$(MKDIR_P) src/m68k/$(DEPDIR)
|
||||
@: > src/m68k/$(DEPDIR)/$(am__dirstamp)
|
||||
src/m68k/ffi.lo: src/m68k/$(am__dirstamp) \
|
||||
src/m68k/$(DEPDIR)/$(am__dirstamp)
|
||||
src/m68k/sysv.lo: src/m68k/$(am__dirstamp) \
|
||||
src/m68k/$(DEPDIR)/$(am__dirstamp)
|
||||
src/powerpc/$(am__dirstamp):
|
||||
@$(mkdir_p) src/powerpc
|
||||
@$(MKDIR_P) src/powerpc
|
||||
@: > src/powerpc/$(am__dirstamp)
|
||||
src/powerpc/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) src/powerpc/$(DEPDIR)
|
||||
@$(MKDIR_P) src/powerpc/$(DEPDIR)
|
||||
@: > src/powerpc/$(DEPDIR)/$(am__dirstamp)
|
||||
src/powerpc/ffi.lo: src/powerpc/$(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/$(DEPDIR)/$(am__dirstamp)
|
||||
src/arm/$(am__dirstamp):
|
||||
@$(mkdir_p) src/arm
|
||||
@$(MKDIR_P) src/arm
|
||||
@: > src/arm/$(am__dirstamp)
|
||||
src/arm/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) src/arm/$(DEPDIR)
|
||||
@$(MKDIR_P) src/arm/$(DEPDIR)
|
||||
@: > src/arm/$(DEPDIR)/$(am__dirstamp)
|
||||
src/arm/sysv.lo: src/arm/$(am__dirstamp) \
|
||||
src/arm/$(DEPDIR)/$(am__dirstamp)
|
||||
src/arm/ffi.lo: src/arm/$(am__dirstamp) \
|
||||
src/arm/$(DEPDIR)/$(am__dirstamp)
|
||||
src/cris/$(am__dirstamp):
|
||||
@$(mkdir_p) src/cris
|
||||
@$(MKDIR_P) src/cris
|
||||
@: > src/cris/$(am__dirstamp)
|
||||
src/cris/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) src/cris/$(DEPDIR)
|
||||
@$(MKDIR_P) src/cris/$(DEPDIR)
|
||||
@: > src/cris/$(DEPDIR)/$(am__dirstamp)
|
||||
src/cris/sysv.lo: src/cris/$(am__dirstamp) \
|
||||
src/cris/$(DEPDIR)/$(am__dirstamp)
|
||||
src/cris/ffi.lo: src/cris/$(am__dirstamp) \
|
||||
src/cris/$(DEPDIR)/$(am__dirstamp)
|
||||
src/frv/$(am__dirstamp):
|
||||
@$(mkdir_p) src/frv
|
||||
@$(MKDIR_P) src/frv
|
||||
@: > src/frv/$(am__dirstamp)
|
||||
src/frv/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) src/frv/$(DEPDIR)
|
||||
@$(MKDIR_P) src/frv/$(DEPDIR)
|
||||
@: > src/frv/$(DEPDIR)/$(am__dirstamp)
|
||||
src/frv/eabi.lo: src/frv/$(am__dirstamp) \
|
||||
src/frv/$(DEPDIR)/$(am__dirstamp)
|
||||
src/frv/ffi.lo: src/frv/$(am__dirstamp) \
|
||||
src/frv/$(DEPDIR)/$(am__dirstamp)
|
||||
src/s390/$(am__dirstamp):
|
||||
@$(mkdir_p) src/s390
|
||||
@$(MKDIR_P) src/s390
|
||||
@: > src/s390/$(am__dirstamp)
|
||||
src/s390/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) src/s390/$(DEPDIR)
|
||||
@$(MKDIR_P) src/s390/$(DEPDIR)
|
||||
@: > src/s390/$(DEPDIR)/$(am__dirstamp)
|
||||
src/s390/sysv.lo: src/s390/$(am__dirstamp) \
|
||||
src/s390/$(DEPDIR)/$(am__dirstamp)
|
||||
src/s390/ffi.lo: src/s390/$(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/$(DEPDIR)/$(am__dirstamp)
|
||||
src/sh/$(am__dirstamp):
|
||||
@$(mkdir_p) src/sh
|
||||
@$(MKDIR_P) src/sh
|
||||
@: > src/sh/$(am__dirstamp)
|
||||
src/sh/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) src/sh/$(DEPDIR)
|
||||
@$(MKDIR_P) src/sh/$(DEPDIR)
|
||||
@: > src/sh/$(DEPDIR)/$(am__dirstamp)
|
||||
src/sh/sysv.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):
|
||||
@$(mkdir_p) src/sh64
|
||||
@$(MKDIR_P) src/sh64
|
||||
@: > src/sh64/$(am__dirstamp)
|
||||
src/sh64/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) src/sh64/$(DEPDIR)
|
||||
@$(MKDIR_P) src/sh64/$(DEPDIR)
|
||||
@: > src/sh64/$(DEPDIR)/$(am__dirstamp)
|
||||
src/sh64/sysv.lo: src/sh64/$(am__dirstamp) \
|
||||
src/sh64/$(DEPDIR)/$(am__dirstamp)
|
||||
src/sh64/ffi.lo: src/sh64/$(am__dirstamp) \
|
||||
src/sh64/$(DEPDIR)/$(am__dirstamp)
|
||||
src/pa/$(am__dirstamp):
|
||||
@$(mkdir_p) src/pa
|
||||
@$(MKDIR_P) src/pa
|
||||
@: > src/pa/$(am__dirstamp)
|
||||
src/pa/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(mkdir_p) src/pa/$(DEPDIR)
|
||||
@$(MKDIR_P) src/pa/$(DEPDIR)
|
||||
@: > src/pa/$(DEPDIR)/$(am__dirstamp)
|
||||
src/pa/linux.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)
|
||||
$(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)
|
||||
$(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:
|
||||
-rm -f *.$(OBJEXT)
|
||||
@@ -764,8 +715,6 @@ mostlyclean-compile:
|
||||
-rm -f src/mips/o32.lo
|
||||
-rm -f src/pa/ffi.$(OBJEXT)
|
||||
-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.lo
|
||||
-rm -f src/powerpc/aix.$(OBJEXT)
|
||||
@@ -812,10 +761,6 @@ mostlyclean-compile:
|
||||
-rm -f src/sparc/v9.lo
|
||||
-rm -f src/types.$(OBJEXT)
|
||||
-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.lo
|
||||
-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)/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)/osf.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/arm/$(DEPDIR)/ffi.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/arm/$(DEPDIR)/sysv.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/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/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)/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)/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)/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)/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_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)/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)/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)/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)/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)/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:
|
||||
$(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:
|
||||
$(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:
|
||||
$(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:
|
||||
@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@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ mv -f $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.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@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||
@am__fastdepCC_TRUE@ mv -f $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.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@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ mv -f $$depbase.Tpo $$depbase.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
@@ -910,7 +896,6 @@ clean-libtool:
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
@@ -943,8 +928,7 @@ $(RECURSIVE_TARGETS):
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
@@ -1046,24 +1030,22 @@ distclean-tags:
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_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'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
test -d $(distdir) || mkdir $(distdir)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
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; \
|
||||
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 \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
@@ -1077,7 +1059,7 @@ distdir: $(DISTFILES)
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
@@ -1085,6 +1067,8 @@ distdir: $(DISTFILES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
@@ -1092,7 +1076,7 @@ distdir: $(DISTFILES)
|
||||
-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 -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)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
@@ -1167,7 +1151,7 @@ distcheck: dist
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
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:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
@@ -1192,7 +1176,7 @@ all-am: Makefile $(LTLIBRARIES) fficonfig.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(toolexeclibdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
@@ -1274,12 +1258,20 @@ info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-exec-am: install-toolexeclibLTLIBRARIES
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
@@ -1302,33 +1294,30 @@ ps: ps-recursive
|
||||
|
||||
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 \
|
||||
check-am clean clean-generic clean-libtool \
|
||||
clean-noinstLTLIBRARIES clean-recursive \
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am am--refresh check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLTLIBRARIES \
|
||||
clean-toolexeclibLTLIBRARIES ctags ctags-recursive dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \
|
||||
distcheck distclean distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-recursive \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-exec install-exec-am \
|
||||
install-info install-info-am install-man install-strip \
|
||||
install-toolexeclibLTLIBRARIES installcheck installcheck-am \
|
||||
installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
|
||||
tags tags-recursive uninstall uninstall-am uninstall-info-am \
|
||||
distclean-hdr distclean-libtool distclean-tags distcleancheck \
|
||||
distdir distuninstallcheck dvi dvi-am html html-am info \
|
||||
info-am install install-am install-data install-data-am \
|
||||
install-dvi 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 install-toolexeclibLTLIBRARIES \
|
||||
installcheck installcheck-am installdirs installdirs-am \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
|
||||
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.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
@@ -372,6 +372,15 @@ single-precision anyway. This causes one test to fail (the `many
|
||||
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
|
||||
=======
|
||||
|
||||
|
||||
809
libffi/aclocal.m4
vendored
809
libffi/aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,32 @@
|
||||
# Configure fragment invoked in the post-target section for subdirs
|
||||
# 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
|
||||
# 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
|
||||
# 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:
|
||||
# srcdir, host, ac_configure_args
|
||||
#
|
||||
@@ -78,27 +99,20 @@
|
||||
# Note that `host' in this case is GCC's `target'. Target libraries are
|
||||
# configured for a particular host.
|
||||
|
||||
if [ -n "${ac_configure_args}" ]; then
|
||||
Makefile=${ac_file-Makefile}
|
||||
ml_config_shell=${CONFIG_SHELL-/bin/sh}
|
||||
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
|
||||
Makefile=${ac_file-Makefile}
|
||||
ml_config_shell=${CONFIG_SHELL-/bin/sh}
|
||||
ml_realsrcdir=${srcdir}
|
||||
|
||||
# Scan all the arguments and set all the ones we need.
|
||||
|
||||
ml_verbose=--verbose
|
||||
for option in ${ml_arguments}
|
||||
for option in ${ac_configure_args}
|
||||
do
|
||||
# strip single quotes surrounding individual options
|
||||
case $option in
|
||||
\'*\') eval option=$option ;;
|
||||
esac
|
||||
|
||||
case $option in
|
||||
--*) ;;
|
||||
-*) option=-$option ;;
|
||||
@@ -123,7 +137,7 @@ do
|
||||
enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
|
||||
eval $enableopt="$optarg"
|
||||
;;
|
||||
--norecursion | --no*)
|
||||
--norecursion | --no-recursion)
|
||||
ml_norecursion=yes
|
||||
;;
|
||||
--silent | --sil* | --quiet | --q*)
|
||||
@@ -392,6 +406,28 @@ mips*-*-*)
|
||||
esac
|
||||
;;
|
||||
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 ]
|
||||
then
|
||||
old_multidirs="${multidirs}"
|
||||
@@ -458,17 +494,6 @@ powerpc*-*-* | rs6000*-*-*)
|
||||
esac
|
||||
done
|
||||
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*-*-*)
|
||||
case " $multidirs " in
|
||||
@@ -505,14 +530,16 @@ multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ]
|
||||
|
||||
cat > Multi.tem <<\EOF
|
||||
|
||||
PWD_COMMAND=$${PWDCMD-pwd}
|
||||
|
||||
# FIXME: There should be an @-sign in front of the `if'.
|
||||
# Leave out until this is tested a bit more.
|
||||
multi-do:
|
||||
if [ -z "$(MULTIDIRS)" ]; then \
|
||||
true; \
|
||||
else \
|
||||
rootpre=`pwd`/; export rootpre; \
|
||||
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
|
||||
rootpre=`${PWD_COMMAND}`/; export rootpre; \
|
||||
srcrootpre=`cd $(srcdir); ${PWD_COMMAND}`/; export srcrootpre; \
|
||||
lib=`echo $${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \
|
||||
compiler="$(CC)"; \
|
||||
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'`; \
|
||||
if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
|
||||
CFLAGS="$(CFLAGS) $${flags}" \
|
||||
FCFLAGS="$(FCFLAGS) $${flags}" \
|
||||
FFLAGS="$(FFLAGS) $${flags}" \
|
||||
ADAFLAGS="$(ADAFLAGS) $${flags}" \
|
||||
prefix="$(prefix)" \
|
||||
exec_prefix="$(exec_prefix)" \
|
||||
GCJFLAGS="$(GCJFLAGS) $${flags}" \
|
||||
@@ -531,6 +561,12 @@ multi-do:
|
||||
LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
|
||||
LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
|
||||
LDFLAGS="$(LDFLAGS) $${flags}" \
|
||||
MULTIFLAGS="$${flags}" \
|
||||
DESTDIR="$(DESTDIR)" \
|
||||
INSTALL="$(INSTALL)" \
|
||||
INSTALL_DATA="$(INSTALL_DATA)" \
|
||||
INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \
|
||||
INSTALL_SCRIPT="$(INSTALL_SCRIPT)" \
|
||||
$(DO)); then \
|
||||
true; \
|
||||
else \
|
||||
@@ -548,7 +584,7 @@ multi-clean:
|
||||
if [ -z "$(MULTIDIRS)" ]; then \
|
||||
true; \
|
||||
else \
|
||||
lib=`pwd | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
|
||||
lib=`${PWD_COMMAND} | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
|
||||
for dir in Makefile $(MULTIDIRS); do \
|
||||
if [ -f ../$${dir}/$${lib}/Makefile ]; then \
|
||||
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
|
||||
echo "Running configure in multilib subdirs ${multidirs}"
|
||||
echo "pwd: `pwd`"
|
||||
echo "pwd: `${PWDCMD-pwd}`"
|
||||
fi
|
||||
|
||||
ml_origdir=`pwd`
|
||||
ml_origdir=`${PWDCMD-pwd}`
|
||||
ml_libdir=`echo $ml_origdir | sed -e 's,^.*/,,'`
|
||||
# cd to top-level-build-dir/${with_target_subdir}
|
||||
cd ..
|
||||
@@ -667,7 +703,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
|
||||
|
||||
if [ "${ml_verbose}" = --verbose ]; then
|
||||
echo "Running configure in multilib subdir ${ml_dir}"
|
||||
echo "pwd: `pwd`"
|
||||
echo "pwd: `${PWDCMD-pwd}`"
|
||||
fi
|
||||
|
||||
if [ -d ${ml_dir} ]; then true; else
|
||||
@@ -695,7 +731,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
|
||||
|
||||
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
|
||||
ml_unsubdir="../"
|
||||
else
|
||||
@@ -734,11 +770,11 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
|
||||
esac
|
||||
|
||||
# FIXME: POPDIR=${PWD=`pwd`} doesn't work here.
|
||||
ML_POPDIR=`pwd`
|
||||
ML_POPDIR=`${PWDCMD-pwd}`
|
||||
cd ${ml_dir}/${ml_libdir}
|
||||
|
||||
if [ -f ${ml_newsrcdir}/configure ]; then
|
||||
ml_recprog="${ml_newsrcdir}/configure --cache-file=../config.cache"
|
||||
ml_recprog="${ml_newsrcdir}/configure"
|
||||
fi
|
||||
|
||||
# find compiler flag corresponding to ${ml_dir}
|
||||
@@ -749,12 +785,14 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
|
||||
break
|
||||
fi
|
||||
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
|
||||
CC_=$CC' '
|
||||
CXX_=$CXX' '
|
||||
F77_=$F77' '
|
||||
GCJ_=$GCJ' '
|
||||
GFORTRAN_=$GFORTRAN' '
|
||||
else
|
||||
# Create a regular expression that matches any string as long
|
||||
# as ML_POPDIR.
|
||||
@@ -783,6 +821,18 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
|
||||
esac
|
||||
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_=
|
||||
for arg in ${GCJ}; do
|
||||
case $arg in
|
||||
@@ -795,6 +845,18 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
|
||||
esac
|
||||
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
|
||||
LD_LIBRARY_PATH_=
|
||||
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} \
|
||||
--with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
|
||||
${ml_arguments} ${ml_srcdiroption} ; then
|
||||
${ac_configure_args} ${ml_srcdiroption} ; then
|
||||
true
|
||||
else
|
||||
exit 1
|
||||
|
||||
85
libffi/config.guess
vendored
85
libffi/config.guess
vendored
@@ -1,9 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# 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
|
||||
# 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 "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
||||
: ${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) ; } ||
|
||||
{ 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 ; } ;
|
||||
@@ -160,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
arm*) machine=arm-unknown ;;
|
||||
sh3el) machine=shl-unknown ;;
|
||||
sh3eb) machine=sh-unknown ;;
|
||||
sh5el) machine=sh5le-unknown ;;
|
||||
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
|
||||
esac
|
||||
# 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:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:SolidBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
macppc:MirBSD:*:*)
|
||||
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
|
||||
echo powerpc-unknown-mirbsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:MirBSD:*:*)
|
||||
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.*:*)
|
||||
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit ;;
|
||||
i86pc:SunOS:5.*:*)
|
||||
i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*)
|
||||
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit ;;
|
||||
sun4*:SunOS:6*:*)
|
||||
@@ -764,12 +769,19 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*: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 ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
exit ;;
|
||||
i*:MINGW*:*)
|
||||
*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit ;;
|
||||
i*:windows32*:*)
|
||||
@@ -779,9 +791,15 @@ EOF
|
||||
i*:PW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit ;;
|
||||
x86:Interix*:[34]*)
|
||||
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
|
||||
exit ;;
|
||||
*:Interix*:[3456]*)
|
||||
case ${UNAME_MACHINE} in
|
||||
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:*)
|
||||
echo i${UNAME_MACHINE}-pc-mks
|
||||
exit ;;
|
||||
@@ -794,7 +812,7 @@ EOF
|
||||
i*:UWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-uwin
|
||||
exit ;;
|
||||
amd64:CYGWIN*:*:*)
|
||||
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
|
||||
echo x86_64-unknown-cygwin
|
||||
exit ;;
|
||||
p*:CYGWIN*:*)
|
||||
@@ -817,6 +835,9 @@ EOF
|
||||
arm*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
avr32*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
cris:Linux:*:*)
|
||||
echo cris-axis-linux-gnu
|
||||
exit ;;
|
||||
@@ -851,7 +872,11 @@ EOF
|
||||
#endif
|
||||
#endif
|
||||
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; }
|
||||
;;
|
||||
mips64:Linux:*:*)
|
||||
@@ -870,9 +895,16 @@ EOF
|
||||
#endif
|
||||
#endif
|
||||
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; }
|
||||
;;
|
||||
or32:Linux:*:*)
|
||||
echo or32-unknown-linux-gnu
|
||||
exit ;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-unknown-linux-gnu
|
||||
exit ;;
|
||||
@@ -916,9 +948,15 @@ EOF
|
||||
sparc:Linux:*:* | sparc64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
vax:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-dec-linux-gnu
|
||||
exit ;;
|
||||
x86_64:Linux:*:*)
|
||||
echo x86_64-unknown-linux-gnu
|
||||
exit ;;
|
||||
xtensa:Linux:*:*)
|
||||
echo xtensa-unknown-linux-gnu
|
||||
exit ;;
|
||||
i*86:Linux:*:*)
|
||||
# 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
|
||||
@@ -961,7 +999,7 @@ EOF
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
#else
|
||||
#ifdef __INTEL_COMPILER
|
||||
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
LIBC=gnu
|
||||
#else
|
||||
LIBC=gnuaout
|
||||
@@ -971,7 +1009,11 @@ EOF
|
||||
LIBC=dietlibc
|
||||
#endif
|
||||
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 && {
|
||||
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
||||
exit
|
||||
@@ -1173,6 +1215,15 @@ EOF
|
||||
SX-6:SUPER-UX:*:*)
|
||||
echo sx6-nec-superux${UNAME_RELEASE}
|
||||
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:*:*)
|
||||
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
||||
exit ;;
|
||||
@@ -1182,7 +1233,6 @@ EOF
|
||||
*:Darwin:*:*)
|
||||
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||
case $UNAME_PROCESSOR in
|
||||
*86) UNAME_PROCESSOR=i686 ;;
|
||||
unknown) UNAME_PROCESSOR=powerpc ;;
|
||||
esac
|
||||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||
@@ -1261,6 +1311,9 @@ EOF
|
||||
i*86:skyos:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
|
||||
exit ;;
|
||||
i*86:rdos:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-rdos
|
||||
exit ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
|
||||
113
libffi/config.sub
vendored
113
libffi/config.sub
vendored
@@ -1,9 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# 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.
|
||||
# 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.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
|
||||
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
|
||||
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
@@ -171,6 +173,10 @@ case $os in
|
||||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
-sco6)
|
||||
os=-sco5v6
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco5)
|
||||
os=-sco3.2v5
|
||||
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.
|
||||
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*)
|
||||
os=-sco3.2v2
|
||||
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] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| 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 \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| fr30 | frv \
|
||||
| fido | fr30 | frv \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| 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 \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
@@ -257,28 +268,27 @@ case $basic_machine in
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| ms1 \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nios | nios2 \
|
||||
| ns16k | ns32k \
|
||||
| or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| 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 \
|
||||
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b \
|
||||
| strongarm \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
| spu | strongarm \
|
||||
| tahoe | thumb | tic4x | tic80 | tron \
|
||||
| v850 | v850e \
|
||||
| we32k \
|
||||
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| z8k)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m32c)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12)
|
||||
# Motorola 68HC11/12.
|
||||
basic_machine=$basic_machine-unknown
|
||||
@@ -286,6 +296,9 @@ case $basic_machine in
|
||||
;;
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
|
||||
;;
|
||||
ms1)
|
||||
basic_machine=mt-unknown
|
||||
;;
|
||||
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
@@ -305,18 +318,18 @@ case $basic_machine in
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* \
|
||||
| avr-* | avr32-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
||||
| clipper-* | craynv-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
|
||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| m32r-* | m32rle-* \
|
||||
| m32c-* | m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
@@ -336,31 +349,30 @@ case $basic_machine in
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| mmix-* \
|
||||
| ms1-* \
|
||||
| mt-* \
|
||||
| msp430-* \
|
||||
| nios-* | nios2-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| 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-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tron-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| xstormy16-* | xtensa-* \
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
;;
|
||||
m32c-*)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
386bsd)
|
||||
@@ -671,6 +683,10 @@ case $basic_machine in
|
||||
basic_machine=i386-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
mingw32ce)
|
||||
basic_machine=arm-unknown
|
||||
os=-mingw32ce
|
||||
;;
|
||||
miniframe)
|
||||
basic_machine=m68000-convergent
|
||||
;;
|
||||
@@ -696,6 +712,9 @@ case $basic_machine in
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
;;
|
||||
ms1-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||
;;
|
||||
mvs)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
@@ -803,6 +822,12 @@ case $basic_machine in
|
||||
pc532 | 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)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
@@ -859,6 +884,10 @@ case $basic_machine in
|
||||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rdos)
|
||||
basic_machine=i386-pc
|
||||
os=-rdos
|
||||
;;
|
||||
rom68k)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
@@ -885,6 +914,10 @@ case $basic_machine in
|
||||
sb1el)
|
||||
basic_machine=mipsisa64sb1el-unknown
|
||||
;;
|
||||
sde)
|
||||
basic_machine=mipsisa32-sde
|
||||
os=-elf
|
||||
;;
|
||||
sei)
|
||||
basic_machine=mips-sei
|
||||
os=-seiux
|
||||
@@ -896,6 +929,9 @@ case $basic_machine in
|
||||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sh5el)
|
||||
basic_machine=sh5le-unknown
|
||||
;;
|
||||
sh64)
|
||||
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)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b)
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
@@ -1174,21 +1210,23 @@ case $os in
|
||||
| -aos* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -openbsd* | -solidbsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* \
|
||||
| -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* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
| -skyos* | -haiku*)
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
@@ -1340,6 +1378,12 @@ else
|
||||
# system, and we'll never get to this point.
|
||||
|
||||
case $basic_machine in
|
||||
score-*)
|
||||
os=-elf
|
||||
;;
|
||||
spu-*)
|
||||
os=-elf
|
||||
;;
|
||||
*-acorn)
|
||||
os=-riscix1.2
|
||||
;;
|
||||
@@ -1349,9 +1393,9 @@ case $basic_machine in
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
@@ -1377,6 +1421,9 @@ case $basic_machine in
|
||||
m68*-cisco)
|
||||
os=-aout
|
||||
;;
|
||||
mep-*)
|
||||
os=-elf
|
||||
;;
|
||||
mips*-cisco)
|
||||
os=-elf
|
||||
;;
|
||||
|
||||
10425
libffi/configure
vendored
10425
libffi/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -5,8 +5,6 @@ AC_PREREQ(2.59)
|
||||
AC_INIT([libffi], [2.1], [http://gcc.gnu.org/bugs.html])
|
||||
AC_CONFIG_HEADERS([fficonfig.h])
|
||||
|
||||
dnl LIBFFI LOCAL: no multilib here.
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
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-*-solaris*) 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-*-netbsdelf* | i*86-*-knetbsd*-gnu) 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-*-linux* | sparc-*-netbsdelf* | sparc-*-knetbsd*-gnu) 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;;
|
||||
ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
|
||||
m32r*-*-linux* ) TARGET=M32R; TARGETDIR=m32r;;
|
||||
@@ -80,13 +77,10 @@ cris-*-*) TARGET=LIBFFI_CRIS; TARGETDIR=cris;;
|
||||
s390-*-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-*-darwin*) TARGET=X86_DARWIN; TARGETDIR=x86;;
|
||||
sh-*-linux* | sh[[34]]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
|
||||
sh-*-rtems*) TARGET=SH; TARGETDIR=sh;;
|
||||
sh64-*-linux* | sh5*-*-linux*) TARGET=SH64; TARGETDIR=sh64;;
|
||||
hppa*-*-linux* | parisc*-*-linux*) TARGET=PA_LINUX; TARGETDIR=pa;;
|
||||
hppa*64-*-hpux*) TARGET=PA64_HPUX; TARGETDIR=pa;;
|
||||
hppa*-*-hpux*) TARGET=PA_HPUX; TARGETDIR=pa;;
|
||||
hppa-*-linux* | parisc-*-linux*) TARGET=PA; TARGETDIR=pa;;
|
||||
esac
|
||||
|
||||
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(X86, test x$TARGET = xX86)
|
||||
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(IA64, test x$TARGET = xIA64)
|
||||
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(SH, test x$TARGET = xSH)
|
||||
AM_CONDITIONAL(SH64, test x$TARGET = xSH64)
|
||||
AM_CONDITIONAL(PA_LINUX, test x$TARGET = xPA_LINUX)
|
||||
AM_CONDITIONAL(PA_HPUX, test x$TARGET = xPA_HPUX)
|
||||
AM_CONDITIONAL(PA64_HPUX, test x$TARGET = xPA64_HPUX)
|
||||
AM_CONDITIONAL(PA, test x$TARGET = xPA)
|
||||
|
||||
case x$TARGET in
|
||||
xMIPS*) TARGET=MIPS ;;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#! /bin/sh
|
||||
# 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
|
||||
# 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
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## 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=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
@@ -276,6 +290,46 @@ icc)
|
||||
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)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
@@ -288,13 +342,13 @@ tru64)
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# 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.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# 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
|
||||
# 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
|
||||
|
||||
@@ -112,15 +112,15 @@
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* The size of a `double', as computed by sizeof. */
|
||||
/* The size of `double', as computed by sizeof. */
|
||||
#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
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
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 lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
|
||||
@@ -5,5 +5,12 @@ AUTOMAKE_OPTIONS=foreign
|
||||
DISTCLEANFILES=ffitarget.h
|
||||
EXTRA_DIST=ffi.h.in ffi_common.h
|
||||
|
||||
## LIBFFI LOCAL: install in includedir.
|
||||
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
|
||||
|
||||
@@ -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@
|
||||
|
||||
# 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
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -14,15 +14,12 @@
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
@@ -38,14 +35,14 @@ build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = include
|
||||
DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/ffi.h.in
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/ffi.h.in $(toollibffi_HEADERS)
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/fficonfig.h
|
||||
CONFIG_CLEAN_FILES = ffi.h ffitarget.h
|
||||
SOURCES =
|
||||
@@ -56,29 +53,26 @@ am__vpath_adj = case $$p in \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(includedir)"
|
||||
includeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(include_HEADERS)
|
||||
am__installdirs = "$(DESTDIR)$(hackdir)" "$(DESTDIR)$(toollibffidir)"
|
||||
hackDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(hack_DATA)
|
||||
toollibffiHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(toollibffi_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALPHA_FALSE = @ALPHA_FALSE@
|
||||
ALPHA_TRUE = @ALPHA_TRUE@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
|
||||
AR = @AR@
|
||||
ARM_FALSE = @ARM_FALSE@
|
||||
ARM_TRUE = @ARM_TRUE@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASDEPMODE = @CCASDEPMODE@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
@@ -99,38 +93,23 @@ EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
FRV_FALSE = @FRV_FALSE@
|
||||
FRV_TRUE = @FRV_TRUE@
|
||||
GREP = @GREP@
|
||||
HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@
|
||||
IA64_FALSE = @IA64_FALSE@
|
||||
IA64_TRUE = @IA64_TRUE@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBFFI_CRIS_FALSE = @LIBFFI_CRIS_FALSE@
|
||||
LIBFFI_CRIS_TRUE = @LIBFFI_CRIS_TRUE@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
M32R_FALSE = @M32R_FALSE@
|
||||
M32R_TRUE = @M32R_TRUE@
|
||||
M68K_FALSE = @M68K_FALSE@
|
||||
M68K_TRUE = @M68K_TRUE@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MIPS_IRIX_FALSE = @MIPS_IRIX_FALSE@
|
||||
MIPS_IRIX_TRUE = @MIPS_IRIX_TRUE@
|
||||
MIPS_LINUX_FALSE = @MIPS_LINUX_FALSE@
|
||||
MIPS_LINUX_TRUE = @MIPS_LINUX_TRUE@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PA64_HPUX_FALSE = @PA64_HPUX_FALSE@
|
||||
PA64_HPUX_TRUE = @PA64_HPUX_TRUE@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
@@ -138,53 +117,21 @@ PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
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@
|
||||
S390_FALSE = @S390_FALSE@
|
||||
S390_TRUE = @S390_TRUE@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SH64_FALSE = @SH64_FALSE@
|
||||
SH64_TRUE = @SH64_TRUE@
|
||||
SHELL = @SHELL@
|
||||
SH_FALSE = @SH_FALSE@
|
||||
SH_TRUE = @SH_TRUE@
|
||||
SPARC_FALSE = @SPARC_FALSE@
|
||||
SPARC_TRUE = @SPARC_TRUE@
|
||||
STRIP = @STRIP@
|
||||
TARGET = @TARGET@
|
||||
TARGETDIR = @TARGETDIR@
|
||||
TESTSUBDIR_FALSE = @TESTSUBDIR_FALSE@
|
||||
TESTSUBDIR_TRUE = @TESTSUBDIR_TRUE@
|
||||
VERSION = @VERSION@
|
||||
X86_64_FALSE = @X86_64_FALSE@
|
||||
X86_64_TRUE = @X86_64_TRUE@
|
||||
X86_DARWIN_FALSE = @X86_DARWIN_FALSE@
|
||||
X86_DARWIN_TRUE = @X86_DARWIN_TRUE@
|
||||
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@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
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__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
@@ -196,26 +143,35 @@ build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
@@ -224,10 +180,18 @@ target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
toolexecdir = @toolexecdir@
|
||||
toolexeclibdir = @toolexeclibdir@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
DISTCLEANFILES = ffitarget.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
|
||||
|
||||
.SUFFIXES:
|
||||
@@ -268,26 +232,39 @@ mostlyclean-libtool:
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
install-hackDATA: $(hack_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
test -z "$(hackdir)" || $(MKDIR_P) "$(DESTDIR)$(hackdir)"
|
||||
@list='$(hack_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
$(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
|
||||
echo " $(hackDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(hackdir)/$$f'"; \
|
||||
$(hackDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(hackdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-includeHEADERS:
|
||||
uninstall-hackDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
@list='$(hack_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(includedir)/$$f"; \
|
||||
echo " rm -f '$(DESTDIR)$(hackdir)/$$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
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
@@ -339,22 +316,21 @@ distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
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; \
|
||||
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 \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
@@ -367,10 +343,10 @@ distdir: $(DISTFILES)
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(HEADERS)
|
||||
all-am: Makefile $(DATA) $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(includedir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
for dir in "$(DESTDIR)$(hackdir)" "$(DESTDIR)$(toollibffidir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
@@ -403,8 +379,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
@@ -416,14 +391,22 @@ info: 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-html: install-html-am
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
@@ -442,19 +425,23 @@ ps: 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 \
|
||||
clean-libtool ctags distclean distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am \
|
||||
install-includeHEADERS install-info install-info-am \
|
||||
install-man install-strip installcheck installcheck-am \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-hackDATA install-html install-html-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 \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||
ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS \
|
||||
uninstall-info-am
|
||||
ps ps-am tags uninstall uninstall-am uninstall-hackDATA \
|
||||
uninstall-toollibffiHEADERS
|
||||
|
||||
# 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.
|
||||
|
||||
@@ -112,24 +112,16 @@ extern "C" {
|
||||
#error "int size not supported"
|
||||
#endif
|
||||
|
||||
#define ffi_type_ulong ffi_type_uint64
|
||||
#define ffi_type_slong ffi_type_sint64
|
||||
#if LONG_MAX == 2147483647
|
||||
# if FFI_LONG_LONG_MAX != 9223372036854775807
|
||||
#error "no 64-bit data type supported"
|
||||
#error "no 64-bit data type supported"
|
||||
# endif
|
||||
#elif LONG_MAX != 9223372036854775807
|
||||
#error "long size not supported"
|
||||
#endif
|
||||
|
||||
#if LONG_MAX == 2147483647
|
||||
# define ffi_type_ulong ffi_type_uint32
|
||||
# define ffi_type_slong ffi_type_sint32
|
||||
#elif LONG_MAX == 9223372036854775807
|
||||
# define ffi_type_ulong ffi_type_uint64
|
||||
# define ffi_type_slong ffi_type_sint64
|
||||
#else
|
||||
#error "long size not supported"
|
||||
#endif
|
||||
|
||||
/* The closure code assumes that this works on pointers, i.e. a size_t */
|
||||
/* can hold a pointer. */
|
||||
|
||||
@@ -138,7 +130,7 @@ typedef struct _ffi_type
|
||||
size_t size;
|
||||
unsigned short alignment;
|
||||
unsigned short type;
|
||||
struct _ffi_type **elements;
|
||||
/*@null@*/ struct _ffi_type **elements;
|
||||
} ffi_type;
|
||||
|
||||
/* These are defined in types.c */
|
||||
@@ -168,8 +160,8 @@ typedef unsigned FFI_TYPE;
|
||||
typedef struct {
|
||||
ffi_abi abi;
|
||||
unsigned nargs;
|
||||
ffi_type **arg_types;
|
||||
ffi_type *rtype;
|
||||
/*@dependent@*/ ffi_type **arg_types;
|
||||
/*@dependent@*/ ffi_type *rtype;
|
||||
unsigned bytes;
|
||||
unsigned flags;
|
||||
#ifdef FFI_EXTRA_CIF_FIELDS
|
||||
@@ -195,10 +187,10 @@ typedef union {
|
||||
void* ptr;
|
||||
} ffi_raw;
|
||||
|
||||
void ffi_raw_call (ffi_cif *cif,
|
||||
void ffi_raw_call (/*@dependent@*/ ffi_cif *cif,
|
||||
void (*fn)(),
|
||||
void *rvalue,
|
||||
ffi_raw *avalue);
|
||||
/*@out@*/ void *rvalue,
|
||||
/*@dependent@*/ ffi_raw *avalue);
|
||||
|
||||
void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
|
||||
void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
|
||||
@@ -208,10 +200,10 @@ size_t ffi_raw_size (ffi_cif *cif);
|
||||
/* packing, even on 64-bit machines. I.e. on 64-bit machines */
|
||||
/* longs and doubles are followed by an empty 64-bit word. */
|
||||
|
||||
void ffi_java_raw_call (ffi_cif *cif,
|
||||
void (*fn)(),
|
||||
void *rvalue,
|
||||
ffi_raw *avalue);
|
||||
void ffi_java_raw_call (/*@dependent@*/ ffi_cif *cif,
|
||||
void (*fn)(),
|
||||
/*@out@*/ void *rvalue,
|
||||
/*@dependent@*/ ffi_raw *avalue);
|
||||
|
||||
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);
|
||||
@@ -271,16 +263,16 @@ ffi_prep_java_raw_closure (ffi_raw_closure*,
|
||||
|
||||
/* ---- Public interface definition -------------------------------------- */
|
||||
|
||||
ffi_status ffi_prep_cif(ffi_cif *cif,
|
||||
ffi_status ffi_prep_cif(/*@out@*/ /*@partial@*/ ffi_cif *cif,
|
||||
ffi_abi abi,
|
||||
unsigned int nargs,
|
||||
ffi_type *rtype,
|
||||
ffi_type **atypes);
|
||||
/*@dependent@*/ /*@out@*/ /*@partial@*/ ffi_type *rtype,
|
||||
/*@dependent@*/ ffi_type **atypes);
|
||||
|
||||
void ffi_call(ffi_cif *cif,
|
||||
void ffi_call(/*@dependent@*/ ffi_cif *cif,
|
||||
void (*fn)(),
|
||||
void *rvalue,
|
||||
void **avalue);
|
||||
/*@out@*/ void *rvalue,
|
||||
/*@dependent@*/ void **avalue);
|
||||
|
||||
/* Useful for eliminating compiler warnings */
|
||||
#define FFI_FN(f) ((void (*)())f)
|
||||
|
||||
@@ -46,9 +46,9 @@ char *alloca ();
|
||||
#endif
|
||||
|
||||
#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_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_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 */
|
||||
typedef struct
|
||||
{
|
||||
ffi_cif *cif;
|
||||
void *rvalue;
|
||||
void **avalue;
|
||||
/*@dependent@*/ ffi_cif *cif;
|
||||
/*@dependent@*/ void *rvalue;
|
||||
/*@dependent@*/ void **avalue;
|
||||
} extended_cif;
|
||||
|
||||
/* Terse sized type definitions. */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# 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
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
@@ -109,7 +109,7 @@ while test -n "$1"; do
|
||||
shift
|
||||
continue;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
--help) echo "$usage"; exit 0;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
@@ -134,7 +134,7 @@ while test -n "$1"; do
|
||||
shift
|
||||
continue;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
--version) echo "$0 $scriptversion"; exit 0;;
|
||||
|
||||
*) # When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
|
||||
2684
libffi/ltconfig
2684
libffi/ltconfig
File diff suppressed because it is too large
Load Diff
231
libffi/ltmain.sh
231
libffi/ltmain.sh
@@ -1,8 +1,8 @@
|
||||
# ltmain.sh - Provide generalized library-building support services.
|
||||
# NOTE: Changing this file will not affect anything until you rerun configure.
|
||||
#
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
|
||||
# 2007 Free Software Foundation, Inc.
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@@ -43,14 +43,22 @@ EXIT_FAILURE=1
|
||||
|
||||
PROGRAM=ltmain.sh
|
||||
PACKAGE=libtool
|
||||
VERSION=1.5.22
|
||||
TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
|
||||
VERSION=1.5.24
|
||||
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
|
||||
# commands through without removal of \ escapes.
|
||||
if test -n "${ZSH_VERSION+set}" ; then
|
||||
# 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
|
||||
|
||||
# Check that we have a working $echo.
|
||||
if test "X$1" = X--no-reexec; then
|
||||
@@ -105,12 +113,14 @@ esac
|
||||
# These must not be set unconditionally because not all systems understand
|
||||
# e.g. LANG=C (notably SCO).
|
||||
# We save the old values to restore during execute mode.
|
||||
if test "${LC_ALL+set}" = set; then
|
||||
save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
|
||||
fi
|
||||
if test "${LANG+set}" = set; then
|
||||
save_LANG="$LANG"; LANG=C; export LANG
|
||||
fi
|
||||
for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
|
||||
do
|
||||
eval "if test \"\${$lt_var+set}\" = set; then
|
||||
save_$lt_var=\$$lt_var
|
||||
$lt_var=C
|
||||
export $lt_var
|
||||
fi"
|
||||
done
|
||||
|
||||
# Make sure IFS has a sensible default
|
||||
lt_nl='
|
||||
@@ -136,6 +146,8 @@ duplicate_deps=no
|
||||
preserve_args=
|
||||
lo2o="s/\\.lo\$/.${objext}/"
|
||||
o2lo="s/\\.${objext}\$/.lo/"
|
||||
extracted_archives=
|
||||
extracted_serial=0
|
||||
|
||||
#####################################
|
||||
# Shell function definitions:
|
||||
@@ -196,7 +208,13 @@ func_win32_libid ()
|
||||
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
|
||||
$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
|
||||
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
|
||||
import*) win32_libid_type="x86 archive import";;
|
||||
*) win32_libid_type="x86 archive static";;
|
||||
@@ -327,7 +345,17 @@ func_extract_archives ()
|
||||
*) my_xabs=`pwd`"/$my_xlib" ;;
|
||||
esac
|
||||
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"
|
||||
$run ${rm}r "$my_xdir"
|
||||
@@ -454,11 +482,12 @@ do
|
||||
;;
|
||||
|
||||
--version)
|
||||
$echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
|
||||
$echo
|
||||
$echo "Copyright (C) 2005 Free Software Foundation, Inc."
|
||||
$echo "This is free software; see the source for copying conditions. There is NO"
|
||||
$echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
echo "\
|
||||
$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
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 $?
|
||||
;;
|
||||
|
||||
@@ -755,9 +784,10 @@ if test -z "$show_help"; then
|
||||
*.class) xform=class ;;
|
||||
*.cpp) xform=cpp ;;
|
||||
*.cxx) xform=cxx ;;
|
||||
*.f90) xform=f90 ;;
|
||||
*.[fF][09]?) xform=[fF][09]. ;;
|
||||
*.for) xform=for ;;
|
||||
*.java) xform=java ;;
|
||||
*.obj) xform=obj ;;
|
||||
esac
|
||||
|
||||
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
|
||||
@@ -1138,8 +1168,9 @@ EOF
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-all-static | -static)
|
||||
if test "X$arg" = "X-all-static"; then
|
||||
-all-static | -static | -static-libtool-libs)
|
||||
case $arg in
|
||||
-all-static)
|
||||
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
|
||||
fi
|
||||
@@ -1147,12 +1178,20 @@ EOF
|
||||
dlopen_self=$dlopen_self_static
|
||||
fi
|
||||
prefer_static_libs=yes
|
||||
else
|
||||
;;
|
||||
-static)
|
||||
if test -z "$pic_flag" && test -n "$link_static_flag"; then
|
||||
dlopen_self=$dlopen_self_static
|
||||
fi
|
||||
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_old_libs=yes
|
||||
break
|
||||
@@ -1600,7 +1639,7 @@ EOF
|
||||
continue
|
||||
;;
|
||||
|
||||
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
|
||||
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
|
||||
compiler_flags="$compiler_flags $arg"
|
||||
compile_command="$compile_command $arg"
|
||||
finalize_command="$finalize_command $arg"
|
||||
@@ -1620,10 +1659,11 @@ EOF
|
||||
# -m* pass through architecture-specific compiler args for GCC
|
||||
# -m*, -t[45]*, -txscale* pass through architecture-specific
|
||||
# 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
|
||||
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
|
||||
-t[45]*|-txscale*|@*)
|
||||
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
|
||||
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
|
||||
|
||||
# Unknown arguments in both finalize_command and compile_command need
|
||||
# to be aesthetically quoted because they are evaled later.
|
||||
@@ -1651,9 +1691,9 @@ EOF
|
||||
|
||||
-no-install)
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
|
||||
# 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: assuming \`-no-fast-install' instead" 1>&2
|
||||
fast_install=no
|
||||
@@ -1712,7 +1752,7 @@ EOF
|
||||
continue
|
||||
;;
|
||||
|
||||
-static)
|
||||
-static | -static-libtool-libs)
|
||||
# The effects of -static are defined in a previous loop.
|
||||
# We used to do the same as -all-static on platforms that
|
||||
# didn't have a PIC flag, but the assumption that the effects
|
||||
@@ -2094,7 +2134,7 @@ EOF
|
||||
lib=
|
||||
found=no
|
||||
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
|
||||
compile_deplibs="$deplib $compile_deplibs"
|
||||
finalize_deplibs="$deplib $finalize_deplibs"
|
||||
@@ -2490,7 +2530,9 @@ EOF
|
||||
|
||||
if test "$linkmode,$pass" = "prog,link"; then
|
||||
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
|
||||
if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
|
||||
# Make sure the rpath contains only unique directories.
|
||||
@@ -3186,7 +3228,7 @@ EOF
|
||||
# which has an extra 1 added just for fun
|
||||
#
|
||||
case $version_type in
|
||||
darwin|linux|osf|windows)
|
||||
darwin|linux|osf|windows|none)
|
||||
current=`expr $number_major + $number_minor`
|
||||
age="$number_minor"
|
||||
revision="$number_revision"
|
||||
@@ -3197,9 +3239,10 @@ EOF
|
||||
age="0"
|
||||
;;
|
||||
irix|nonstopux)
|
||||
current=`expr $number_major + $number_minor - 1`
|
||||
current=`expr $number_major + $number_minor`
|
||||
age="$number_minor"
|
||||
revision="$number_minor"
|
||||
lt_irix_increment=no
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -3258,7 +3301,8 @@ EOF
|
||||
versuffix="$major.$age.$revision"
|
||||
# Darwin ld doesn't like 0 for these options...
|
||||
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)
|
||||
@@ -3272,8 +3316,11 @@ EOF
|
||||
;;
|
||||
|
||||
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
|
||||
nonstopux) verstring_prefix=nonstopux ;;
|
||||
*) verstring_prefix=sgi ;;
|
||||
@@ -3410,11 +3457,11 @@ EOF
|
||||
fi
|
||||
|
||||
# Eliminate all temporary directories.
|
||||
for path in $notinst_path; do
|
||||
lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
|
||||
deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
|
||||
dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
|
||||
done
|
||||
#for path in $notinst_path; do
|
||||
# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
|
||||
# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
|
||||
# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
|
||||
#done
|
||||
|
||||
if test -n "$xrpath"; then
|
||||
# If the user specified any rpath flags, then add them.
|
||||
@@ -3515,13 +3562,12 @@ EOF
|
||||
int main() { return 0; }
|
||||
EOF
|
||||
$rm conftest
|
||||
$LTCC $LTCFLAGS -o conftest conftest.c $deplibs
|
||||
if test "$?" -eq 0 ; then
|
||||
if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
|
||||
ldd_output=`ldd conftest`
|
||||
for i in $deplibs; do
|
||||
name=`expr $i : '-l\(.*\)'`
|
||||
# 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
|
||||
case " $predeps $postdeps " in
|
||||
*" $i "*)
|
||||
@@ -3560,9 +3606,7 @@ EOF
|
||||
# If $name is empty we are operating on a -L argument.
|
||||
if test "$name" != "" && test "$name" != "0"; then
|
||||
$rm conftest
|
||||
$LTCC $LTCFLAGS -o conftest conftest.c $i
|
||||
# Did it work?
|
||||
if test "$?" -eq 0 ; then
|
||||
if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
|
||||
ldd_output=`ldd conftest`
|
||||
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
|
||||
case " $predeps $postdeps " in
|
||||
@@ -3594,7 +3638,7 @@ EOF
|
||||
droppeddeps=yes
|
||||
$echo
|
||||
$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 "*** functional. Installing it before continuing would be even better."
|
||||
fi
|
||||
@@ -3880,7 +3924,10 @@ EOF
|
||||
test -n "$hardcode_libdirs"; then
|
||||
libdir="$hardcode_libdirs"
|
||||
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
|
||||
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
|
||||
fi
|
||||
@@ -4239,12 +4286,14 @@ EOF
|
||||
reload_conv_objs=
|
||||
gentop=
|
||||
# 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=
|
||||
|
||||
if test -n "$convenience"; 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
|
||||
gentop="$output_objdir/${obj}x"
|
||||
generated="$generated $gentop"
|
||||
@@ -4692,16 +4741,16 @@ static const void *lt_preloaded_setup() {
|
||||
case $host in
|
||||
*cygwin* | *mingw* )
|
||||
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}%"`
|
||||
finalize_command=`$echo "X$finalize_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" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
|
||||
else
|
||||
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
|
||||
finalize_command=`$echo "X$finalize_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" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
|
||||
fi
|
||||
;;
|
||||
* )
|
||||
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
|
||||
finalize_command=`$echo "X$finalize_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" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -4716,13 +4765,13 @@ static const void *lt_preloaded_setup() {
|
||||
# really was required.
|
||||
|
||||
# Nullify the symbol file.
|
||||
compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
|
||||
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
|
||||
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
|
||||
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
|
||||
fi
|
||||
|
||||
if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
|
||||
# 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"
|
||||
|
||||
# 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
|
||||
link_command="$finalize_var$compile_command$finalize_rpath"
|
||||
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
|
||||
# fast_install is set to needless
|
||||
relink_command=
|
||||
@@ -4846,7 +4895,7 @@ static const void *lt_preloaded_setup() {
|
||||
fi
|
||||
done
|
||||
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
|
||||
|
||||
# Quote $echo for shipping.
|
||||
@@ -5253,6 +5302,20 @@ EOF
|
||||
Xsed='${SED} -e 1s/^X//'
|
||||
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
|
||||
# if CDPATH is set.
|
||||
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
|
||||
@@ -5395,7 +5458,7 @@ else
|
||||
;;
|
||||
esac
|
||||
$echo >> $output "\
|
||||
\$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
|
||||
\$echo \"\$0: cannot exec \$program \$*\"
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
else
|
||||
@@ -5581,7 +5644,7 @@ fi\
|
||||
done
|
||||
# Quote the link command for shipping.
|
||||
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
|
||||
relink_command=
|
||||
fi
|
||||
@@ -5926,9 +5989,9 @@ relink_command=\"$relink_command\""
|
||||
|
||||
if test -n "$inst_prefix_dir"; then
|
||||
# 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
|
||||
relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
|
||||
relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
|
||||
fi
|
||||
|
||||
$echo "$modename: warning: relinking \`$file'" 1>&2
|
||||
@@ -6137,7 +6200,7 @@ relink_command=\"$relink_command\""
|
||||
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
|
||||
outputname="$tmpdir/$file"
|
||||
# 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"
|
||||
if $run eval "$relink_command"; then :
|
||||
@@ -6348,8 +6411,10 @@ relink_command=\"$relink_command\""
|
||||
if test -f "$dir/$objdir/$dlname"; then
|
||||
dir="$dir/$objdir"
|
||||
else
|
||||
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
|
||||
exit $EXIT_FAILURE
|
||||
if test ! -f "$dir/$dlname"; then
|
||||
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
@@ -6413,12 +6478,12 @@ relink_command=\"$relink_command\""
|
||||
fi
|
||||
|
||||
# Restore saved environment variables
|
||||
if test "${save_LC_ALL+set}" = set; then
|
||||
LC_ALL="$save_LC_ALL"; export LC_ALL
|
||||
fi
|
||||
if test "${save_LANG+set}" = set; then
|
||||
LANG="$save_LANG"; export LANG
|
||||
fi
|
||||
for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
|
||||
do
|
||||
eval "if test \"\${save_$lt_var+set}\" = set; then
|
||||
$lt_var=\$save_$lt_var; export $lt_var
|
||||
fi"
|
||||
done
|
||||
|
||||
# Now prepare to actually exec the command.
|
||||
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
|
||||
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
|
||||
-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
|
||||
try to export only the symbols matching REGEX
|
||||
try to export only the symbols matching REGEX
|
||||
-LLIBDIR search LIBDIR for required installed libraries
|
||||
-lNAME OUTPUT-FILE requires the installed library libNAME
|
||||
-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
|
||||
-rpath LIBDIR the created library will eventually be installed in LIBDIR
|
||||
-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]]
|
||||
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.
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# 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.
|
||||
# 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
|
||||
# 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.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# 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]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
exit 0
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
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,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
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'`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
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
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
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
|
||||
;;
|
||||
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
/* ffi_prep_args is called by the assembly routine once stack space
|
||||
has been allocated for the function's arguments */
|
||||
|
||||
/*@-exportheader@*/
|
||||
void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
/*@=exportheader@*/
|
||||
{
|
||||
register unsigned int i;
|
||||
register void **p_argv;
|
||||
@@ -134,10 +136,20 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
return FFI_OK;
|
||||
}
|
||||
|
||||
extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *,
|
||||
unsigned, unsigned, unsigned *, void (*fn)());
|
||||
/*@-declundef@*/
|
||||
/*@-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;
|
||||
|
||||
@@ -150,7 +162,9 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
|
||||
if ((rvalue == NULL) &&
|
||||
(cif->rtype->type == FFI_TYPE_STRUCT))
|
||||
{
|
||||
/*@-sysunrecog@*/
|
||||
ecif.rvalue = alloca(cif->rtype->size);
|
||||
/*@=sysunrecog@*/
|
||||
}
|
||||
else
|
||||
ecif.rvalue = rvalue;
|
||||
@@ -159,9 +173,10 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
|
||||
switch (cif->abi)
|
||||
{
|
||||
case FFI_SYSV:
|
||||
ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue,
|
||||
fn);
|
||||
|
||||
/*@-usedef@*/
|
||||
ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes,
|
||||
cif->flags, ecif.rvalue, fn);
|
||||
/*@=usedef@*/
|
||||
break;
|
||||
default:
|
||||
FFI_ASSERT(0);
|
||||
|
||||
@@ -50,9 +50,10 @@ void ffi_type_test(ffi_type *a, char *file, int 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_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_STRUCT || a->elements != NULL, file, line);
|
||||
|
||||
/*@=usedef@*/
|
||||
}
|
||||
|
||||
@@ -69,19 +69,24 @@ endian_adjust (void *addr, size_t len)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* 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. */
|
||||
/* Store VALUE to ADDR in the current cpu implementation's fp spill format. */
|
||||
|
||||
#define stf_spill(addr, value) \
|
||||
static inline void
|
||||
stf_spill(fpreg *addr, __float80 value)
|
||||
{
|
||||
asm ("stf.spill %0 = %1%P0" : "=m" (*addr) : "f"(value));
|
||||
}
|
||||
|
||||
/* 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) \
|
||||
asm ("ldf.fill %0 = %1%P1" : "=f"(result) : "m"(*addr));
|
||||
static inline __float80
|
||||
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
|
||||
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
|
||||
the FFI_IA64_TYPE_HFA_* values. */
|
||||
|
||||
static void
|
||||
hfa_type_load (fpreg *fpaddr, int type, void *addr)
|
||||
static __float80
|
||||
hfa_type_load (int type, void *addr)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case FFI_IA64_TYPE_HFA_FLOAT:
|
||||
stf_spill (fpaddr, *(float *) addr);
|
||||
return;
|
||||
return *(float *) addr;
|
||||
case FFI_IA64_TYPE_HFA_DOUBLE:
|
||||
stf_spill (fpaddr, *(double *) addr);
|
||||
return;
|
||||
return *(double *) addr;
|
||||
case FFI_IA64_TYPE_HFA_LDOUBLE:
|
||||
stf_spill (fpaddr, *(__float80 *) addr);
|
||||
return;
|
||||
return *(__float80 *) addr;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
@@ -128,31 +130,19 @@ hfa_type_load (fpreg *fpaddr, int type, void *addr)
|
||||
the FFI_IA64_TYPE_HFA_* values. */
|
||||
|
||||
static void
|
||||
hfa_type_store (int type, void *addr, fpreg *fpaddr)
|
||||
hfa_type_store (int type, void *addr, __float80 value)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case FFI_IA64_TYPE_HFA_FLOAT:
|
||||
{
|
||||
float result;
|
||||
ldf_fill (result, fpaddr);
|
||||
*(float *) addr = result;
|
||||
break;
|
||||
}
|
||||
*(float *) addr = value;
|
||||
break;
|
||||
case FFI_IA64_TYPE_HFA_DOUBLE:
|
||||
{
|
||||
double result;
|
||||
ldf_fill (result, fpaddr);
|
||||
*(double *) addr = result;
|
||||
break;
|
||||
}
|
||||
*(double *) addr = value;
|
||||
break;
|
||||
case FFI_IA64_TYPE_HFA_LDOUBLE:
|
||||
{
|
||||
__float80 result;
|
||||
ldf_fill (result, fpaddr);
|
||||
*(__float80 *) addr = result;
|
||||
break;
|
||||
}
|
||||
*(__float80 *) addr = value;
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
@@ -361,8 +351,8 @@ ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
|
||||
&& offset < size
|
||||
&& gp_offset < 8 * 8)
|
||||
{
|
||||
hfa_type_load (&stack->fp_regs[fpcount], hfa_type,
|
||||
avalue[i] + offset);
|
||||
stf_spill (&stack->fp_regs[fpcount],
|
||||
hfa_type_load (hfa_type, avalue[i] + offset));
|
||||
offset += hfa_size;
|
||||
gp_offset += hfa_size;
|
||||
fpcount += 1;
|
||||
@@ -485,11 +475,9 @@ ffi_closure_unix_inner (ffi_closure *closure, struct ia64_args *stack,
|
||||
case FFI_TYPE_FLOAT:
|
||||
if (gpcount < 8 && fpcount < 8)
|
||||
{
|
||||
fpreg *addr = &stack->fp_regs[fpcount++];
|
||||
float result;
|
||||
void *addr = &stack->fp_regs[fpcount++];
|
||||
avalue[i] = addr;
|
||||
ldf_fill (result, addr);
|
||||
*(float *)addr = result;
|
||||
*(float *)addr = ldf_fill (addr);
|
||||
}
|
||||
else
|
||||
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:
|
||||
if (gpcount < 8 && fpcount < 8)
|
||||
{
|
||||
fpreg *addr = &stack->fp_regs[fpcount++];
|
||||
double result;
|
||||
void *addr = &stack->fp_regs[fpcount++];
|
||||
avalue[i] = addr;
|
||||
ldf_fill (result, addr);
|
||||
*(double *)addr = result;
|
||||
*(double *)addr = ldf_fill (addr);
|
||||
}
|
||||
else
|
||||
avalue[i] = &stack->gp_regs[gpcount];
|
||||
@@ -515,11 +501,9 @@ ffi_closure_unix_inner (ffi_closure *closure, struct ia64_args *stack,
|
||||
gpcount++;
|
||||
if (LDBL_MANT_DIG == 64 && gpcount < 8 && fpcount < 8)
|
||||
{
|
||||
fpreg *addr = &stack->fp_regs[fpcount++];
|
||||
__float80 result;
|
||||
void *addr = &stack->fp_regs[fpcount++];
|
||||
avalue[i] = addr;
|
||||
ldf_fill (result, addr);
|
||||
*(__float80 *)addr = result;
|
||||
*(__float80 *)addr = ldf_fill (addr);
|
||||
}
|
||||
else
|
||||
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)
|
||||
{
|
||||
hfa_type_store (hfa_type, addr + offset,
|
||||
&stack->fp_regs[fpcount]);
|
||||
ldf_fill (&stack->fp_regs[fpcount]));
|
||||
offset += hfa_size;
|
||||
gp_offset += hfa_size;
|
||||
fpcount += 1;
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
/* 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 */
|
||||
/* 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_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
|
||||
* 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*));
|
||||
ffi_java_raw_to_ptrarray (cif, raw, avalue);
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
/* ffi_prep_args is called by the assembly routine once stack
|
||||
space has been allocated for the function's arguments. */
|
||||
|
||||
/*@-exportheader@*/
|
||||
void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
/*@=exportheader@*/
|
||||
{
|
||||
unsigned int i;
|
||||
int tmp;
|
||||
@@ -171,10 +173,20 @@ ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
return FFI_OK;
|
||||
}
|
||||
|
||||
extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *,
|
||||
unsigned, unsigned, unsigned *, void (*fn)());
|
||||
/*@-declundef@*/
|
||||
/*@-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;
|
||||
|
||||
@@ -186,7 +198,9 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
|
||||
if ((rvalue == NULL) &&
|
||||
(cif->rtype->type == FFI_TYPE_STRUCT))
|
||||
{
|
||||
/*@-sysunrecog@*/
|
||||
ecif.rvalue = alloca (cif->rtype->size);
|
||||
/*@=sysunrecog@*/
|
||||
}
|
||||
else
|
||||
ecif.rvalue = rvalue;
|
||||
@@ -194,6 +208,7 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
|
||||
switch (cif->abi)
|
||||
{
|
||||
case FFI_SYSV:
|
||||
/*@-usedef@*/
|
||||
ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes,
|
||||
cif->flags, ecif.rvalue, fn);
|
||||
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;
|
||||
|
||||
default:
|
||||
|
||||
@@ -50,17 +50,17 @@ static void ffi_prep_args(char *stack,
|
||||
int bytes,
|
||||
int flags)
|
||||
{
|
||||
int i;
|
||||
void **p_argv;
|
||||
char *argp;
|
||||
ffi_type **p_arg;
|
||||
register int i;
|
||||
register void **p_argv;
|
||||
register char *argp;
|
||||
register ffi_type **p_arg;
|
||||
|
||||
#if _MIPS_SIM == _ABIN32
|
||||
/* If more than 8 double words are used, the remainder go
|
||||
on the stack. We reorder stuff on the stack here to
|
||||
support this easily. */
|
||||
if (bytes > 8 * sizeof(ffi_arg))
|
||||
argp = &stack[bytes - (8 * sizeof(ffi_arg))];
|
||||
if (bytes > 8 * FFI_SIZEOF_ARG)
|
||||
argp = &stack[bytes - (8 * FFI_SIZEOF_ARG)];
|
||||
else
|
||||
argp = stack;
|
||||
#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++)
|
||||
{
|
||||
size_t z;
|
||||
unsigned int a;
|
||||
unsigned short a;
|
||||
|
||||
/* Align if necessary. */
|
||||
/* Align if necessary */
|
||||
a = (*p_arg)->alignment;
|
||||
if (a < sizeof(ffi_arg))
|
||||
a = sizeof(ffi_arg);
|
||||
if (a < FFI_SIZEOF_ARG)
|
||||
a = FFI_SIZEOF_ARG;
|
||||
|
||||
if ((a - 1) & (unsigned int) argp)
|
||||
{
|
||||
argp = (char *) ALIGN(argp, a);
|
||||
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
|
||||
if ((a - 1) & (unsigned) argp) {
|
||||
argp = (char *) ALIGN(argp, a);
|
||||
FIX_ARGP;
|
||||
}
|
||||
p_argv++;
|
||||
argp += z;
|
||||
FIX_ARGP;
|
||||
|
||||
#if _MIPS_SIM == _ABIO32
|
||||
#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
|
||||
@@ -515,8 +524,8 @@ ffi_prep_closure (ffi_closure *closure,
|
||||
#endif /* FFI_MIPS_O32 */
|
||||
|
||||
tramp[0] = 0x3c190000 | (fn >> 16); /* lui $25,high(fn) */
|
||||
tramp[1] = 0x37390000 | (fn & 0xffff); /* ori $25,low(fn) */
|
||||
tramp[2] = 0x3c080000 | (ctx >> 16); /* lui $8,high(ctx) */
|
||||
tramp[1] = 0x3c080000 | (ctx >> 16); /* lui $8,high(ctx) */
|
||||
tramp[2] = 0x37390000 | (fn & 0xffff); /* ori $25,low(fn) */
|
||||
tramp[3] = 0x03200008; /* jr $25 */
|
||||
tramp[4] = 0x35080000 | (ctx & 0xffff); /* ori $8,low(ctx) */
|
||||
|
||||
@@ -549,18 +558,16 @@ ffi_prep_closure (ffi_closure *closure,
|
||||
*/
|
||||
int
|
||||
ffi_closure_mips_inner_O32 (ffi_closure *closure,
|
||||
void *rvalue, ffi_arg *ar,
|
||||
void *rvalue, unsigned long *ar,
|
||||
double *fpr)
|
||||
{
|
||||
ffi_cif *cif;
|
||||
void **avaluep;
|
||||
ffi_arg *avalue;
|
||||
void **avalue;
|
||||
ffi_type **arg_types;
|
||||
int i, avn, argn, seen_int;
|
||||
|
||||
cif = closure->cif;
|
||||
avalue = alloca (cif->nargs * sizeof (ffi_arg));
|
||||
avaluep = alloca (cif->nargs * sizeof (ffi_arg));
|
||||
avalue = alloca (cif->nargs * sizeof (void *));
|
||||
|
||||
seen_int = (cif->abi == FFI_O32_SOFT_FLOAT);
|
||||
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_DOUBLE))
|
||||
{
|
||||
#ifdef __MIPSEB__
|
||||
if (arg_types[i]->type == FFI_TYPE_FLOAT)
|
||||
avaluep[i] = ((char *) &fpr[i]) + sizeof (float);
|
||||
else
|
||||
#endif
|
||||
avaluep[i] = (char *) &fpr[i];
|
||||
avalue[i] = ((char *) &fpr[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (arg_types[i]->alignment == 8 && (argn & 0x1))
|
||||
argn++;
|
||||
switch (arg_types[i]->type)
|
||||
{
|
||||
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;
|
||||
}
|
||||
avalue[i] = ((char *) &ar[argn]);
|
||||
seen_int = 1;
|
||||
}
|
||||
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. */
|
||||
(closure->fun) (cif, rvalue, avaluep, closure->user_data);
|
||||
(closure->fun) (cif, rvalue, avalue, closure->user_data);
|
||||
|
||||
if (cif->abi == FFI_O32_SOFT_FLOAT)
|
||||
{
|
||||
|
||||
@@ -26,13 +26,17 @@
|
||||
#ifndef LIBFFI_TARGET_H
|
||||
#define LIBFFI_TARGET_H
|
||||
|
||||
#ifndef LIBFFI_ASM
|
||||
#include <sgidefs.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MIPS_SIM)
|
||||
-- something is very wrong --
|
||||
#else
|
||||
# if (_MIPS_SIM==_ABIN32 && defined(_ABIN32)) || (_MIPS_SIM==_ABI64 && defined(_ABI64))
|
||||
# define FFI_MIPS_N32
|
||||
# else
|
||||
# if (_MIPS_SIM==_ABIO32 && defined(_ABIO32))
|
||||
# if _MIPS_SIM==_ABIO32 && defined(_ABIO32)
|
||||
# define FFI_MIPS_O32
|
||||
# else
|
||||
-- this is an unsupported platform --
|
||||
|
||||
@@ -35,10 +35,7 @@
|
||||
#define bytes a2
|
||||
#define flags a3
|
||||
|
||||
#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)
|
||||
#define SIZEOF_FRAME ( 4 * FFI_SIZEOF_ARG + 2 * FFI_SIZEOF_ARG )
|
||||
|
||||
.abicalls
|
||||
.text
|
||||
@@ -48,42 +45,48 @@
|
||||
ffi_call_O32:
|
||||
$LFB0:
|
||||
# Prologue
|
||||
SUBU $sp, SIZEOF_FRAME # Frame size
|
||||
SUBU $sp, SIZEOF_FRAME # Frame size
|
||||
$LCFI0:
|
||||
REG_S $fp, FP_OFF($sp) # Save frame pointer
|
||||
REG_S $fp, SIZEOF_FRAME - 2*FFI_SIZEOF_ARG($sp) # Save frame pointer
|
||||
$LCFI1:
|
||||
REG_S ra, RA_OFF($sp) # Save return address
|
||||
REG_S ra, SIZEOF_FRAME - 1*FFI_SIZEOF_ARG($sp) # Save return address
|
||||
$LCFI2:
|
||||
move $fp, $sp
|
||||
|
||||
$LCFI3:
|
||||
move t9, callback # callback function pointer
|
||||
REG_S flags, A3_OFF($fp) # flags
|
||||
move t9, callback # callback function pointer
|
||||
REG_S flags, SIZEOF_FRAME + 3*FFI_SIZEOF_ARG($fp) # flags
|
||||
|
||||
# Allocate at least 4 words in the argstack
|
||||
move v0, bytes
|
||||
bge bytes, 4 * FFI_SIZEOF_ARG, bigger
|
||||
LI v0, 4 * FFI_SIZEOF_ARG
|
||||
blt bytes, v0, sixteen
|
||||
b sixteen
|
||||
|
||||
ADDU v0, bytes, 7 # make sure it is aligned
|
||||
and v0, -8 # to an 8 byte boundry
|
||||
bigger:
|
||||
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:
|
||||
SUBU $sp, v0 # move the stack pointer to reflect the
|
||||
SUBU $sp, $sp, v0 # move the stack pointer to reflect the
|
||||
# arg space
|
||||
|
||||
ADDU a0, $sp, 4 * FFI_SIZEOF_ARG
|
||||
ADDU a3, $fp, SIZEOF_FRAME + 3*FFI_SIZEOF_ARG
|
||||
|
||||
jalr t9
|
||||
|
||||
REG_L t0, A3_OFF($fp) # load the flags word
|
||||
SRL t2, t0, 4 # shift our arg info
|
||||
and t0, ((1<<4)-1) # mask out the return type
|
||||
REG_L t0, SIZEOF_FRAME + 3*FFI_SIZEOF_ARG($fp) # load the flags word
|
||||
add t2, t0, 0 # and copy it into t2
|
||||
|
||||
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
|
||||
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 a0, 0*FFI_SIZEOF_ARG($sp) # just go ahead and load the
|
||||
REG_L a1, 1*FFI_SIZEOF_ARG($sp) # four regs.
|
||||
REG_L a2, 2*FFI_SIZEOF_ARG($sp)
|
||||
REG_L a3, 3*FFI_SIZEOF_ARG($sp)
|
||||
b call_it
|
||||
@@ -173,9 +176,9 @@ noretval:
|
||||
# Epilogue
|
||||
epilogue:
|
||||
move $sp, $fp
|
||||
REG_L $fp, FP_OFF($sp) # Restore frame pointer
|
||||
REG_L ra, RA_OFF($sp) # Restore return address
|
||||
ADDU $sp, SIZEOF_FRAME # Fix stack pointer
|
||||
REG_L $fp, SIZEOF_FRAME - 2*FFI_SIZEOF_ARG($sp) # Restore frame pointer
|
||||
REG_L ra, SIZEOF_FRAME - 1*FFI_SIZEOF_ARG($sp) # Restore return address
|
||||
ADDU $sp, SIZEOF_FRAME # Fix stack pointer
|
||||
j ra
|
||||
|
||||
$LFE0:
|
||||
@@ -206,21 +209,7 @@ $LFE0:
|
||||
0 - Called function a0 save our sp, fp point here
|
||||
*/
|
||||
|
||||
#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)
|
||||
#define SIZEOF_FRAME2 ( 14 * FFI_SIZEOF_ARG )
|
||||
|
||||
.text
|
||||
.align 2
|
||||
@@ -229,28 +218,28 @@ $LFE0:
|
||||
ffi_closure_O32:
|
||||
$LFB1:
|
||||
# Prologue
|
||||
.frame $fp, SIZEOF_FRAME2, ra
|
||||
.frame $fp, SIZEOF_FRAME2, $31
|
||||
.set noreorder
|
||||
.cpload t9
|
||||
.cpload $25
|
||||
.set reorder
|
||||
SUBU $sp, SIZEOF_FRAME2
|
||||
.cprestore GP_OFF2
|
||||
.cprestore SIZEOF_FRAME2 - 4*FFI_SIZEOF_ARG
|
||||
$LCFI4:
|
||||
REG_S $16, S0_OFF2($sp) # Save s0
|
||||
REG_S $fp, FP_OFF2($sp) # Save frame pointer
|
||||
REG_S ra, RA_OFF2($sp) # Save return address
|
||||
REG_S $16, SIZEOF_FRAME2 - 3*FFI_SIZEOF_ARG($sp) # Save s0
|
||||
REG_S $fp, SIZEOF_FRAME2 - 2*FFI_SIZEOF_ARG($sp) # Save frame pointer
|
||||
REG_S ra, SIZEOF_FRAME2 - 1*FFI_SIZEOF_ARG($sp) # Save return address
|
||||
$LCFI6:
|
||||
move $fp, $sp
|
||||
|
||||
$LCFI7:
|
||||
# Store all possible argument registers. If there are more than
|
||||
# four arguments, then they are stored above where we put a3.
|
||||
REG_S a0, A0_OFF2($fp)
|
||||
REG_S a1, A1_OFF2($fp)
|
||||
REG_S a2, A2_OFF2($fp)
|
||||
REG_S a3, A3_OFF2($fp)
|
||||
# four arguments, then they should be stored above where we put $7.
|
||||
REG_S $4, SIZEOF_FRAME2 + 0*FFI_SIZEOF_ARG($fp)
|
||||
REG_S $5, SIZEOF_FRAME2 + 1*FFI_SIZEOF_ARG($fp)
|
||||
REG_S $6, SIZEOF_FRAME2 + 2*FFI_SIZEOF_ARG($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, 0($16) # abi is first member.
|
||||
|
||||
@@ -258,16 +247,16 @@ $LCFI7:
|
||||
bne $16, $13, 1f # Skip fp save if FFI_O32_SOFT_FLOAT
|
||||
|
||||
# Store all possible float/double registers.
|
||||
s.d $f12, FA_0_0_OFF2($fp)
|
||||
s.d $f14, FA_1_0_OFF2($fp)
|
||||
s.d $f12, SIZEOF_FRAME2 - 10*FFI_SIZEOF_ARG($fp)
|
||||
s.d $f14, SIZEOF_FRAME2 - 8*FFI_SIZEOF_ARG($fp)
|
||||
1:
|
||||
# Call ffi_closure_mips_inner_O32 to do the work.
|
||||
la t9, ffi_closure_mips_inner_O32
|
||||
move a0, $8 # Pointer to the ffi_closure
|
||||
addu a1, $fp, V0_OFF2
|
||||
addu a2, $fp, A0_OFF2
|
||||
addu a3, $fp, FA_0_0_OFF2
|
||||
jalr t9
|
||||
la $25, ffi_closure_mips_inner_O32
|
||||
move $4, $8 # Pointer to the ffi_closure
|
||||
addu $5, $fp, SIZEOF_FRAME2 - 6*FFI_SIZEOF_ARG
|
||||
addu $6, $fp, SIZEOF_FRAME2 + 0*FFI_SIZEOF_ARG
|
||||
addu $7, $fp, SIZEOF_FRAME2 - 10*FFI_SIZEOF_ARG
|
||||
jalr $31, $25
|
||||
|
||||
# Load the return value into the appropriate register.
|
||||
move $8, $2
|
||||
@@ -278,22 +267,28 @@ $LCFI7:
|
||||
bne $16, $13, 1f # Skip fp restore if FFI_O32_SOFT_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
|
||||
|
||||
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
|
||||
1:
|
||||
REG_L $3, V1_OFF2($fp)
|
||||
REG_L $2, V0_OFF2($fp)
|
||||
li $9, FFI_TYPE_SINT64
|
||||
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:
|
||||
# Epilogue
|
||||
move $sp, $fp
|
||||
REG_L $16, S0_OFF2($sp) # Restore s0
|
||||
REG_L $fp, FP_OFF2($sp) # Restore frame pointer
|
||||
REG_L ra, RA_OFF2($sp) # Restore return address
|
||||
REG_L $16, SIZEOF_FRAME2 - 3*FFI_SIZEOF_ARG($sp) # Restore s0
|
||||
REG_L $fp, SIZEOF_FRAME2 - 2*FFI_SIZEOF_ARG($sp) # Restore frame pointer
|
||||
REG_L ra, SIZEOF_FRAME2 - 1*FFI_SIZEOF_ARG($sp) # Restore return address
|
||||
ADDU $sp, SIZEOF_FRAME2
|
||||
j ra
|
||||
$LFE1:
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
ffi.c - (c) 2003-2004 Randolph Chung <tausq@debian.org>
|
||||
|
||||
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
|
||||
a copy of this software and associated documentation files (the
|
||||
@@ -31,19 +30,15 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#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 FIRST_ARG_SLOT 9
|
||||
#define DEBUG_LEVEL 0
|
||||
|
||||
#define fldw(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 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 fldw(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 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)
|
||||
|
||||
@@ -52,19 +47,16 @@ static inline int ffi_struct_type(ffi_type *t)
|
||||
size_t sz = t->size;
|
||||
|
||||
/* Small structure results are passed in registers,
|
||||
larger ones are passed by pointer. Note that
|
||||
small structures of size 2, 4 and 8 differ from
|
||||
the corresponding integer types in that they have
|
||||
different alignment requirements. */
|
||||
larger ones are passed by pointer. */
|
||||
|
||||
if (sz <= 1)
|
||||
return FFI_TYPE_UINT8;
|
||||
else if (sz == 2)
|
||||
return FFI_TYPE_SMALL_STRUCT2;
|
||||
return FFI_TYPE_UINT16;
|
||||
else if (sz == 3)
|
||||
return FFI_TYPE_SMALL_STRUCT3;
|
||||
else if (sz == 4)
|
||||
return FFI_TYPE_SMALL_STRUCT4;
|
||||
return FFI_TYPE_UINT32;
|
||||
else if (sz == 5)
|
||||
return FFI_TYPE_SMALL_STRUCT5;
|
||||
else if (sz == 6)
|
||||
@@ -72,7 +64,7 @@ static inline int ffi_struct_type(ffi_type *t)
|
||||
else if (sz == 7)
|
||||
return FFI_TYPE_SMALL_STRUCT7;
|
||||
else if (sz <= 8)
|
||||
return FFI_TYPE_SMALL_STRUCT8;
|
||||
return FFI_TYPE_UINT64;
|
||||
else
|
||||
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:
|
||||
|
||||
Offset
|
||||
[ Variable args ]
|
||||
[ Variable args ]
|
||||
SP = (4*(n+9)) arg word N
|
||||
...
|
||||
SP-52 arg word 4
|
||||
[ Fixed args ]
|
||||
[ Fixed args ]
|
||||
SP-48 arg word 3
|
||||
SP-44 arg word 2
|
||||
SP-40 arg word 1
|
||||
SP-36 arg word 0
|
||||
[ Frame marker ]
|
||||
[ Frame marker ]
|
||||
...
|
||||
SP-20 RP
|
||||
SP-4 previous SP
|
||||
|
||||
The first four argument words on the stack are reserved for use by
|
||||
the callee. Instead, the general and floating registers replace
|
||||
the first four argument slots. Non FP arguments are passed solely
|
||||
in the general registers. FP arguments are passed in both general
|
||||
and floating registers when using libffi.
|
||||
|
||||
Non-FP 32-bit args are passed in gr26, gr25, gr24 and gr23.
|
||||
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
|
||||
First 4 non-FP 32-bit args are passed in gr26, gr25, gr24 and gr23
|
||||
First 2 non-FP 64-bit args are passed in register pairs, starting
|
||||
on an even numbered register (i.e. r26/r25 and r24+r23)
|
||||
First 4 FP 32-bit arguments are passed in fr4L, fr5L, fr6L and fr7L
|
||||
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
|
||||
arguments need to be aligned to an 8-byte boundary
|
||||
|
||||
This means we can have holes either in the register allocation,
|
||||
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
|
||||
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 ffi_type **p_arg;
|
||||
register void **p_argv;
|
||||
unsigned int slot = FIRST_ARG_SLOT;
|
||||
unsigned int slot = FIRST_ARG_SLOT - 1;
|
||||
char *dest_cpy;
|
||||
size_t len;
|
||||
|
||||
debug(1, "%s: stack = %p, ecif = %p, bytes = %u\n", __FUNCTION__, stack,
|
||||
ecif, bytes);
|
||||
debug(1, "%s: stack = %p, ecif = %p, bytes = %u\n", __FUNCTION__, stack, ecif, bytes);
|
||||
|
||||
p_arg = ecif->cif->arg_types;
|
||||
p_argv = ecif->avalue;
|
||||
@@ -157,105 +130,116 @@ void ffi_prep_args_pa32(UINT32 *stack, extended_cif *ecif, unsigned bytes)
|
||||
switch (type)
|
||||
{
|
||||
case FFI_TYPE_SINT8:
|
||||
slot++;
|
||||
*(SINT32 *)(stack - slot) = *(SINT8 *)(*p_argv);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_UINT8:
|
||||
slot++;
|
||||
*(UINT32 *)(stack - slot) = *(UINT8 *)(*p_argv);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_SINT16:
|
||||
slot++;
|
||||
*(SINT32 *)(stack - slot) = *(SINT16 *)(*p_argv);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_UINT16:
|
||||
slot++;
|
||||
*(UINT32 *)(stack - slot) = *(UINT16 *)(*p_argv);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_UINT32:
|
||||
case FFI_TYPE_SINT32:
|
||||
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);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_UINT64:
|
||||
case FFI_TYPE_SINT64:
|
||||
/* Align slot for 64-bit type. */
|
||||
slot += (slot & 1) ? 1 : 2;
|
||||
*(UINT64 *)(stack - slot) = *(UINT64 *)(*p_argv);
|
||||
slot += 2;
|
||||
if (slot & 1)
|
||||
slot++;
|
||||
|
||||
*(UINT32 *)(stack - slot) = (*(UINT64 *)(*p_argv)) >> 32;
|
||||
*(UINT32 *)(stack - slot + 1) = (*(UINT64 *)(*p_argv)) & 0xffffffffUL;
|
||||
break;
|
||||
|
||||
case FFI_TYPE_FLOAT:
|
||||
/* First 4 args go in fr4L - fr7L. */
|
||||
debug(3, "Storing UINT32(float) in slot %u\n", slot);
|
||||
*(UINT32 *)(stack - slot) = *(UINT32 *)(*p_argv);
|
||||
/* First 4 args go in fr4L - fr7L */
|
||||
slot++;
|
||||
switch (slot - FIRST_ARG_SLOT)
|
||||
{
|
||||
/* First 4 args go in fr4L - fr7L. */
|
||||
case 0: fldw(stack - slot, fr4); break;
|
||||
case 1: fldw(stack - slot, fr5); break;
|
||||
case 2: fldw(stack - slot, fr6); break;
|
||||
case 3: fldw(stack - slot, fr7); break;
|
||||
case 0: fldw(*p_argv, fr4); break;
|
||||
case 1: fldw(*p_argv, fr5); break;
|
||||
case 2: fldw(*p_argv, fr6); break;
|
||||
case 3: fldw(*p_argv, 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:
|
||||
/* Align slot for 64-bit type. */
|
||||
slot += (slot & 1) ? 1 : 2;
|
||||
debug(3, "Storing UINT64(double) at slot %u\n", slot);
|
||||
*(UINT64 *)(stack - slot) = *(UINT64 *)(*p_argv);
|
||||
switch (slot - FIRST_ARG_SLOT)
|
||||
slot += 2;
|
||||
if (slot & 1)
|
||||
slot++;
|
||||
switch (slot - FIRST_ARG_SLOT + 1)
|
||||
{
|
||||
/* First 2 args go in fr5, fr7. */
|
||||
case 1: fldd(stack - slot, fr5); break;
|
||||
case 3: fldd(stack - slot, fr7); break;
|
||||
/* First 2 args go in fr5, fr7 */
|
||||
case 2: fldd(*p_argv, fr5); 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;
|
||||
|
||||
#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:
|
||||
|
||||
/* Structs smaller or equal than 4 bytes are passed in one
|
||||
register. Structs smaller or equal 8 bytes are passed in two
|
||||
registers. Larger structures are passed by pointer. */
|
||||
|
||||
len = (*p_arg)->size;
|
||||
if (len <= 4)
|
||||
if((*p_arg)->size <= 4)
|
||||
{
|
||||
dest_cpy = (char *)(stack - slot) + 4 - len;
|
||||
memcpy(dest_cpy, (char *)*p_argv, len);
|
||||
slot++;
|
||||
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;
|
||||
dest_cpy = (char *)(stack - slot) + 8 - len;
|
||||
memcpy(dest_cpy, (char *)*p_argv, len);
|
||||
slot += 2;
|
||||
if (slot & 1)
|
||||
slot++;
|
||||
dest_cpy = (char *)(stack - slot);
|
||||
dest_cpy += 8 - (*p_arg)->size;
|
||||
memcpy((char *)dest_cpy, (char *)*p_argv, (*p_arg)->size);
|
||||
}
|
||||
else
|
||||
*(UINT32 *)(stack - slot) = (UINT32)(*p_argv);
|
||||
{
|
||||
slot++;
|
||||
*(UINT32 *)(stack - slot) = (UINT32)(*p_argv);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
FFI_ASSERT(0);
|
||||
}
|
||||
|
||||
slot++;
|
||||
p_arg++;
|
||||
p_argv++;
|
||||
}
|
||||
|
||||
/* Make sure we didn't mess up and scribble on the stack. */
|
||||
{
|
||||
unsigned int n;
|
||||
int n;
|
||||
|
||||
debug(5, "Stack setup:\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;
|
||||
}
|
||||
|
||||
static void ffi_size_stack_pa32(ffi_cif *cif)
|
||||
static void ffi_size_stack_LINUX(ffi_cif *cif)
|
||||
{
|
||||
ffi_type **ptr;
|
||||
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 */
|
||||
break;
|
||||
|
||||
#ifdef PA_HPUX
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
#endif
|
||||
case FFI_TYPE_STRUCT:
|
||||
z += 1; /* pass by ptr, callee will copy */
|
||||
break;
|
||||
@@ -323,13 +304,6 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
cif->flags = (unsigned) cif->rtype->type;
|
||||
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:
|
||||
/* 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
|
||||
@@ -353,8 +327,8 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
own stack sizing. */
|
||||
switch (cif->abi)
|
||||
{
|
||||
case FFI_PA32:
|
||||
ffi_size_stack_pa32(cif);
|
||||
case FFI_LINUX:
|
||||
ffi_size_stack_LINUX(cif);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -365,11 +339,20 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
return FFI_OK;
|
||||
}
|
||||
|
||||
extern void ffi_call_pa32(void (*)(UINT32 *, extended_cif *, unsigned),
|
||||
extended_cif *, unsigned, unsigned, unsigned *,
|
||||
void (*fn)());
|
||||
/*@-declundef@*/
|
||||
/*@-exportheader@*/
|
||||
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;
|
||||
|
||||
@@ -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
|
||||
value address then we need to make one. */
|
||||
|
||||
if (rvalue == NULL
|
||||
#ifdef PA_HPUX
|
||||
&& (cif->rtype->type == FFI_TYPE_STRUCT
|
||||
|| cif->rtype->type == FFI_TYPE_LONGDOUBLE))
|
||||
#else
|
||||
&& cif->rtype->type == FFI_TYPE_STRUCT)
|
||||
#endif
|
||||
if ((rvalue == NULL) &&
|
||||
(cif->rtype->type == FFI_TYPE_STRUCT))
|
||||
{
|
||||
/*@-sysunrecog@*/
|
||||
ecif.rvalue = alloca(cif->rtype->size);
|
||||
/*@=sysunrecog@*/
|
||||
}
|
||||
else
|
||||
ecif.rvalue = rvalue;
|
||||
@@ -395,10 +375,12 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
|
||||
|
||||
switch (cif->abi)
|
||||
{
|
||||
case FFI_PA32:
|
||||
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);
|
||||
ffi_call_pa32(ffi_prep_args_pa32, &ecif, cif->bytes,
|
||||
case FFI_LINUX:
|
||||
/*@-usedef@*/
|
||||
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);
|
||||
/*@=usedef@*/
|
||||
break;
|
||||
|
||||
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 user function. This really ought to be in asm to make sure
|
||||
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;
|
||||
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 */
|
||||
ffi_type **p_arg;
|
||||
char *tmp;
|
||||
int i, avn;
|
||||
unsigned int slot = FIRST_ARG_SLOT;
|
||||
int i, avn, slot = FIRST_ARG_SLOT - 1;
|
||||
register UINT32 r28 asm("r28");
|
||||
|
||||
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_UINT32:
|
||||
case FFI_TYPE_POINTER:
|
||||
slot++;
|
||||
avalue[i] = (char *)(stack - slot) + sizeof(UINT32) - (*p_arg)->size;
|
||||
break;
|
||||
|
||||
case FFI_TYPE_SINT64:
|
||||
case FFI_TYPE_UINT64:
|
||||
slot += (slot & 1) ? 1 : 2;
|
||||
slot += 2;
|
||||
if (slot & 1)
|
||||
slot++;
|
||||
avalue[i] = (void *)(stack - slot);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_FLOAT:
|
||||
#ifdef PA_LINUX
|
||||
/* 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. */
|
||||
slot++;
|
||||
switch (slot - FIRST_ARG_SLOT)
|
||||
{
|
||||
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 3: fstw(fr7, (void *)(stack - slot)); break;
|
||||
}
|
||||
#endif
|
||||
avalue[i] = (void *)(stack - slot);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_DOUBLE:
|
||||
slot += (slot & 1) ? 1 : 2;
|
||||
#ifdef PA_LINUX
|
||||
/* See previous comment for FFI_TYPE_FLOAT. */
|
||||
switch (slot - FIRST_ARG_SLOT)
|
||||
slot += 2;
|
||||
if (slot & 1)
|
||||
slot++;
|
||||
switch (slot - FIRST_ARG_SLOT + 1)
|
||||
{
|
||||
case 1: fstd(fr5, (void *)(stack - slot)); break;
|
||||
case 3: fstd(fr7, (void *)(stack - slot)); break;
|
||||
case 2: fstd(fr5, (void *)(stack - slot)); break;
|
||||
case 4: fstd(fr7, (void *)(stack - slot)); break;
|
||||
}
|
||||
#endif
|
||||
avalue[i] = (void *)(stack - slot);
|
||||
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
|
||||
register. Structs smaller or equal 8 bytes are passed in two
|
||||
registers. Larger structures are passed by pointer. */
|
||||
if((*p_arg)->size <= 4)
|
||||
{
|
||||
avalue[i] = (void *)(stack - slot) + sizeof(UINT32) -
|
||||
(*p_arg)->size;
|
||||
}
|
||||
else if ((*p_arg)->size <= 8)
|
||||
{
|
||||
slot += (slot & 1) ? 1 : 2;
|
||||
avalue[i] = (void *)(stack - slot) + sizeof(UINT64) -
|
||||
(*p_arg)->size;
|
||||
}
|
||||
else
|
||||
if((*p_arg)->size <= 4) {
|
||||
slot++;
|
||||
avalue[i] = (void *)(stack - slot) + sizeof(UINT32) -
|
||||
(*p_arg)->size;
|
||||
} else if ((*p_arg)->size <= 8) {
|
||||
slot += 2;
|
||||
if (slot & 1)
|
||||
slot++;
|
||||
avalue[i] = (void *)(stack - slot) + sizeof(UINT64) -
|
||||
(*p_arg)->size;
|
||||
} else {
|
||||
slot++;
|
||||
avalue[i] = (void *) *(stack - slot);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
FFI_ASSERT(0);
|
||||
}
|
||||
|
||||
slot++;
|
||||
p_arg++;
|
||||
}
|
||||
|
||||
/* Invoke the closure. */
|
||||
(closure->fun) (cif, rvalue, avalue, closure->user_data);
|
||||
|
||||
debug(3, "after calling function, ret[0] = %08x, ret[1] = %08x\n", ret[0],
|
||||
ret[1]);
|
||||
debug(3, "after calling function, ret[0] = %08x, ret[1] = %08x\n", ret[0], ret[1]);
|
||||
|
||||
/* Store the result using the lower 2 bytes of the flags. */
|
||||
/* Store the result */
|
||||
switch (cif->flags)
|
||||
{
|
||||
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. */
|
||||
break;
|
||||
|
||||
case FFI_TYPE_SMALL_STRUCT2:
|
||||
case FFI_TYPE_SMALL_STRUCT3:
|
||||
case FFI_TYPE_SMALL_STRUCT4:
|
||||
tmp = (void*)(stack - FIRST_ARG_SLOT);
|
||||
tmp += 4 - 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_STRUCT6:
|
||||
case FFI_TYPE_SMALL_STRUCT7:
|
||||
case FFI_TYPE_SMALL_STRUCT8:
|
||||
{
|
||||
unsigned int ret2[2];
|
||||
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.
|
||||
The cif must already be prep'ed. */
|
||||
|
||||
extern void ffi_closure_pa32(void);
|
||||
void ffi_closure_LINUX(void);
|
||||
|
||||
ffi_status
|
||||
ffi_prep_closure (ffi_closure* closure,
|
||||
@@ -619,83 +591,30 @@ ffi_prep_closure (ffi_closure* closure,
|
||||
void *user_data)
|
||||
{
|
||||
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
|
||||
handler function. Use PC-relative addressing. */
|
||||
|
||||
#ifdef PA_LINUX
|
||||
tramp[0] = 0xeaa00000; /* b,l .+8,%r21 ; %r21 <- pc+8 */
|
||||
tramp[1] = 0xd6a01c1e; /* depi 0,31,2,%r21 ; mask priv bits */
|
||||
tramp[2] = 0x4aa10028; /* ldw 20(%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] = 0xeac0c000; /* bv%r0(%r22) ; branch to handler */
|
||||
tramp[6] = 0x0c281093; /* ldw 4(%r1),%r19 ; GP of handler */
|
||||
tramp[7] = ((UINT32)(ffi_closure_pa32) & ~2);
|
||||
tramp[0] = 0xeaa00000; /* b,l .+8, %r21 ; %r21 <- pc+8 */
|
||||
tramp[1] = 0xd6a01c1e; /* depi 0,31,2, %r21 ; mask priv bits */
|
||||
tramp[2] = 0x4aa10028; /* ldw 20(%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] = 0xeac0c000; /* bv %r0(%r22) ; branch to handler */
|
||||
tramp[6] = 0x0c281093; /* ldw 4(%r1), %r19 ; GP of handler */
|
||||
tramp[7] = ((UINT32)(ffi_closure_LINUX) & ~2);
|
||||
|
||||
/* Flush d/icache -- have to flush up 2 two lines because of
|
||||
alignment. */
|
||||
__asm__ volatile(
|
||||
"fdc 0(%0)\n\t"
|
||||
"fdc %1(%0)\n\t"
|
||||
"fic 0(%%sr4, %0)\n\t"
|
||||
"fic %1(%%sr4, %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)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
|
||||
asm volatile (
|
||||
"fdc 0(%0)\n"
|
||||
"fdc %1(%0)\n"
|
||||
"fic 0(%%sr4, %0)\n"
|
||||
"fic %1(%%sr4, %0)\n"
|
||||
"sync\n"
|
||||
: : "r"((unsigned long)tramp & ~31), "r"(32 /* stride */));
|
||||
|
||||
closure->cif = cif;
|
||||
closure->user_data = user_data;
|
||||
|
||||
@@ -35,20 +35,9 @@ typedef signed long ffi_sarg;
|
||||
typedef enum ffi_abi {
|
||||
FFI_FIRST_ABI = 0,
|
||||
|
||||
#ifdef PA_LINUX
|
||||
FFI_PA32,
|
||||
FFI_DEFAULT_ABI = FFI_PA32,
|
||||
#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,
|
||||
#ifdef PA
|
||||
FFI_LINUX,
|
||||
FFI_DEFAULT_ABI = FFI_LINUX,
|
||||
#endif
|
||||
|
||||
FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
|
||||
@@ -60,17 +49,11 @@ typedef enum ffi_abi {
|
||||
#define FFI_CLOSURES 1
|
||||
#define FFI_NATIVE_RAW_API 0
|
||||
|
||||
#ifdef PA_LINUX
|
||||
#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
|
||||
|
||||
#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
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
.level 1.1
|
||||
.align 4
|
||||
|
||||
/* void ffi_call_pa32(void (*)(char *, extended_cif *),
|
||||
/* void ffi_call_LINUX(void (*)(char *, extended_cif *),
|
||||
extended_cif *ecif,
|
||||
unsigned bytes,
|
||||
unsigned flags,
|
||||
@@ -39,12 +39,12 @@
|
||||
void (*fn)());
|
||||
*/
|
||||
|
||||
.export ffi_call_pa32,code
|
||||
.import ffi_prep_args_pa32,code
|
||||
.export ffi_call_LINUX,code
|
||||
.import ffi_prep_args_LINUX,code
|
||||
|
||||
.type ffi_call_pa32, @function
|
||||
.type ffi_call_LINUX, @function
|
||||
.LFB1:
|
||||
ffi_call_pa32:
|
||||
ffi_call_LINUX:
|
||||
.proc
|
||||
.callinfo FRAME=64,CALLS,SAVE_RP,SAVE_SP,ENTRY_GR=4
|
||||
.entry
|
||||
@@ -63,7 +63,7 @@ ffi_call_pa32:
|
||||
[ 64-bytes register save area ] <- %r4
|
||||
|
||||
[ 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
|
||||
*/
|
||||
@@ -73,14 +73,14 @@ ffi_call_pa32:
|
||||
.LCFI13:
|
||||
copy %sp, %r4
|
||||
|
||||
addl %arg2, %r4, %arg0 /* arg stack */
|
||||
stw %arg3, -48(%r3) /* save flags; we need it later */
|
||||
addl %arg2, %r4, %arg0 /* arg stack */
|
||||
stw %arg3, -48(%r3) /* save flags; we need it later */
|
||||
|
||||
/* Call prep_args:
|
||||
%arg0(stack) -- set up above
|
||||
%arg1(ecif) -- 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(%sp), %sp
|
||||
|
||||
@@ -106,139 +106,90 @@ ffi_call_pa32:
|
||||
|
||||
/* Store the result according to the return type. */
|
||||
|
||||
.Lcheckint:
|
||||
comib,<>,n FFI_TYPE_INT, %r21, .Lcheckint8
|
||||
b .Ldone
|
||||
stw %ret0, 0(%r20)
|
||||
checksmst3:
|
||||
comib,<>,n FFI_TYPE_SMALL_STRUCT3, %r21, checksmst567
|
||||
/* 3-byte structs are returned in ret0 as ??xxyyzz. Shift
|
||||
left 8 bits to write to the result structure. */
|
||||
zdep %ret0, 23, 24, %r22
|
||||
b done
|
||||
stw %r22, 0(%r20)
|
||||
|
||||
.Lcheckint8:
|
||||
comib,<>,n FFI_TYPE_UINT8, %r21, .Lcheckint16
|
||||
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:
|
||||
checksmst567:
|
||||
/* 5-7 byte values are returned right justified:
|
||||
ret0 ret1
|
||||
5: ??????aa bbccddee */
|
||||
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)
|
||||
5: ??????aa bbccddee
|
||||
6: ????aabb ccddeeff
|
||||
7: ??aabbcc ddeeffgg
|
||||
|
||||
.Lchecksmst6:
|
||||
comib,<>,n FFI_TYPE_SMALL_STRUCT6, %r21, .Lchecksmst7
|
||||
/* 6 byte values are returned right justified:
|
||||
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)
|
||||
To store this in the result, write the first 4 bytes into a temp
|
||||
register using shrpw (t1 = aabbccdd), followed by a rotation of
|
||||
ret1:
|
||||
|
||||
.Lchecksmst7:
|
||||
comib,<>,n FFI_TYPE_SMALL_STRUCT7, %r21, .Lchecksmst8
|
||||
/* 7 byte values are returned right justified:
|
||||
ret0 ret1
|
||||
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)
|
||||
ret0 ret1 ret1
|
||||
5: ??????aa bbccddee -> eebbccdd (rotate 8)
|
||||
6: ????aabb ccddeeff -> eeffccdd (rotate 16)
|
||||
7: ??aabbcc ddeeffgg -> eeffggdd (rotate 24)
|
||||
|
||||
.Lchecksmst8:
|
||||
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)
|
||||
then we write (t1, ret1) into the result. */
|
||||
|
||||
.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 */
|
||||
copy %r4, %sp /* pop arg stack */
|
||||
ldw 12(%r3), %r4
|
||||
@@ -250,14 +201,14 @@ ffi_call_pa32:
|
||||
.procend
|
||||
.LFE1:
|
||||
|
||||
/* void ffi_closure_pa32(void);
|
||||
/* void ffi_closure_LINUX(void);
|
||||
Called with closure argument in %r21 */
|
||||
.export ffi_closure_pa32,code
|
||||
.import ffi_closure_inner_pa32,code
|
||||
.export ffi_closure_LINUX,code
|
||||
.import ffi_closure_inner_LINUX,code
|
||||
|
||||
.type ffi_closure_pa32, @function
|
||||
.type ffi_closure_LINUX, @function
|
||||
.LFB2:
|
||||
ffi_closure_pa32:
|
||||
ffi_closure_LINUX:
|
||||
.proc
|
||||
.callinfo FRAME=64,CALLS,SAVE_RP,SAVE_SP,ENTRY_GR=3
|
||||
.entry
|
||||
@@ -277,7 +228,7 @@ ffi_closure_pa32:
|
||||
stw %arg3, -48(%r3)
|
||||
|
||||
copy %r21, %arg0
|
||||
bl ffi_closure_inner_pa32, %r2
|
||||
bl ffi_closure_inner_LINUX, %r2
|
||||
copy %r3, %arg1
|
||||
|
||||
ldwm -64(%sp), %r3
|
||||
@@ -348,7 +299,7 @@ ffi_closure_pa32:
|
||||
.sleb128 -5
|
||||
|
||||
.byte 0x4 ;# DW_CFA_advance_loc4
|
||||
.word .LCFI22-.LCFI21
|
||||
.word .LCFI12-.LCFI11
|
||||
.byte 0xd ;# DW_CFA_def_cfa_register = r3
|
||||
.uleb128 0x3
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,10 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
ffi_darwin.c
|
||||
ffi.c - Copyright (c) 1998 Geoffrey Keating
|
||||
|
||||
Copyright (C) 1998 Geoffrey Keating
|
||||
Copyright (C) 2001 John Hornkvist
|
||||
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
|
||||
PowerPC Foreign Function Interface
|
||||
|
||||
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
|
||||
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)
|
||||
/*@=exportheader@*/
|
||||
{
|
||||
const unsigned bytes = ecif->cif->bytes;
|
||||
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);
|
||||
}
|
||||
|
||||
/* 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. */
|
||||
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;
|
||||
|
||||
/* 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. */
|
||||
|
||||
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
|
||||
the asm's temp regs. */
|
||||
|
||||
@@ -424,12 +375,25 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
return FFI_OK;
|
||||
}
|
||||
|
||||
extern void ffi_call_AIX(extended_cif *, unsigned, unsigned, unsigned *,
|
||||
void (*fn)(), void (*fn2)());
|
||||
extern void ffi_call_DARWIN(extended_cif *, unsigned, unsigned, unsigned *,
|
||||
void (*fn)(), void (*fn2)());
|
||||
/*@-declundef@*/
|
||||
/*@-exportheader@*/
|
||||
extern void ffi_call_AIX(/*@out@*/ extended_cif *,
|
||||
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;
|
||||
|
||||
@@ -442,7 +406,9 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
|
||||
if ((rvalue == NULL) &&
|
||||
(cif->rtype->type == FFI_TYPE_STRUCT))
|
||||
{
|
||||
/*@-sysunrecog@*/
|
||||
ecif.rvalue = alloca(cif->rtype->size);
|
||||
/*@=sysunrecog@*/
|
||||
}
|
||||
else
|
||||
ecif.rvalue = rvalue;
|
||||
@@ -450,12 +416,16 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
|
||||
switch (cif->abi)
|
||||
{
|
||||
case FFI_AIX:
|
||||
ffi_call_AIX(&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn,
|
||||
ffi_prep_args);
|
||||
/*@-usedef@*/
|
||||
ffi_call_AIX(&ecif, -cif->bytes,
|
||||
cif->flags, ecif.rvalue, fn, ffi_prep_args);
|
||||
/*@=usedef@*/
|
||||
break;
|
||||
case FFI_DARWIN:
|
||||
ffi_call_DARWIN(&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn,
|
||||
ffi_prep_args);
|
||||
/*@-usedef@*/
|
||||
ffi_call_DARWIN(&ecif, -cif->bytes,
|
||||
cif->flags, ecif.rvalue, fn, ffi_prep_args);
|
||||
/*@=usedef@*/
|
||||
break;
|
||||
default:
|
||||
FFI_ASSERT(0);
|
||||
|
||||
@@ -43,15 +43,10 @@ typedef enum ffi_abi {
|
||||
FFI_SYSV,
|
||||
FFI_GCC_SYSV,
|
||||
FFI_LINUX64,
|
||||
FFI_LINUX,
|
||||
# ifdef POWERPC64
|
||||
FFI_DEFAULT_ABI = FFI_LINUX64,
|
||||
# else
|
||||
# if __LDBL_MANT_DIG__ == 106
|
||||
FFI_DEFAULT_ABI = FFI_LINUX,
|
||||
# else
|
||||
FFI_DEFAULT_ABI = FFI_GCC_SYSV,
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -74,7 +69,7 @@ typedef enum ffi_abi {
|
||||
FFI_DEFAULT_ABI = FFI_SYSV,
|
||||
#endif
|
||||
|
||||
FFI_LAST_ABI
|
||||
FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
|
||||
} ffi_abi;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -120,9 +120,12 @@ ffi_call_LINUX64:
|
||||
blr
|
||||
|
||||
.Lfp_return_value:
|
||||
bt 27, .Lfd_return_value
|
||||
bf 28, .Lfloat_return_value
|
||||
stfd %f1, 0(%r30)
|
||||
bf 27, .Ldone_return_value
|
||||
b .Ldone_return_value
|
||||
.Lfd_return_value:
|
||||
stfd %f1, 0(%r30)
|
||||
stfd %f2, 8(%r30)
|
||||
b .Ldone_return_value
|
||||
.Lfloat_return_value:
|
||||
|
||||
@@ -58,178 +58,223 @@ ENTRY(ffi_closure_SYSV)
|
||||
|
||||
# make the call
|
||||
bl ffi_closure_helper_SYSV@local
|
||||
.Lret:
|
||||
|
||||
# now r3 contains the return type
|
||||
# so use it to look up in a table
|
||||
# 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
|
||||
# by using return type as offset
|
||||
|
||||
mflr %r4 # move address of .Lret to r4
|
||||
slwi %r3,%r3,4 # now multiply return type by 16
|
||||
addi %r4, %r4, .Lret_type0 - .Lret
|
||||
lwz %r0,148(%r1)
|
||||
add %r3,%r3,%r4 # add contents of table to table address
|
||||
addi %r6,%r1,112 # get pointer to results area
|
||||
bl .Lget_ret_type0_addr # get pointer to .Lret_type0 into LR
|
||||
mflr %r4 # move to r4
|
||||
slwi %r3,%r3,4 # now multiply return type by 16
|
||||
add %r3,%r3,%r4 # add contents of table to table address
|
||||
mtctr %r3
|
||||
bctr # jump to it
|
||||
bctr # jump to it
|
||||
.LFE1:
|
||||
|
||||
# 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
|
||||
# first.
|
||||
.align 4
|
||||
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
.Lget_ret_type0_addr:
|
||||
blrl
|
||||
|
||||
# case FFI_TYPE_VOID
|
||||
.Lret_type0:
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
blr
|
||||
b .Lfinish
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
# case FFI_TYPE_INT
|
||||
lwz %r3,112+0(%r1)
|
||||
mtlr %r0
|
||||
.Lfinish:
|
||||
addi %r1,%r1,144
|
||||
blr
|
||||
.Lret_type1:
|
||||
lwz %r3,0(%r6)
|
||||
b .Lfinish
|
||||
nop
|
||||
nop
|
||||
|
||||
# case FFI_TYPE_FLOAT
|
||||
lfs %f1,112+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
blr
|
||||
.Lret_type2:
|
||||
lfs %f1,0(%r6)
|
||||
b .Lfinish
|
||||
nop
|
||||
nop
|
||||
|
||||
# case FFI_TYPE_DOUBLE
|
||||
lfd %f1,112+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
blr
|
||||
.Lret_type3:
|
||||
lfd %f1,0(%r6)
|
||||
b .Lfinish
|
||||
nop
|
||||
nop
|
||||
|
||||
# case FFI_TYPE_LONGDOUBLE
|
||||
lfd %f1,112+0(%r1)
|
||||
lfd %f2,112+8(%r1)
|
||||
mtlr %r0
|
||||
.Lret_type4:
|
||||
lfd %f1,0(%r6)
|
||||
b .Lfinish
|
||||
nop
|
||||
nop
|
||||
|
||||
# case FFI_TYPE_UINT8
|
||||
lbz %r3,112+3(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
blr
|
||||
.Lret_type5:
|
||||
lbz %r3,3(%r6)
|
||||
b .Lfinish
|
||||
nop
|
||||
nop
|
||||
|
||||
# case FFI_TYPE_SINT8
|
||||
lbz %r3,112+3(%r1)
|
||||
.Lret_type6:
|
||||
lbz %r3,3(%r6)
|
||||
extsb %r3,%r3
|
||||
mtlr %r0
|
||||
b .Lfinish
|
||||
nop
|
||||
|
||||
# case FFI_TYPE_UINT16
|
||||
lhz %r3,112+2(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
blr
|
||||
.Lret_type7:
|
||||
lhz %r3,2(%r6)
|
||||
b .Lfinish
|
||||
nop
|
||||
nop
|
||||
|
||||
# case FFI_TYPE_SINT16
|
||||
lha %r3,112+2(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
blr
|
||||
.Lret_type8:
|
||||
lha %r3,2(%r6)
|
||||
b .Lfinish
|
||||
nop
|
||||
nop
|
||||
|
||||
# case FFI_TYPE_UINT32
|
||||
lwz %r3,112+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
blr
|
||||
.Lret_type9:
|
||||
lwz %r3,0(%r6)
|
||||
b .Lfinish
|
||||
nop
|
||||
nop
|
||||
|
||||
# case FFI_TYPE_SINT32
|
||||
lwz %r3,112+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
blr
|
||||
.Lret_type10:
|
||||
lwz %r3,0(%r6)
|
||||
b .Lfinish
|
||||
nop
|
||||
nop
|
||||
|
||||
# case FFI_TYPE_UINT64
|
||||
lwz %r3,112+0(%r1)
|
||||
lwz %r4,112+4(%r1)
|
||||
mtlr %r0
|
||||
.Lret_type11:
|
||||
lwz %r3,0(%r6)
|
||||
lwz %r4,4(%r6)
|
||||
b .Lfinish
|
||||
nop
|
||||
|
||||
# case FFI_TYPE_SINT64
|
||||
lwz %r3,112+0(%r1)
|
||||
lwz %r4,112+4(%r1)
|
||||
mtlr %r0
|
||||
.Lret_type12:
|
||||
lwz %r3,0(%r6)
|
||||
lwz %r4,4(%r6)
|
||||
b .Lfinish
|
||||
nop
|
||||
|
||||
# case FFI_TYPE_STRUCT
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
blr
|
||||
.Lret_type13:
|
||||
b .Lfinish
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
# case FFI_TYPE_POINTER
|
||||
lwz %r3,112+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
blr
|
||||
.Lret_type14:
|
||||
lwz %r3,0(%r6)
|
||||
b .Lfinish
|
||||
nop
|
||||
nop
|
||||
|
||||
# The return types below are only used when the ABI type is FFI_SYSV.
|
||||
# case FFI_SYSV_TYPE_SMALL_STRUCT + 1. One byte struct.
|
||||
lbz %r3,112+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
blr
|
||||
.Lret_type15:
|
||||
# fall through.
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
# case FFI_SYSV_TYPE_SMALL_STRUCT + 2. Two byte struct.
|
||||
lhz %r3,112+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
blr
|
||||
.Lret_type16:
|
||||
# fall through.
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
# case FFI_SYSV_TYPE_SMALL_STRUCT + 3. Three byte struct.
|
||||
lwz %r3,112+0(%r1)
|
||||
srwi %r3,%r3,8
|
||||
mtlr %r0
|
||||
b .Lfinish
|
||||
.Lret_type17:
|
||||
# fall through.
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
# case FFI_SYSV_TYPE_SMALL_STRUCT + 4. Four byte struct.
|
||||
lwz %r3,112+0(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
blr
|
||||
.Lret_type18:
|
||||
# this one handles the structs from above too.
|
||||
lwz %r3,0(%r6)
|
||||
srw %r3,%r3,%r5
|
||||
b .Lfinish
|
||||
nop
|
||||
|
||||
# case FFI_SYSV_TYPE_SMALL_STRUCT + 5. Five byte struct.
|
||||
lwz %r3,112+0(%r1)
|
||||
lwz %r4,112+4(%r1)
|
||||
li %r5,24
|
||||
b .Lstruct567
|
||||
.Lret_type19:
|
||||
# fall through.
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
# case FFI_SYSV_TYPE_SMALL_STRUCT + 6. Six byte struct.
|
||||
lwz %r3,112+0(%r1)
|
||||
lwz %r4,112+4(%r1)
|
||||
li %r5,16
|
||||
b .Lstruct567
|
||||
.Lret_type20:
|
||||
# fall through.
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
# case FFI_SYSV_TYPE_SMALL_STRUCT + 7. Seven byte struct.
|
||||
lwz %r3,112+0(%r1)
|
||||
lwz %r4,112+4(%r1)
|
||||
li %r5,8
|
||||
b .Lstruct567
|
||||
.Lret_type21:
|
||||
# fall through.
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
# case FFI_SYSV_TYPE_SMALL_STRUCT + 8. Eight byte struct.
|
||||
lwz %r3,112+0(%r1)
|
||||
lwz %r4,112+4(%r1)
|
||||
mtlr %r0
|
||||
.Lret_type22:
|
||||
# this one handles the above unhandled structs.
|
||||
lwz %r3,0(%r6)
|
||||
lwz %r4,4(%r6)
|
||||
bl __lshrdi3 # libgcc function to shift r3/r4, shift value in r5.
|
||||
b .Lfinish
|
||||
|
||||
.Lstruct567:
|
||||
subfic %r6,%r5,32
|
||||
srw %r4,%r4,%r5
|
||||
slw %r6,%r3,%r6
|
||||
srw %r3,%r3,%r5
|
||||
or %r4,%r6,%r4
|
||||
# case done
|
||||
.Lfinish:
|
||||
|
||||
lwz %r0,148(%r1)
|
||||
mtlr %r0
|
||||
addi %r1,%r1,144
|
||||
blr
|
||||
|
||||
END(ffi_closure_SYSV)
|
||||
|
||||
.section ".eh_frame",EH_FRAME_FLAGS,@progbits
|
||||
|
||||
@@ -121,8 +121,6 @@ L(done_return_value):
|
||||
L(fp_return_value):
|
||||
bf 28,L(float_return_value)
|
||||
stfd %f1,0(%r30)
|
||||
bf 27,L(done_return_value)
|
||||
stfd %f2,8(%r30)
|
||||
b L(done_return_value)
|
||||
L(float_return_value):
|
||||
stfs %f1,0(%r30)
|
||||
@@ -142,14 +140,8 @@ L(smst_one_register):
|
||||
b L(done_return_value)
|
||||
L(smst_two_register):
|
||||
rlwinm %r5,%r31,5+23,32-5,31 /* Extract the value to shift. */
|
||||
cmpwi %r5,0
|
||||
subfic %r9,%r5,32
|
||||
slw %r29,%r3,%r5
|
||||
srw %r9,%r4,%r9
|
||||
beq- L(smst_8byte)
|
||||
or %r3,%r9,%r29
|
||||
slw %r4,%r4,%r5
|
||||
L(smst_8byte):
|
||||
bl __ashldi3 /* libgcc function to shift r3/r4,
|
||||
shift value in r5. */
|
||||
stw %r3,0(%r30)
|
||||
stw %r4,4(%r30)
|
||||
b L(done_return_value)
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <ffi_common.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
/* Round up to FFI_SIZEOF_ARG. */
|
||||
|
||||
#define STACK_ARG_SIZE(x) ALIGN(x, FFI_SIZEOF_ARG)
|
||||
@@ -32,12 +33,14 @@
|
||||
/* Perform machine independent initialization of aggregate type
|
||||
specifications. */
|
||||
|
||||
static ffi_status initialize_aggregate(ffi_type *arg)
|
||||
static ffi_status initialize_aggregate(/*@out@*/ ffi_type *arg)
|
||||
{
|
||||
ffi_type **ptr;
|
||||
|
||||
FFI_ASSERT(arg != NULL);
|
||||
|
||||
/*@-usedef@*/
|
||||
|
||||
FFI_ASSERT(arg->elements != NULL);
|
||||
FFI_ASSERT(arg->size == 0);
|
||||
FFI_ASSERT(arg->alignment == 0);
|
||||
@@ -74,6 +77,8 @@ static ffi_status initialize_aggregate(ffi_type *arg)
|
||||
return FFI_BAD_TYPEDEF;
|
||||
else
|
||||
return FFI_OK;
|
||||
|
||||
/*@=usedef@*/
|
||||
}
|
||||
|
||||
#ifndef __CRIS__
|
||||
@@ -84,8 +89,10 @@ static ffi_status initialize_aggregate(ffi_type *arg)
|
||||
/* Perform machine independent ffi_cif preparation, then call
|
||||
machine dependent routine. */
|
||||
|
||||
ffi_status ffi_prep_cif(ffi_cif *cif, ffi_abi abi, unsigned int nargs,
|
||||
ffi_type *rtype, ffi_type **atypes)
|
||||
ffi_status ffi_prep_cif(/*@out@*/ /*@partial@*/ ffi_cif *cif,
|
||||
ffi_abi abi, unsigned int nargs,
|
||||
/*@dependent@*/ /*@out@*/ /*@partial@*/ ffi_type *rtype,
|
||||
/*@dependent@*/ ffi_type **atypes)
|
||||
{
|
||||
unsigned bytes = 0;
|
||||
unsigned int i;
|
||||
@@ -102,8 +109,10 @@ ffi_status ffi_prep_cif(ffi_cif *cif, ffi_abi abi, unsigned int nargs,
|
||||
cif->flags = 0;
|
||||
|
||||
/* Initialize the return type if necessary */
|
||||
/*@-usedef@*/
|
||||
if ((cif->rtype->size == 0) && (initialize_aggregate(cif->rtype) != FFI_OK))
|
||||
return FFI_BAD_TYPEDEF;
|
||||
/*@=usedef@*/
|
||||
|
||||
/* Perform a sanity check on the return type */
|
||||
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
|
||||
&& (cif->abi != FFI_V9 || cif->rtype->size > 32)
|
||||
#endif
|
||||
#ifdef X86_DARWIN
|
||||
&& (cif->rtype->size > 8)
|
||||
#endif
|
||||
)
|
||||
)
|
||||
bytes = STACK_ARG_SIZE(sizeof(void*));
|
||||
#endif
|
||||
|
||||
|
||||
@@ -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
|
||||
* 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*));
|
||||
ffi_raw_to_ptrarray (cif, raw, avalue);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -106,7 +106,9 @@ return_type (ffi_type *arg)
|
||||
/* ffi_prep_args is called by the assembly routine once stack space
|
||||
has been allocated for the function's arguments */
|
||||
|
||||
/*@-exportheader@*/
|
||||
void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
/*@=exportheader@*/
|
||||
{
|
||||
register unsigned int i;
|
||||
register int tmp;
|
||||
@@ -404,10 +406,20 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
return FFI_OK;
|
||||
}
|
||||
|
||||
extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *,
|
||||
unsigned, unsigned, unsigned *, void (*fn)());
|
||||
/*@-declundef@*/
|
||||
/*@-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;
|
||||
UINT64 trvalue;
|
||||
@@ -424,7 +436,9 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
|
||||
else if ((rvalue == NULL) &&
|
||||
(cif->rtype->type == FFI_TYPE_STRUCT))
|
||||
{
|
||||
/*@-sysunrecog@*/
|
||||
ecif.rvalue = alloca(cif->rtype->size);
|
||||
/*@=sysunrecog@*/
|
||||
}
|
||||
else
|
||||
ecif.rvalue = rvalue;
|
||||
@@ -432,8 +446,10 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
|
||||
switch (cif->abi)
|
||||
{
|
||||
case FFI_SYSV:
|
||||
ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue,
|
||||
fn);
|
||||
/*@-usedef@*/
|
||||
ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes,
|
||||
cif->flags, ecif.rvalue, fn);
|
||||
/*@=usedef@*/
|
||||
break;
|
||||
default:
|
||||
FFI_ASSERT(0);
|
||||
@@ -519,6 +535,7 @@ ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
|
||||
int freg = 0;
|
||||
#endif
|
||||
ffi_cif *cif;
|
||||
double temp;
|
||||
|
||||
cif = closure->cif;
|
||||
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. */
|
||||
if (cif->rtype->type == FFI_TYPE_STRUCT && STRUCT_VALUE_ADDRESS_WITH_ARG)
|
||||
{
|
||||
rvalue = (void *) *pgr++;
|
||||
rvalue = *pgr++;
|
||||
ireg = 1;
|
||||
}
|
||||
else
|
||||
@@ -594,8 +611,6 @@ ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
|
||||
{
|
||||
if (freg + 1 >= NFREGARG)
|
||||
continue;
|
||||
if (freg & 1)
|
||||
pfr++;
|
||||
freg = (freg + 1) & ~1;
|
||||
freg += 2;
|
||||
avalue[i] = pfr;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -829,13 +829,13 @@ __FRAME_BEGIN__:
|
||||
.byte 0x6 /* uleb128 0x6 */
|
||||
.byte 0x8e /* DW_CFA_offset, column 0xe */
|
||||
.byte 0x5 /* uleb128 0x5 */
|
||||
.byte 0x84 /* DW_CFA_offset, column 0x4 */
|
||||
.byte 0x8b /* DW_CFA_offset, column 0xb */
|
||||
.byte 0x4 /* uleb128 0x4 */
|
||||
.byte 0x85 /* DW_CFA_offset, column 0x5 */
|
||||
.byte 0x8a /* DW_CFA_offset, column 0xa */
|
||||
.byte 0x3 /* uleb128 0x3 */
|
||||
.byte 0x86 /* DW_CFA_offset, column 0x6 */
|
||||
.byte 0x89 /* DW_CFA_offset, column 0x9 */
|
||||
.byte 0x2 /* uleb128 0x2 */
|
||||
.byte 0x87 /* DW_CFA_offset, column 0x7 */
|
||||
.byte 0x88 /* DW_CFA_offset, column 0x8 */
|
||||
.byte 0x1 /* uleb128 0x1 */
|
||||
.byte 0x4 /* DW_CFA_advance_loc4 */
|
||||
.4byte .LCFIE-.LCFID
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -54,7 +54,9 @@ return_type (ffi_type *arg)
|
||||
/* ffi_prep_args is called by the assembly routine once stack space
|
||||
has been allocated for the function's arguments */
|
||||
|
||||
/*@-exportheader@*/
|
||||
void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
/*@=exportheader@*/
|
||||
{
|
||||
register unsigned int i;
|
||||
register unsigned int avn;
|
||||
@@ -158,7 +160,6 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
int n, m;
|
||||
int greg;
|
||||
int freg;
|
||||
int fpair = -1;
|
||||
|
||||
greg = (return_type (cif->rtype) == FFI_TYPE_STRUCT ? 1 : 0);
|
||||
freg = 0;
|
||||
@@ -174,13 +175,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
cif->bytes += sizeof (UINT64) - sizeof (float);
|
||||
if (freg >= NFREGARG - 1)
|
||||
continue;
|
||||
if (fpair < 0)
|
||||
{
|
||||
fpair = freg;
|
||||
freg += 2;
|
||||
}
|
||||
else
|
||||
fpair = -1;
|
||||
freg++;
|
||||
cif->flags2 += ((cif->arg_types)[i]->type) << (2 * j++);
|
||||
break;
|
||||
|
||||
@@ -189,6 +184,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
continue;
|
||||
if ((freg + 1) < NFREGARG)
|
||||
{
|
||||
freg = (freg + 1) & ~1;
|
||||
freg += 2;
|
||||
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;
|
||||
}
|
||||
|
||||
extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *,
|
||||
unsigned, unsigned, long long, unsigned *,
|
||||
/*@-declundef@*/
|
||||
/*@-exportheader@*/
|
||||
extern void ffi_call_SYSV(void (*)(char *, extended_cif *),
|
||||
/*@out@*/ extended_cif *,
|
||||
unsigned, unsigned, long long,
|
||||
/*@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;
|
||||
UINT64 trvalue;
|
||||
@@ -257,7 +262,9 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
|
||||
else if ((rvalue == NULL) &&
|
||||
(cif->rtype->type == FFI_TYPE_STRUCT))
|
||||
{
|
||||
/*@-sysunrecog@*/
|
||||
ecif.rvalue = alloca(cif->rtype->size);
|
||||
/*@=sysunrecog@*/
|
||||
}
|
||||
else
|
||||
ecif.rvalue = rvalue;
|
||||
@@ -265,8 +272,10 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
|
||||
switch (cif->abi)
|
||||
{
|
||||
case FFI_SYSV:
|
||||
ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, cif->flags2,
|
||||
ecif.rvalue, fn);
|
||||
/*@-usedef@*/
|
||||
ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes,
|
||||
cif->flags, cif->flags2, ecif.rvalue, fn);
|
||||
/*@=usedef@*/
|
||||
break;
|
||||
default:
|
||||
FFI_ASSERT(0);
|
||||
@@ -341,7 +350,6 @@ ffi_closure_helper_SYSV (ffi_closure *closure, UINT64 *rvalue,
|
||||
int i, avn;
|
||||
int greg, freg;
|
||||
ffi_cif *cif;
|
||||
int fpair = -1;
|
||||
|
||||
cif = closure->cif;
|
||||
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. */
|
||||
if (return_type (cif->rtype) == FFI_TYPE_STRUCT)
|
||||
{
|
||||
rvalue = (UINT64 *) *pgr;
|
||||
rvalue = *pgr;
|
||||
greg = 1;
|
||||
}
|
||||
else
|
||||
@@ -394,24 +402,11 @@ ffi_closure_helper_SYSV (ffi_closure *closure, UINT64 *rvalue,
|
||||
if ((*p_arg)->type == FFI_TYPE_FLOAT)
|
||||
{
|
||||
if (freg < NFREGARG - 1)
|
||||
{
|
||||
if (fpair >= 0)
|
||||
{
|
||||
avalue[i] = (UINT32 *) pfr + fpair;
|
||||
fpair = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef __LITTLE_ENDIAN__
|
||||
fpair = freg;
|
||||
avalue[i] = (UINT32 *) pfr + (1 ^ freg);
|
||||
avalue[i] = (UINT32 *) pfr + (1 ^ freg++);
|
||||
#else
|
||||
fpair = 1 ^ freg;
|
||||
avalue[i] = (UINT32 *) pfr + freg;
|
||||
avalue[i] = (UINT32 *) pfr + freg++;
|
||||
#endif
|
||||
freg += 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
#ifdef __LITTLE_ENDIAN__
|
||||
avalue[i] = pgr + greg;
|
||||
@@ -433,6 +428,7 @@ ffi_closure_helper_SYSV (ffi_closure *closure, UINT64 *rvalue,
|
||||
avalue[i] = pgr + greg;
|
||||
else
|
||||
{
|
||||
freg = (freg + 1) & ~1;
|
||||
avalue[i] = pfr + (freg >> 1);
|
||||
freg += 2;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -84,7 +84,6 @@ ENTRY(ffi_call_SYSV)
|
||||
addi r15, 64, r22
|
||||
movi 0, r0
|
||||
movi 0, r1
|
||||
movi -1, r23
|
||||
|
||||
pt/l 1f, tr1
|
||||
bnei/l r29, FFI_TYPE_STRUCT, tr1
|
||||
@@ -107,6 +106,9 @@ ENTRY(ffi_call_SYSV)
|
||||
|
||||
.L_pass_d:
|
||||
addi r0, 1, r0
|
||||
addi r1, 1, r1
|
||||
andi r1, ~1, r1
|
||||
|
||||
pt/l 3f, tr0
|
||||
movi 12, r20
|
||||
bge/l r1, r20, tr0
|
||||
@@ -156,23 +158,13 @@ ENTRY(ffi_call_SYSV)
|
||||
addi.l r15, 8, r15
|
||||
3:
|
||||
pt/l .L_pass, tr0
|
||||
addi r1, 1, r1
|
||||
blink tr0, r63
|
||||
|
||||
.L_pop_f:
|
||||
pt/l .L_pop_f_tbl, tr1
|
||||
pt/l 5f, tr2
|
||||
gettr tr1, r20
|
||||
bge/l r23, r63, tr2
|
||||
add r1, r63, r23
|
||||
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
|
||||
ptabs/l r20, tr1
|
||||
blink tr1, r63
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
/* ffi_prep_args is called by the assembly routine once stack space
|
||||
has been allocated for the function's arguments */
|
||||
|
||||
/*@-exportheader@*/
|
||||
void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
/*@=exportheader@*/
|
||||
{
|
||||
register unsigned int i;
|
||||
register void **p_argv;
|
||||
@@ -119,7 +121,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
switch (cif->rtype->type)
|
||||
{
|
||||
case FFI_TYPE_VOID:
|
||||
#ifdef X86
|
||||
#ifndef X86_WIN32
|
||||
case FFI_TYPE_STRUCT:
|
||||
#endif
|
||||
case FFI_TYPE_SINT64:
|
||||
@@ -133,7 +135,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
cif->flags = FFI_TYPE_SINT64;
|
||||
break;
|
||||
|
||||
#ifndef X86
|
||||
#ifdef X86_WIN32
|
||||
case FFI_TYPE_STRUCT:
|
||||
if (cif->rtype->size == 1)
|
||||
{
|
||||
@@ -163,23 +165,35 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef X86_DARWIN
|
||||
cif->bytes = (cif->bytes + 15) & ~0xF;
|
||||
#endif
|
||||
|
||||
return FFI_OK;
|
||||
}
|
||||
|
||||
extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *,
|
||||
unsigned, unsigned, unsigned *, void (*fn)());
|
||||
/*@-declundef@*/
|
||||
/*@-exportheader@*/
|
||||
extern void ffi_call_SYSV(void (*)(char *, extended_cif *),
|
||||
/*@out@*/ extended_cif *,
|
||||
unsigned, unsigned,
|
||||
/*@out@*/ unsigned *,
|
||||
void (*fn)());
|
||||
/*@=declundef@*/
|
||||
/*@=exportheader@*/
|
||||
|
||||
#ifdef X86_WIN32
|
||||
extern void ffi_call_STDCALL(void (*)(char *, extended_cif *), extended_cif *,
|
||||
unsigned, unsigned, unsigned *, void (*fn)());
|
||||
|
||||
/*@-declundef@*/
|
||||
/*@-exportheader@*/
|
||||
extern void ffi_call_STDCALL(void (*)(char *, extended_cif *),
|
||||
/*@out@*/ extended_cif *,
|
||||
unsigned, unsigned,
|
||||
/*@out@*/ unsigned *,
|
||||
void (*fn)());
|
||||
/*@=declundef@*/
|
||||
/*@=exportheader@*/
|
||||
#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;
|
||||
|
||||
@@ -192,7 +206,9 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
|
||||
if ((rvalue == NULL) &&
|
||||
(cif->flags == FFI_TYPE_STRUCT))
|
||||
{
|
||||
/*@-sysunrecog@*/
|
||||
ecif.rvalue = alloca(cif->rtype->size);
|
||||
/*@=sysunrecog@*/
|
||||
}
|
||||
else
|
||||
ecif.rvalue = rvalue;
|
||||
@@ -201,13 +217,17 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
|
||||
switch (cif->abi)
|
||||
{
|
||||
case FFI_SYSV:
|
||||
ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue,
|
||||
fn);
|
||||
/*@-usedef@*/
|
||||
ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes,
|
||||
cif->flags, ecif.rvalue, fn);
|
||||
/*@=usedef@*/
|
||||
break;
|
||||
#ifdef X86_WIN32
|
||||
case FFI_STDCALL:
|
||||
ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
/*@-usedef@*/
|
||||
ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes,
|
||||
cif->flags, ecif.rvalue, fn);
|
||||
/*@=usedef@*/
|
||||
break;
|
||||
#endif /* X86_WIN32 */
|
||||
default:
|
||||
@@ -256,9 +276,11 @@ ffi_closure_SYSV_inner (closure, respp, args)
|
||||
return cif->flags;
|
||||
}
|
||||
|
||||
/*@-exportheader@*/
|
||||
static void
|
||||
ffi_prep_incoming_args_SYSV(char *stack, void **rvalue, void **avalue,
|
||||
ffi_cif *cif)
|
||||
ffi_prep_incoming_args_SYSV(char *stack, void **rvalue,
|
||||
void **avalue, ffi_cif *cif)
|
||||
/*@=exportheader@*/
|
||||
{
|
||||
register unsigned int i;
|
||||
register void **p_argv;
|
||||
@@ -379,17 +401,26 @@ ffi_prep_args_raw(char *stack, extended_cif *ecif)
|
||||
*/
|
||||
|
||||
extern void
|
||||
ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, unsigned,
|
||||
unsigned, unsigned *, void (*fn)());
|
||||
ffi_call_SYSV(void (*)(char *, extended_cif *),
|
||||
/*@out@*/ extended_cif *,
|
||||
unsigned, unsigned,
|
||||
/*@out@*/ unsigned *,
|
||||
void (*fn)());
|
||||
|
||||
#ifdef X86_WIN32
|
||||
extern void
|
||||
ffi_call_STDCALL(void (*)(char *, extended_cif *), extended_cif *, unsigned,
|
||||
unsigned, unsigned *, void (*fn)());
|
||||
ffi_call_STDCALL(void (*)(char *, extended_cif *),
|
||||
/*@out@*/ extended_cif *,
|
||||
unsigned, unsigned,
|
||||
/*@out@*/ unsigned *,
|
||||
void (*fn)());
|
||||
#endif /* X86_WIN32 */
|
||||
|
||||
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;
|
||||
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) &&
|
||||
(cif->rtype->type == FFI_TYPE_STRUCT))
|
||||
{
|
||||
/*@-sysunrecog@*/
|
||||
ecif.rvalue = alloca(cif->rtype->size);
|
||||
/*@=sysunrecog@*/
|
||||
}
|
||||
else
|
||||
ecif.rvalue = rvalue;
|
||||
@@ -412,13 +445,17 @@ ffi_raw_call(ffi_cif *cif, void (*fn)(), void *rvalue, ffi_raw *fake_avalue)
|
||||
switch (cif->abi)
|
||||
{
|
||||
case FFI_SYSV:
|
||||
ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
/*@-usedef@*/
|
||||
ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes,
|
||||
cif->flags, ecif.rvalue, fn);
|
||||
/*@=usedef@*/
|
||||
break;
|
||||
#ifdef X86_WIN32
|
||||
case FFI_STDCALL:
|
||||
ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags,
|
||||
ecif.rvalue, fn);
|
||||
/*@-usedef@*/
|
||||
ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes,
|
||||
cif->flags, ecif.rvalue, fn);
|
||||
/*@=usedef@*/
|
||||
break;
|
||||
#endif /* X86_WIN32 */
|
||||
default:
|
||||
|
||||
@@ -69,7 +69,7 @@ typedef enum ffi_abi {
|
||||
|
||||
#define FFI_CLOSURES 1
|
||||
|
||||
#if defined (X86_64) || (defined (__x86_64__) && defined (X86_DARWIN))
|
||||
#ifdef X86_64
|
||||
#define FFI_TRAMPOLINE_SIZE 24
|
||||
#define FFI_NATIVE_RAW_API 0
|
||||
#else
|
||||
|
||||
@@ -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@
|
||||
|
||||
# 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
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -13,15 +13,11 @@
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(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
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/fficonfig.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
@@ -53,21 +49,16 @@ RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALPHA_FALSE = @ALPHA_FALSE@
|
||||
ALPHA_TRUE = @ALPHA_TRUE@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_RUNTESTFLAGS =
|
||||
AR = @AR@
|
||||
ARM_FALSE = @ARM_FALSE@
|
||||
ARM_TRUE = @ARM_TRUE@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASDEPMODE = @CCASDEPMODE@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
@@ -88,38 +79,23 @@ EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
FRV_FALSE = @FRV_FALSE@
|
||||
FRV_TRUE = @FRV_TRUE@
|
||||
GREP = @GREP@
|
||||
HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@
|
||||
IA64_FALSE = @IA64_FALSE@
|
||||
IA64_TRUE = @IA64_TRUE@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBFFI_CRIS_FALSE = @LIBFFI_CRIS_FALSE@
|
||||
LIBFFI_CRIS_TRUE = @LIBFFI_CRIS_TRUE@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
M32R_FALSE = @M32R_FALSE@
|
||||
M32R_TRUE = @M32R_TRUE@
|
||||
M68K_FALSE = @M68K_FALSE@
|
||||
M68K_TRUE = @M68K_TRUE@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MIPS_IRIX_FALSE = @MIPS_IRIX_FALSE@
|
||||
MIPS_IRIX_TRUE = @MIPS_IRIX_TRUE@
|
||||
MIPS_LINUX_FALSE = @MIPS_LINUX_FALSE@
|
||||
MIPS_LINUX_TRUE = @MIPS_LINUX_TRUE@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PA64_HPUX_FALSE = @PA64_HPUX_FALSE@
|
||||
PA64_HPUX_TRUE = @PA64_HPUX_TRUE@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
@@ -127,53 +103,21 @@ PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
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@
|
||||
S390_FALSE = @S390_FALSE@
|
||||
S390_TRUE = @S390_TRUE@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SH64_FALSE = @SH64_FALSE@
|
||||
SH64_TRUE = @SH64_TRUE@
|
||||
SHELL = @SHELL@
|
||||
SH_FALSE = @SH_FALSE@
|
||||
SH_TRUE = @SH_TRUE@
|
||||
SPARC_FALSE = @SPARC_FALSE@
|
||||
SPARC_TRUE = @SPARC_TRUE@
|
||||
STRIP = @STRIP@
|
||||
TARGET = @TARGET@
|
||||
TARGETDIR = @TARGETDIR@
|
||||
TESTSUBDIR_FALSE = @TESTSUBDIR_FALSE@
|
||||
TESTSUBDIR_TRUE = @TESTSUBDIR_TRUE@
|
||||
VERSION = @VERSION@
|
||||
X86_64_FALSE = @X86_64_FALSE@
|
||||
X86_64_TRUE = @X86_64_TRUE@
|
||||
X86_DARWIN_FALSE = @X86_DARWIN_FALSE@
|
||||
X86_DARWIN_TRUE = @X86_DARWIN_TRUE@
|
||||
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@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
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__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
@@ -185,26 +129,35 @@ build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
@@ -213,6 +166,8 @@ target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
toolexecdir = @toolexecdir@
|
||||
toolexeclibdir = @toolexeclibdir@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = foreign dejagnu
|
||||
|
||||
# Setup the testing framework, if you have one
|
||||
@@ -263,10 +218,6 @@ mostlyclean-libtool:
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
@@ -279,11 +230,13 @@ check-DEJAGNU: site.exp
|
||||
EXPECT=$(EXPECT); export EXPECT; \
|
||||
runtest=$(RUNTEST); \
|
||||
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
|
||||
l='$(DEJATOOL)'; for tool in $$l; do \
|
||||
$$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
|
||||
exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
|
||||
if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
|
||||
then :; else exit_status=1; fi; \
|
||||
done; \
|
||||
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
|
||||
fi
|
||||
fi; \
|
||||
exit $$exit_status
|
||||
site.exp: Makefile
|
||||
@echo 'Making a new site.exp file...'
|
||||
@echo '## these variables are automatically generated by make ##' >site.tmp
|
||||
@@ -311,22 +264,21 @@ distclean-DEJAGNU:
|
||||
done
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
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; \
|
||||
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 \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
@@ -373,8 +325,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-DEJAGNU distclean-generic \
|
||||
distclean-libtool
|
||||
distclean-am: clean-am distclean-DEJAGNU distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
@@ -388,12 +339,20 @@ info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
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
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
@@ -412,17 +371,21 @@ ps: 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 \
|
||||
clean-libtool distclean distclean-DEJAGNU distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
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 \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
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.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
||||
@@ -120,7 +120,7 @@ proc libffi-init { args } {
|
||||
if { [is_remote host] == 0 && [which $compiler] != 0 } {
|
||||
foreach i "[exec $compiler --print-multi-lib]" {
|
||||
set mldir ""
|
||||
regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
|
||||
regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
|
||||
set mldir [string trimright $mldir "\;@"]
|
||||
if { "$mldir" == "." } {
|
||||
continue
|
||||
|
||||
@@ -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
|
||||
# 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
|
||||
# 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.
|
||||
|
||||
@@ -23,10 +23,7 @@ libffi-init
|
||||
|
||||
global srcdir subdir
|
||||
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O0 -W -Wall" ""
|
||||
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-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" ""
|
||||
|
||||
dg-finish
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
#include "ffitest.h"
|
||||
|
||||
static void
|
||||
closure_test_fn0(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata)
|
||||
closure_test_fn0(ffi_cif* cif,void* resp,void** args, void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp =
|
||||
(int)*(unsigned long long *)args[0] + (int)(*(int *)args[1]) +
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#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)
|
||||
{
|
||||
*(ffi_arg*)resp =
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#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)
|
||||
{
|
||||
*(ffi_arg*)resp =
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#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)
|
||||
{
|
||||
*(ffi_arg*)resp =
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
#include "ffitest.h"
|
||||
|
||||
static void
|
||||
closure_test_fn0(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata)
|
||||
closure_test_fn0(ffi_cif* cif,void* resp,void** args, void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp =
|
||||
(int)*(unsigned long long *)args[0] + (int)*(unsigned long long *)args[1] +
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
Originator: <andreast@gcc.gnu.org> 20031026 */
|
||||
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
|
||||
#include "ffitest.h"
|
||||
|
||||
static void
|
||||
closure_test_fn5(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata)
|
||||
closure_test_fn5(ffi_cif* cif,void* resp,void** args, void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp =
|
||||
(int)*(unsigned long long *)args[0] + (int)*(unsigned long long *)args[1] +
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_12byte cls_struct_12byte_fn(struct cls_struct_12byte b1,
|
||||
return result;
|
||||
}
|
||||
|
||||
static void cls_struct_12byte_gn(ffi_cif* cif __UNUSED__, void* resp,
|
||||
void** args , void* userdata __UNUSED__)
|
||||
static void cls_struct_12byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_12byte b1, b2;
|
||||
|
||||
|
||||
@@ -29,8 +29,7 @@ cls_struct_16byte cls_struct_16byte_fn(struct cls_struct_16byte b1,
|
||||
return result;
|
||||
}
|
||||
|
||||
static void cls_struct_16byte_gn(ffi_cif* cif __UNUSED__, void* resp,
|
||||
void** args, void* userdata __UNUSED__)
|
||||
static void cls_struct_16byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_16byte b1, b2;
|
||||
|
||||
|
||||
@@ -33,8 +33,7 @@ cls_struct_18byte cls_struct_18byte_fn(struct cls_struct_18byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_18byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_18byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_18byte a1, a2;
|
||||
|
||||
|
||||
@@ -36,8 +36,7 @@ cls_struct_19byte cls_struct_19byte_fn(struct cls_struct_19byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_19byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_19byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_19byte a1, a2;
|
||||
|
||||
|
||||
@@ -26,8 +26,7 @@ cls_struct_1_1byte cls_struct_1_1byte_fn(struct cls_struct_1_1byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_1_1byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_1_1byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_1_1byte a1, a2;
|
||||
|
||||
@@ -29,8 +29,7 @@ cls_struct_20byte cls_struct_20byte_fn(struct cls_struct_20byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_20byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_20byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_20byte a1, a2;
|
||||
|
||||
|
||||
@@ -29,8 +29,7 @@ cls_struct_20byte cls_struct_20byte_fn(struct cls_struct_20byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_20byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_20byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_20byte a1, a2;
|
||||
|
||||
|
||||
@@ -38,8 +38,7 @@ cls_struct_24byte cls_struct_24byte_fn(struct cls_struct_24byte b0,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_24byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_24byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_24byte b0, b1, b2, b3;
|
||||
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_2byte cls_struct_2byte_fn(struct cls_struct_2byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_2byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_2byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_2byte a1, a2;
|
||||
|
||||
@@ -32,8 +32,7 @@ cls_struct_3_1byte cls_struct_3_1byte_fn(struct cls_struct_3_1byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_3_1byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_3_1byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_3_1byte a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_3byte cls_struct_3byte_fn(struct cls_struct_3byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_3byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_3byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_3byte a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_3byte_1 cls_struct_3byte_fn1(struct cls_struct_3byte_1 a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_3byte_gn1(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_3byte_gn1(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_3byte_1 a1, a2;
|
||||
|
||||
@@ -34,8 +34,7 @@ cls_struct_4_1byte cls_struct_4_1byte_fn(struct cls_struct_4_1byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_4_1byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_4_1byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_4_1byte a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_4byte cls_struct_4byte_fn(struct cls_struct_4byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_4byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_4byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_4byte a1, a2;
|
||||
|
||||
@@ -36,8 +36,7 @@ cls_struct_5byte cls_struct_5byte_fn(struct cls_struct_5byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_5byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_5byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_5byte a1, a2;
|
||||
|
||||
@@ -31,8 +31,7 @@ cls_struct_5byte cls_struct_5byte_fn(struct cls_struct_5byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_5byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_5byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_5byte a1, a2;
|
||||
|
||||
@@ -43,8 +43,7 @@ cls_struct_64byte cls_struct_64byte_fn(struct cls_struct_64byte b0,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_64byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_64byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_64byte b0, b1, b2, b3;
|
||||
|
||||
|
||||
@@ -38,8 +38,7 @@ cls_struct_6byte cls_struct_6byte_fn(struct cls_struct_6byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_6byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_6byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_6byte a1, a2;
|
||||
|
||||
@@ -33,8 +33,7 @@ cls_struct_6byte cls_struct_6byte_fn(struct cls_struct_6byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_6byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_6byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_6byte a1, a2;
|
||||
|
||||
@@ -40,8 +40,7 @@ cls_struct_7byte cls_struct_7byte_fn(struct cls_struct_7byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_7byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_7byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_7byte a1, a2;
|
||||
|
||||
@@ -33,8 +33,7 @@ cls_struct_7byte cls_struct_7byte_fn(struct cls_struct_7byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_7byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_7byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_7byte a1, a2;
|
||||
|
||||
@@ -27,8 +27,7 @@ cls_struct_8byte cls_struct_8byte_fn(struct cls_struct_8byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_8byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_8byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_8byte a1, a2;
|
||||
|
||||
@@ -29,8 +29,8 @@ cls_struct_9byte cls_struct_9byte_fn(struct cls_struct_9byte b1,
|
||||
return result;
|
||||
}
|
||||
|
||||
static void cls_struct_9byte_gn(ffi_cif* cif __UNUSED__, void* resp,
|
||||
void** args, void* userdata __UNUSED__)
|
||||
static void cls_struct_9byte_gn(ffi_cif* cif, void* resp, void** args,
|
||||
void* userdata)
|
||||
{
|
||||
struct cls_struct_9byte b1, b2;
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ cls_struct_9byte cls_struct_9byte_fn(struct cls_struct_9byte b1,
|
||||
return result;
|
||||
}
|
||||
|
||||
static void cls_struct_9byte_gn(ffi_cif* cif __UNUSED__, void* resp,
|
||||
void** args, void* userdata __UNUSED__)
|
||||
static void cls_struct_9byte_gn(ffi_cif* cif, void* resp, void** args,
|
||||
void* userdata)
|
||||
{
|
||||
struct cls_struct_9byte b1, b2;
|
||||
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -29,8 +29,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -19,19 +19,16 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
struct cls_struct_align result;
|
||||
|
||||
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;
|
||||
|
||||
printf("%d %lu %d %d %lu %d: %d %lu %d\n", a1.a, (unsigned long)a1.b, a1.c,
|
||||
a2.a, (unsigned long)a2.b, a2.c, result.a, (unsigned long)result.b,
|
||||
result.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);
|
||||
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
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);
|
||||
/* { 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" } */
|
||||
|
||||
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);
|
||||
/* { 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" } */
|
||||
|
||||
exit(0);
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_double_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
static void cls_ret_double_fn(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(double *)resp = *(double *)args[0];
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_float_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
static void cls_ret_float_fn(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(float *)resp = *(float *)args[0];
|
||||
|
||||
|
||||
@@ -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,
|
||||
void *data __UNUSED__)
|
||||
static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
|
||||
{
|
||||
signed char a1, a2;
|
||||
|
||||
@@ -68,7 +67,7 @@ int main (void)
|
||||
|
||||
ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
|
||||
/* { dg-output "2 125: 127" } */
|
||||
printf("res: %d\n", (signed char)res_call);
|
||||
printf("res: %d\n", res_call);
|
||||
/* { dg-output "\nres: 127" } */
|
||||
|
||||
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);
|
||||
|
||||
@@ -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,
|
||||
void *data __UNUSED__)
|
||||
static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
|
||||
{
|
||||
signed short a1, a2;
|
||||
|
||||
@@ -68,7 +67,7 @@ int main (void)
|
||||
|
||||
ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
|
||||
/* { dg-output "2 32765: 32767" } */
|
||||
printf("res: %d\n", (unsigned short)res_call);
|
||||
printf("res: %d\n", res_call);
|
||||
/* { dg-output "\nres: 32767" } */
|
||||
|
||||
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);
|
||||
|
||||
@@ -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,
|
||||
void *data __UNUSED__)
|
||||
static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
|
||||
{
|
||||
signed char a1, a3;
|
||||
signed short a2, a4;
|
||||
@@ -80,7 +79,7 @@ int main (void)
|
||||
|
||||
ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
|
||||
/* { 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" } */
|
||||
|
||||
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);
|
||||
|
||||
@@ -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,
|
||||
void *data __UNUSED__)
|
||||
static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
|
||||
{
|
||||
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,
|
||||
unsigned char, unsigned char);
|
||||
|
||||
void test_func(ffi_cif *cif __UNUSED__, void *rval __UNUSED__, void **avals,
|
||||
void *data __UNUSED__)
|
||||
void test_func(ffi_cif *cif, void *rval, void **avals, void *data)
|
||||
{
|
||||
printf("%d %d %d %d\n", *(unsigned char *)avals[0],
|
||||
*(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);
|
||||
/* { 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" } */
|
||||
|
||||
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);
|
||||
|
||||
@@ -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,
|
||||
void *data __UNUSED__)
|
||||
static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
|
||||
{
|
||||
unsigned short a1, a2;
|
||||
|
||||
@@ -68,7 +67,7 @@ int main (void)
|
||||
|
||||
ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
|
||||
/* { dg-output "2 32765: 32767" } */
|
||||
printf("res: %d\n", (unsigned short)res_call);
|
||||
printf("res: %d\n", res_call);
|
||||
/* { dg-output "\nres: 32767" } */
|
||||
|
||||
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);
|
||||
|
||||
@@ -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,
|
||||
void *data __UNUSED__)
|
||||
static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
|
||||
{
|
||||
unsigned char a1, a3;
|
||||
unsigned short a2, a4;
|
||||
@@ -80,7 +79,7 @@ int main (void)
|
||||
|
||||
ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
|
||||
/* { 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" } */
|
||||
|
||||
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_schar_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
static void cls_ret_schar_fn(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp = *(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);
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_sint_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
static void cls_ret_sint_fn(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp = *(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);
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_sshort_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
static void cls_ret_sshort_fn(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp = *(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);
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_uchar_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
static void cls_ret_uchar_fn(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp = *(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);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user