Commit Graph

280 Commits

Author SHA1 Message Date
Thiemo Seufer
8a39029d19 ffitarget.h: Remove obsolete sgidefs.h include.
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.

From-SVN: r108165
2005-12-07 14:56:38 +00:00
Alan Modra
cd4241aa71 ffi.c: Formatting.
* src/powerpc/ffi.c: Formatting.
	(ffi_prep_args_SYSV): Avoid possible aliasing problems by using unions.
	(ffi_prep_args64): Likewise.

From-SVN: r107963
2005-12-03 10:36:33 +10:30
Andreas Jaeger
44bcbae366 .cvsignore are not needed for subversion, remove them.
From-SVN: r106279
2005-10-31 18:20:58 +01:00
Geoffrey Keating
0363db460d libffi-dg.exp (libffi_target_compile): For darwin, use -shared-libgcc not -lgcc_s, and explain why.
* testsuite/lib/libffi-dg.exp (libffi_target_compile): For
	darwin, use -shared-libgcc not -lgcc_s, and explain why.

From-SVN: r104847
2005-10-01 06:11:29 +00:00
Tom Tromey
d674eb2f5c float1.c (value_type): New typedef.
* testsuite/libffi.call/float1.c (value_type): New typedef.
	(CANARY): New define.
	(main): Check for result buffer overflow.
	* src/powerpc/linux64.S: Handle linux64 long double returns.
	* src/powerpc/ffi.c (FLAG_RETURNS_128BITS): New constant.
	(ffi_prep_cif_machdep): Handle linux64 long double returns.

From-SVN: r104660
2005-09-26 19:56:22 +00:00
Alan Modra
2d9c5743d6 re PR target/23404 (gij trashes args of functions with more than 8 fp args)
PR target/23404
	* src/powerpc/ffi.c (ffi_prep_args_SYSV): Correct placement of stack
	homed fp args.
	(ffi_status ffi_prep_cif_machdep): Correct stack sizing for same.

From-SVN: r103462
2005-08-25 10:24:54 +09:30
Jakub Jelinek
8a42356f48 configure.ac (HAVE_HIDDEN_VISIBILITY_ATTRIBUTE): New test.
* configure.ac (HAVE_HIDDEN_VISIBILITY_ATTRIBUTE): New test.
	(AH_BOTTOM): Add FFI_HIDDEN definition.
	* configure: Rebuilt.
	* fficonfig.h.in: Rebuilt.
	* src/powerpc/ffi.c (hidden): Remove.
	(ffi_closure_LINUX64, ffi_prep_args64, ffi_call_LINUX64,
	ffi_closure_helper_LINUX64): Use FFI_HIDDEN instead of hidden.
	* src/powerpc/linux64_closure.S (ffi_closure_LINUX64,
	.ffi_closure_LINUX64): Use FFI_HIDDEN instead of .hidden.
	* src/x86/ffi.c (ffi_closure_SYSV, ffi_closure_raw_SYSV): Remove,
	add FFI_HIDDEN to its prototype.
	(ffi_closure_SYSV_inner): New.
	* src/x86/sysv.S (ffi_closure_SYSV, ffi_closure_raw_SYSV): New.
	* src/x86/win32.S (ffi_closure_SYSV, ffi_closure_raw_SYSV): New.

From-SVN: r103002
2005-08-11 23:18:24 +02:00
Alfred M. Szmidt
863c5508d3 re PR libffi/21819 (i*86-*-gnu* not enabled in configure.ac)
2005-08-10  Alfred M. Szmidt  <ams@gnu.org>

	PR libffi/21819:
	* configure: Rebuilt.
	* configure.ac: Handle i*86-*-gnu*.

From-SVN: r102953
2005-08-10 17:19:03 +00:00
Jakub Jelinek
6a26ea58f6 ppc_closure.S (ffi_closure_SYSV): Use DW_CFA_offset_extended_sf rather than DW_CFA_GNU_negative_offset_extended.
* src/powerpc/ppc_closure.S (ffi_closure_SYSV): Use
	DW_CFA_offset_extended_sf rather than
	DW_CFA_GNU_negative_offset_extended.
	* src/powerpc/sysv.S (ffi_call_SYSV): Likewise.

