Commit Graph

15 Commits

Author SHA1 Message Date
Richard Henderson b1760f7f91 Merge libffi to upstream commit c82cc159426d8d4402375fa1ae3f045b9cf82e16
From-SVN: r219477
2015-01-12 08:19:59 -08:00
Anthony Green b4b575ce78 libffi merge
From-SVN: r194722
2012-12-26 16:28:02 +00:00
Anthony Green 34fa7690ac Merge upstream libffi
From-SVN: r184897
2012-03-04 21:11:09 +00:00
Andreas Schwab c1d5e72390 sysv.S (ffi_call_SYSV): Properly test for plain mc68000.
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
mc68000.  Test for __HAVE_68881__ in addition to __MC68881__.

From-SVN: r183451
2012-01-23 20:00:44 +00:00
Joel Sherrill 9993cf6070 ffi.c: Add RTEMS support for cache flushing.
2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>

	* libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
	Handle case when CPU variant does not have long double support.
	* libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire,
	and cores with soft floating point.

From-SVN: r169938
2011-02-08 19:19:01 +00:00
Andrew Haley 7446546ab0 [multiple changes]
2009-06-04  Andrew Haley  <aph@redhat.com>

	* src/powerpc/ppc_closure.S: Insert licence header.
	* src/powerpc/linux64_closure.S: Likewise.
	* src/m68k/sysv.S: Likewise.

	* src/sh64/ffi.c: Change void (*)() to void (*)(void).
	* src/powerpc/ffi.c: Likewise.
	* src/powerpc/ffi_darwin.c: Likewise.
	* src/m32r/ffi.c: Likewise.
	* src/sh64/ffi.c: Likewise.
	* src/x86/ffi64.c: Likewise.
	* src/alpha/ffi.c: Likewise.
	* src/alpha/osf.S: Likewise.
	* src/frv/ffi.c: Likewise.
	* src/s390/ffi.c: Likewise.
	* src/pa/ffi.c: Likewise.
	* src/pa/hpux32.S: Likewise.
	* src/ia64/unix.S: Likewise.
	* src/ia64/ffi.c: Likewise.
	* src/sparc/ffi.c: Likewise.
	* src/mips/ffi.c: Likewise.
	* src/sh/ffi.c: Likewise.

2008-02-15  David Daney  <ddaney@avtrex.com>

        * src/mips/ffi.c (USE__BUILTIN___CLEAR_CACHE):
        Define (conditionally), and use it to include cachectl.h.
        (ffi_prep_closure_loc): Fix cache flushing.
        * src/mips/ffitarget.h (_ABIN32, _ABI64, _ABIO32): Define.

From-SVN: r148172
2009-06-04 15:43:03 +00:00
Andrew Haley 5f933ef0d8 2009-06-04 Andrew Haley <aph@redhat.com>
include/ffi.h.in,
        src/arm/ffitarget.h,
        src/arm/ffi.c,
        src/arm/sysv.S,
        src/powerpc/ffitarget.h,
        src/closures.c,
        src/sh64/ffitarget.h,
        src/sh64/ffi.c,
        src/sh64/sysv.S,
        src/types.c,
        src/x86/ffi64.c,
        src/x86/ffitarget.h,
        src/x86/win32.S,
        src/x86/darwin.S,
        src/x86/ffi.c,
        src/x86/sysv.S,
        src/x86/unix64.S,
        src/alpha/ffitarget.h,
        src/alpha/ffi.c,
        src/alpha/osf.S,
        src/m68k/ffitarget.h,
        src/frv/ffitarget.h,
        src/frv/ffi.c,
        src/s390/ffitarget.h,
        src/s390/sysv.S,
        src/cris/ffitarget.h,
        src/pa/linux.S,
        src/pa/ffitarget.h,
        src/pa/ffi.c,
        src/raw_api.c,
        src/ia64/ffitarget.h,
        src/ia64/unix.S,
        src/ia64/ffi.c,
        src/ia64/ia64_flags.h,
        src/java_raw_api.c,
        src/debug.c,
        src/sparc/v9.S,
        src/sparc/ffitarget.h,
        src/sparc/ffi.c,
        src/sparc/v8.S,
        src/mips/ffitarget.h,
        src/mips/n32.S,
        src/mips/o32.S,
        src/mips/ffi.c,
        src/prep_cif.c,
        src/sh/ffitarget.h,
        src/sh/ffi.c,
        src/sh/sysv.S: Update license text.

From-SVN: r148171
2009-06-04 15:11:12 +00:00
Matthias Klose feb5153085 [multiple changes]
2008-03-26  Daniel Jacobowitz  <dan@debian.org>

        * src/arm/sysv.S: Fix ARM comment marker.