From-SVN: r102900
2005-08-09 10:06:16 +02:00
SUGIOKA Toshinobu
583a92e874 sysv.S (ffi_call_SYSV): Stop argument popping correctly on sh3.
* src/sh/sysv.S (ffi_call_SYSV): Stop argument popping correctly
	on sh3.
	(ffi_closure_SYSV): Change the stack layout for sh3 struct argument.
	* src/sh/ffi.c (ffi_prep_args): Fix sh3 argument copy, when it is
	partially on register.
	(ffi_closure_helper_SYSV): Likewise.
	(ffi_prep_cif_machdep): Don't set too many cif->flags.

From-SVN: r102298
2005-07-22 22:56:27 +00:00
Kaz Kojima
5d0317fccc ffi.c (ffi_call): Handle small structures correctly.
* src/sh/ffi.c (ffi_call): Handle small structures correctly.
	Remove empty line.
	* src/sh64/ffi.c (simple_type): Remove.
	(return_type): Handle small structures correctly.
	(ffi_prep_args): Likewise.
	(ffi_call): Likewise.
	(ffi_closure_helper_SYSV): Likewise.
	* src/sh64/sysv.S (ffi_call_SYSV): Handle 1, 2 and 4-byte return.
	Emit position independent code if PIC and remove wrong datalabel
	prefixes from EH data.

From-SVN: r102210
2005-07-20 23:32:01 +00:00
Andreas Tobler
8d9fd5f5eb 2005-07-19 Andreas Tobler <a.tobler@schweiz.ch>
push the missing CL.

From-SVN: r102175
2005-07-19 23:17:06 +02:00
Andreas Tobler
970676420b Makefile.am (nodist_libffi_la_SOURCES): Add POWERPC_FREEBSD.
2005-07-19  Andreas Tobler  <a.tobler@schweiz.ch>

	* Makefile.am (nodist_libffi_la_SOURCES): Add POWERPC_FREEBSD.
	* Makefile.in: Regenerate.
	* include/Makefile.in: Likewise.
	* testsuite/Makefile.in: Likewise.
	* configure.ac: Add POWERPC_FREEBSD rules.
	* configure: Regenerate.
	* src/powerpc/ffitarget.h: Add POWERPC_FREEBSD rules.
	(FFI_SYSV_TYPE_SMALL_STRUCT): Define.
	* src/powerpc/ffi.c: Add flags to handle small structure returns
	in ffi_call_SYSV.
	(ffi_prep_cif_machdep): Handle small structures for SYSV 4 ABI.
	Aka FFI_SYSV.
	(ffi_closure_helper_SYSV): Likewise.
	* src/powerpc/ppc_closure.S: Add return types for small structures.
	* src/powerpc/sysv.S: Add bits to handle small structures for
	final SYSV 4 ABI

From-SVN: r102174
2005-07-19 23:15:36 +02:00
Andreas Tobler
93c76f816d cls_5_1_byte.c: New test file.
2005-07-10  Andreas Tobler  <a.tobler@schweiz.ch>

	* testsuite/libffi.call/cls_5_1_byte.c: New test file.
	* testsuite/libffi.call/cls_6_1_byte.c: Likewise.
	* testsuite/libffi.call/cls_7_1_byte.c: Likewise.

From-SVN: r101855
2005-07-10 22:14:37 +02:00
Randolph Chung
b65da30441 ffi.c (ffi_struct_type): Rename FFI_TYPE_SMALL_STRUCT1 as FFI_TYPE_SMALL_STRUCT3.
* src/pa/ffi.c (ffi_struct_type): Rename FFI_TYPE_SMALL_STRUCT1
	as FFI_TYPE_SMALL_STRUCT3.  Break out handling for 5-7 byte
	structures.  Kill compilation warnings.
	(ffi_closure_inner_LINUX): Print return values as hex in debug
	message.  Rename FFI_TYPE_SMALL_STRUCT1 as FFI_TYPE_SMALL_STRUCT3.
	Properly handle 5-7 byte structure returns.
	* src/pa/ffitarget.h (FFI_TYPE_SMALL_STRUCT1)
	(FFI_TYPE_SMALL_STRUCT2): Remove.
	(FFI_TYPE_SMALL_STRUCT3, FFI_TYPE_SMALL_STRUCT5)
	(FFI_TYPE_SMALL_STRUCT6, FFI_TYPE_SMALL_STRUCT7): Define.
	* src/pa/linux.S: Mark source file as using PA1.1 assembly.
	(checksmst1, checksmst2): Remove.
	(checksmst3): Optimize handling of 3-byte struct returns.
	(checksmst567): Properly handle 5-7 byte struct returns.

From-SVN: r101650
2005-07-06 03:37:20 +00:00
Rainer Orth
2572f1c610 re PR libffi/21943 (O32 libffi.so fails to link on IRIX 6)
PR libgcj/21943
	* src/mips/n32.S: Enforce PIC code.
	* src/mips/o32.S: Likewise.

From-SVN: r100961
2005-06-15 00:10:05 +00:00
Rainer Orth
cc786582dd configure.ac: Treat i*86-*-solaris2.10 and up as X86_64.
* configure.ac: Treat i*86-*-solaris2.10 and up as X86_64.
	* configure: Regenerate.

From-SVN: r100959
2005-06-14 23:37:05 +00:00
Alan Modra
6d0d376c8f ppc_closure.S (ffi_closure_SYSV): Don't use JUMPTARGET to call ffi_closure_helper_SYSV.
* src/powerpc/ppc_closure.S (ffi_closure_SYSV): Don't use JUMPTARGET
	to call ffi_closure_helper_SYSV.  Append @local instead.
	* src/powerpc/sysv.S (ffi_call_SYSV): Likewise for ffi_prep_args_SYSV.

From-SVN: r100416
2005-06-01 10:03:09 +09:30
R. Kelley Cook
a21946f5a4 Fixup the date of last entry
From-SVN: r99881
2005-05-18 02:05:35 +00:00
Kelley Cook
a097ef55fc configure.ac: Use AC_C_BIGENDIAN instead of AC_C_BIGENDIAN_CROSS.
2005-05-03  Kelley Cook  <kcook@gcc.gnu.org>

	* configure.ac: Use AC_C_BIGENDIAN instead of AC_C_BIGENDIAN_CROSS.
	Use AC_CHECK_SIZEOF instead of AC_COMPILE_CHECK_SIZEOF.
	* Makefile.am (ACLOCAL_AMFLAGS): Remove -I ../config.
	* aclocal.m4, configure, fficonfig.h.in, Makefile.in,
	include/Makefile.in, testsuite/Makefile.in: Regenerate.

From-SVN: r99879
2005-05-18 01:49:43 +00:00
Mike Stump
f4c767fdc2 * configure: Regenerate.
From-SVN: r99498
2005-05-10 01:43:00 +00:00
Richard Henderson
7e15b5fe4c re PR libffi/21285 (gij fails to handle NullPointerException exception)
PR libffi/21285
        * src/alpha/osf.S: Update unwind into to match code.

From-SVN: r99415
2005-05-08 16:23:50 -07:00
Richard Henderson
d56ea8d9a9 ffi64.c (ffi_prep_cif_machdep): Save sse-used flag in bit 11 of flags.
* src/x86/ffi64.c (ffi_prep_cif_machdep): Save sse-used flag in
        bit 11 of flags.
        (ffi_call): Mask return type field.  Pass ssecount to ffi_call_unix64.
        (ffi_prep_closure): Set carry bit if sse-used flag set.
        * src/x86/unix64.S (ffi_call_unix64): Add ssecount argument.
        Only load sse registers if ssecount non-zero.
        (ffi_closure_unix64): Only save sse registers if carry set on entry.