2008-03-26  Jakub Jelinek  <jakub@redhat.com>

        * src/alpha/osf.S: Add .note.GNU-stack on Linux.
        * src/s390/sysv.S: Likewise.
        * src/powerpc/ppc_closure.S: Likewise.
        * src/powerpc/sysv.S: Likewise.
        * src/x86/unix64.S: Likewise.
        * src/x86/sysv.S: Likewise.
        * src/sparc/v8.S: Likewise.
        * src/sparc/v9.S: Likewise.
        * src/m68k/sysv.S: Likewise.
        * src/arm/sysv.S: Likewise.

From-SVN: r133594
2008-03-26 08:24:42 +00:00
Roman Zippel 5635c26e57 ffi.c (ffi_prep_incoming_args_SYSV, [...]): New, add closure support.
* src/m68k/ffi.c (ffi_prep_incoming_args_SYSV,
	ffi_closure_SYSV_inner,ffi_prep_closure): New, add closure support.
	* src/m68k/sysv.S(ffi_closure_SYSV,ffi_closure_struct_SYSV): Likewise.
	* src/m68k/ffitarget.h (FFI_TRAMPOLINE_SIZE): Likewise.
	(FFI_CLOSURES): Enable closure support.

From-SVN: r124601
2007-05-10 21:29:04 +00:00
Roman Zippel e6fbf387cf configure.ac (HAVE_AS_CFI_PSEUDO_OP): New test.
* configure.ac (HAVE_AS_CFI_PSEUDO_OP): New test.
	* configure: Regenerate.
	* fficonfig.h.in: Regenerate.
	* src/m68k/sysv.S (CFI_STARTPROC,CFI_ENDPROC,
	CFI_OFFSET,CFI_DEF_CFA): New macros.
	(ffi_call_SYSV): Add callframe annotation.

From-SVN: r124600
2007-05-10 21:20:02 +00:00
Roman Zippel b5296e520d ffi.c (ffi_prep_args,ffi_prep_cif_machdep): Fix numerous test suite failures.
* src/m68k/ffi.c (ffi_prep_args,ffi_prep_cif_machdep): Fix
	numerous test suite failures.
	* src/m68k/sysv.S (ffi_call_SYSV): Likewise.

From-SVN: r124599
2007-05-10 21:06:55 +00:00
Andreas Tobler c5a4ab3a8b commit missing adds.
From-SVN: r72767
2003-10-21 21:07:52 +02:00
Andreas Tobler 1450eb7a07 [multiple changes]
2003-10-21  Andreas Tobler  <a.tobler@schweiz.ch>

	* configure.in: AC_LINK_FILES(ffitarget.h).
	* configure: Regenerate.
	* Makefile.in: Likewise.
	* include/Makefile.in: Likewise.
	* testsuite/Makefile.in: Likewise.
	* fficonfig.h.in: Likewise.