From-SVN: r99257
2005-05-04 21:06:38 -07:00
Ralf Corsepius
d266a2ff52 Fix typo in previous patch.
From-SVN: r98984
2005-04-29 15:15:01 +02:00
Ralf Corsepius
d948c2019d configure.ac: Add i*86-*-rtems*, sparc*-*-rtems*, powerpc-*rtems*, arm*-*-rtems*, sh-*-rtems*.
2005-05-29  Ralf Corsepius  <ralf.corsepius@rtems.org>

	* configure.ac: Add i*86-*-rtems*, sparc*-*-rtems*,
	powerpc-*rtems*, arm*-*-rtems*, sh-*-rtems*.
	* configure: Regenerate.

From-SVN: r98983
2005-04-29 15:03:43 +02:00
Hans-Peter Nilsson
fc0ad8d961 libffi-dg.exp (libffi-dg-test-1): In regsub use, have Tcl8.3-compatible intermediate variable.
* testsuite/lib/libffi-dg.exp (libffi-dg-test-1): In regsub use,
	have Tcl8.3-compatible intermediate variable.

From-SVN: r98453
2005-04-20 10:59:26 +00:00
Hans-Peter Nilsson
29ede6dbb7 Add include/Makefile.in to last entry
From-SVN: r98333
2005-04-18 17:13:32 +00:00
Simon Posnjak
614348bbec Makefile.am: Add CRIS support.
* Makefile.am: Add CRIS support.
	* configure.ac: Likewise.
	* Makefile.in, configure, testsuite/Makefile.in: Regenerate.
	* src/cris: New directory.
	* src/cris/ffi.c, src/cris/sysv.S, src/cris/ffitarget.h: New files.
	* src/prep_cif.c (ffi_prep_cif): Wrap in #ifndef __CRIS__.

Co-Authored-By: Hans-Peter Nilsson <hp@axis.com>

From-SVN: r98332
2005-04-18 17:08:58 +00:00
Hans-Peter Nilsson
727e729b8f libffi-dg.exp (libffi-dg-test-1): Replace \n with \r?\n in output tests.
* testsuite/lib/libffi-dg.exp (libffi-dg-test-1): Replace \n with
	\r?\n in output tests.

From-SVN: r98329
2005-04-18 16:31:10 +00:00
Mike Stump
6dab073ba7 * configure: Regenerate.
From-SVN: r98065
2005-04-13 01:41:26 +00:00
Hans Boehm
51f55d7c89 * src/ia64/ffitarget.h (ffi_arg): Use long long instead of DI.
From-SVN: r97303
2005-03-31 01:22:46 +00:00
Steve Ellcey
7efa52a3e5 * src/ia64/ffitarget.h (ffi_arg) ADD DI attribute.
(ffi_sarg) Ditto.
	* src/ia64/unix.S (ffi_closure_unix): Extend gp
	to 64 bits in ILP32 mode.
	Load 64 bits even for short data.

From-SVN: r97283
2005-03-30 21:49:19 +00:00
Mike Stump
1488177afe darwin.S: Update for -m64 multilib.
* src/powerpc/darwin.S: Update for -m64 multilib.
        * src/powerpc/darwin_closure.S: Likewise.

From-SVN: r96967
2005-03-24 00:45:38 +00:00
Zack Weinberg
c690027275 configure.ac: Do not invoke TL_AC_GCC_VERSION.
* configure.ac: Do not invoke TL_AC_GCC_VERSION.
	Do not set tool_include_dir.
	* aclocal.m4, configure, Makefile.in, testsuite/Makefile.in:
	Regenerate.
	* include/Makefile.am: Set gcc_version and toollibffidir.
	* include/Makefile.in: Regenerate.

From-SVN: r96823
2005-03-21 18:01:47 +00:00
Andrew Haley
962eea0a03 re PR libffi/20104 (gij fails on ppc and not on x86)
2005-02-22  Andrew Haley  <aph@redhat.com>

	PR libffi/20104
        * src/powerpc/ffi.c (ffi_prep_cif_machdep): Bump alignment to
        odd-numbered register pairs for 64-bit integer types.

From-SVN: r95455
2005-02-23 14:05:13 +00:00
Andreas Tobler
1b05e8bf3c re PR libffi/20104 (gij fails on ppc and not on x86)
2005-02-23  Andreas Tobler  <a.tobler@schweiz.ch>

	PR libffi/20104
	* testsuite/libffi.call/return_ll1.c: New test case.

From-SVN: r95454
2005-02-23 14:56:01 +01:00
Janis Johnson
6027770b6e cls_align_longdouble.c: Remove dg-options.
* testsuite/libffi.call/cls_align_longdouble.c: Remove dg-options.
	* testsuite/libffi.call/float.c: Ditto.
	* testsuite/libffi.call/float2.c: Ditto.
	* testsuite/libffi.call/float3.c: Ditto.

From-SVN: r94899
2005-02-11 22:33:16 +00:00
Andreas Tobler
ee31ea68f4 ffitarget.h: Remove PPC stuff which does not belong to frv.
2005-02-08  Andreas Tobler  <a.tobler@schweiz.ch>

	* src/frv/ffitarget.h: Remove PPC stuff which does not belong to frv.

From-SVN: r94747
2005-02-08 22:10:50 +01:00
Eric Botcazou
c16be7d515 special.exp (cxx_options): Add -shared-libgcc.
* testsuite/libffi.special/special.exp (cxx_options): Add
	-shared-libgcc.

From-SVN: r93221
2005-01-12 09:06:52 +00:00
Richard Henderson
5df07255e2 types.c (FFI_AGGREGATE_TYPEDEF): Remove.
* src/types.c (FFI_AGGREGATE_TYPEDEF): Remove.
        (FFI_TYPEDEF): Rename from FFI_INTEGRAL_TYPEDEF.  Replace size and
        offset parameters with a type parameter; deduce size and structure
        alignment.  Update all users.

From-SVN: r92775
2004-12-31 14:04:30 -08:00
Richard Henderson
81a69b1333 types.c (FFI_TYPE_POINTER): Define with sizeof.
* src/types.c (FFI_TYPE_POINTER): Define with sizeof.
        (FFI_TYPE_LONGDOUBLE): Fix for ia64.
        * src/ia64/ffitarget.h (struct ffi_ia64_trampoline_struct): Move
        into ffi_prep_closure.
        * src/ia64/ia64_flags.h, src/ia64/ffi.c, src/ia64/unix.S: Rewrite
        from scratch.

From-SVN: r92774
2004-12-31 12:11:17 -08:00
Richard Henderson
d833cfb041 * src/x86/unix64.S: Fix typo in unwind info.
From-SVN: r92636
2004-12-27 01:20:10 -08:00
Richard Henderson
1a0f488c32 ffi64.c (struct register_args): Rename from stackLayout.
* src/x86/ffi64.c (struct register_args): Rename from stackLayout.
        (enum x86_64_reg_class): Add X86_64_COMPLEX_X87_CLASS.
        (merge_classes): Check for it.
        (SSE_CLASS_P): New.
        (classify_argument): Pass byte_offset by value; perform all updates
        inside struct case.
        (examine_argument): Add classes argument; handle
        X86_64_COMPLEX_X87_CLASS.
        (ffi_prep_args): Merge into ...
        (ffi_call): ... here.  Share stack frame with ffi_call_unix64.
        (ffi_prep_cif_machdep): Setup cif->flags for proper structure return.
        (ffi_fill_return_value): Remove.
        (ffi_prep_closure): Remove dead assert.
        (ffi_closure_unix64_inner): Rename from ffi_closure_UNIX64_inner.
        Rewrite to use struct register_args instead of va_list.  Create
        flags for handling structure returns.
        * src/x86/unix64.S: Remove dead strings.
        (ffi_call_unix64): Rename from ffi_call_UNIX64.  Rewrite to share
        stack frame with ffi_call.  Handle structure returns properly.
        (float2sse, floatfloat2sse, double2sse): Remove.
        (sse2float, sse2double, sse2floatfloat): Remove.
        (ffi_closure_unix64): Rename from ffi_closure_UNIX64.  Rewrite
        to handle structure returns properly.