2003-10-21  Paolo Bonzini  <bonzini@gnu.org>
	    Richard Henderson  <rth@redhat.com>

	Avoid that ffi.h includes fficonfig.h.

	* Makefile.am (EXTRA_DIST): Include ffitarget.h files
	(TARGET_SRC_MIPS_GCC): Renamed to TARGET_SRC_MIPS_IRIX.
	(TARGET_SRC_MIPS_SGI): Removed.
	(MIPS_GCC): Renamed to TARGET_SRC_MIPS_IRIX.
	(MIPS_SGI): Removed.
	(CLEANFILES): Removed.
	(mostlyclean-am, clean-am, mostlyclean-sub, clean-sub): New
	targets.
	* acconfig.h: Removed.
	* configure.in: Compute sizeofs only for double and long double.
	Use them to define and subst HAVE_LONG_DOUBLE.  Include comments
	into AC_DEFINE instead of using acconfig.h.  Create
	include/ffitarget.h instead of include/fficonfig.h.  Rename
	MIPS_GCC to MIPS_IRIX, drop MIPS_SGI since we are in gcc's tree.
	AC_DEFINE EH_FRAME_FLAGS.
	* include/Makefile.am (DISTCLEANFILES): New automake macro.
	(hack_DATA): Add ffitarget.h.
	* include/ffi.h.in: Remove all system specific definitions.
	Declare raw API even if it is not installed, why bother?
	Use limits.h instead of SIZEOF_* to define ffi_type_*.  Do
	not define EH_FRAME_FLAGS, it is in fficonfig.h now.  Include
	ffitarget.h instead of fficonfig.h.  Remove ALIGN macro.
	(UINT_ARG, INT_ARG): Removed, use ffi_arg and ffi_sarg instead.
	* include/ffi_common.h (bool): Do not define.
	(ffi_assert): Accept failed assertion.
	(ffi_type_test): Return void and accept file/line.
	(FFI_ASSERT): Pass stringized failed assertion.
	(FFI_ASSERT_AT): New macro.
	(FFI_ASSERT_VALID_TYPE): New macro.
	(UINT8, SINT8, UINT16, SINT16, UINT32, SINT32,
	UINT64, SINT64): Define here with gcc's __attribute__ macro
	instead of in ffi.h
	(FLOAT32, ALIGN): Define here instead of in ffi.h
	* include/ffi-mips.h: Removed.  Its content moved to
	src/mips/ffitarget.h after separating assembly and C sections.
	* src/alpha/ffi.c, src/alpha/ffi.c, src/java_raw_api.c
	src/prep_cif.c, src/raw_api.c, src/ia64/ffi.c,
	src/mips/ffi.c, src/mips/n32.S, src/mips/o32.S,
	src/mips/ffitarget.h, src/sparc/ffi.c, src/x86/ffi64.c:
	SIZEOF_ARG -> FFI_SIZEOF_ARG.
	* src/ia64/ffi.c: Include stdbool.h (provided by GCC 2.95+).
	* src/debug.c (ffi_assert): Accept stringized failed assertion.
	(ffi_type_test): Rewritten.
	* src/prep-cif.c (initialize_aggregate, ffi_prep_cif): Call
	FFI_ASSERT_VALID_TYPE.
	* src/alpha/ffitarget.h, src/arm/ffitarget.h,
	src/ia64/ffitarget.h, src/m68k/ffitarget.h,
	src/mips/ffitarget.h, src/powerpc/ffitarget.h,
	src/s390/ffitarget.h, src/sh/ffitarget.h,
	src/sh64/ffitarget.h, src/sparc/ffitarget.h,
	src/x86/ffitarget.h: New files.
	* src/alpha/osf.S, src/arm/sysv.S, src/ia64/unix.S,
	src/m68k/sysv.S, src/mips/n32.S, src/mips/o32.S,
	src/powerpc/aix.S, src/powerpc/darwin.S,
	src/powerpc/ffi_darwin.c, src/powerpc/linux64.S,
	src/powerpc/linux64_closure.S, src/powerpc/ppc_closure.S,
	src/powerpc/sysv.S, src/s390/sysv.S, src/sh/sysv.S,
	src/sh64/sysv.S, src/sparc/v8.S, src/sparc/v9.S,
	src/x86/sysv.S, src/x86/unix64.S, src/x86/win32.S:
	include fficonfig.h

From-SVN: r72766
2003-10-21 21:01:58 +02:00
Bo Thorsen c94974caed [multiple changes]
2002-07-16  Bo Thorsen  <bo@suse.de>

	* src/x86/ffi64.c: New file that adds x86-64 support.
	* src/x86/unix64.S: New file that handles argument setup for
	x86-64.
	* src/x86/sysv.S: Don't use this on x86-64.
	* src/x86/ffi.c: Don't use this on x86-64.
	Remove unused vars.
	* src/prep_cif.c (ffi_prep_cif): Don't do stack size calculation
	for x86-64.
	* src/ffitest.c (struct6): New test that tests a special case in
	the x86-64 ABI.
	(struct7): Likewise.
	(struct8): Likewise.
	(struct9): Likewise.
	(closure_test_fn): Silence warning about this when it's not used.
	(main): Add the new tests.
	(main): Fix a couple of wrong casts and silence some compiler warnings.
	* include/ffi.h.in: Add x86-64 ABI definition.
	* fficonfig.h.in: Regenerate.
	* Makefile.am: Add x86-64 support.
	* configure.in: Likewise.
	* Makefile.in: Regenerate.
	* configure: Likewise.

2002-06-24  Bo Thorsen  <bo@suse.de>

	* src/types.c: Merge settings for similar architectures.
	Add x86-64 sizes and alignments.

2002-06-23  Bo Thorsen  <bo@suse.de>

	* src/arm/ffi.c (ffi_prep_args): Remove unused vars.
	* src/sparc/ffi.c (ffi_prep_args_v8): Likewise.
	* src/mips/ffi.c (ffi_prep_args): Likewise.
	* src/m68k/ffi.c (ffi_prep_args): Likewise.

From-SVN: r55571
2002-07-19 01:08:31 +02:00
Anthony Green 63e5e3e0db Initial revision
From-SVN: r28593
1999-08-08 13:27:18 +00:00