From-SVN: r92602
2004-12-25 01:54:40 -08:00
David Edelsohn
7994d50cfa Makefile.am (AM_MAKEFLAGS): Remove duplicate LIBCFLAGS and PICFLAG.
* Makefile.am (AM_MAKEFLAGS): Remove duplicate LIBCFLAGS and
	PICFLAG.
	* Makefile.in: Regenerated.

From-SVN: r91905
2004-12-08 10:48:53 -05:00
Richard Sandiford
afabd8e62c Introduce and use config/gcc-version.m4.
From-SVN: r91625
2004-12-02 11:05:13 +00:00
Kelley Cook
2539bffe37 libtool.m4 (AC_DEPLIBS_CHECK_METHOD): Re-import linux-gnu case from CVS libtool to always pass_all.
2004-11-29  Kelley Cook  <kcook@gcc.gnu.org>

	* libtool.m4 (AC_DEPLIBS_CHECK_METHOD): Re-import linux-gnu case
	from CVS libtool to always pass_all.

	* libjava/configure, libffi/configure, libjava/configure,
	libobjc/configure, boehm-gc/configure: Regenerated.

From-SVN: r91495
2004-11-29 23:45:23 +00:00
Kelley Cook
767f726e10 libtool.m4 (AC_DEPLIBS_CHECK_METHOD): Revert previous change.
2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>

	* libtool.m4 (AC_DEPLIBS_CHECK_METHOD): Revert previous change.
	* boehm-gc/configure: Regenerate.
	* libffi/configure: Regenerate.
	* libgfortran/configure: Regenerate.
	* libjava/configure: Regenerate.
	* libobjc/configure: Regenerate.
	* libstdc++-v3/configure: Regenerate.
	* zlib/configure: Regenerate.

From-SVN: r91293
2004-11-25 13:43:43 +00:00
John David Anglin
a26e9a2687 * ChangeLog: Remove duplication.
From-SVN: r91265
2004-11-25 00:40:19 +00:00
Kelley Cook
2c92e90fa5 libtool.m4 (AC_DEPLIBS_CHECK_METHOD): Import linux-gnu case from CVS libtool to always pass_all.
2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>

	* libtool.m4 (AC_DEPLIBS_CHECK_METHOD): Import linux-gnu case
	from CVS libtool to always pass_all.
	* boehm-gc/configure: Regenerate.
	* libffi/configure: Regenerate.
	* libgfortran/configure: Regenerate.
	* libjava/configure: Regenerate.
	* libobjc/configure: Regenerate.
	* libstdc++-v3/configure: Regenerate.
	* zlib/configure: Regenerate.

From-SVN: r91200
2004-11-24 22:04:38 +00:00
John David Anglin
1df8e83465 target-libpath.exp: New file defining set_ld_library_path_env_vars and restore_ld_library_path_env_vars.
* lib/target-libpath.exp: New file defining set_ld_library_path_env_vars
	and restore_ld_library_path_env_vars.
	* g++.dg/compat/compat.exp, lib/g++.exp, lib/gcc-dg.exp,
	lib/gfortran.exp, lib/objc.exp, lib/treelang.exp: Use new procs.
	* ada/acats/run_acats (LD_LIBRARY_PATH): Add previous LD_LIBRARY_PATH
	to LD_LIBRARY_PATH.  Export LD_LIBRARY_PATH.

	* testsuite/lib/libffi-dg.exp: Use new procs in target-libpath.exp.

	* testsuite/lib/libjava.exp,
	testsuite/libjava.jacks/jacks.exp: Use new procs in target-libpath.exp.

	* testsuite/lib/libmudflap.exp: Use new procs in target-libpath.exp.

	* testsuite/lib/libstdc++.exp: Use new procs in target-libpath.exp.

From-SVN: r91137
2004-11-24 04:39:41 +00:00