Skip to content

Commit

Permalink
PR libffi/28313
Browse files Browse the repository at this point in the history
	* configure.ac: Don't treat mips64 as a special case.
	* Makefile.am (nodist_libffi_la_SOURCES): Add n32.S.
	* configure: Regenerate
	* Makefile.in: Ditto.
	* fficonfig.h.in: Ditto.
	* src/mips/ffitarget.h (REG_L, REG_S, SUBU, ADDU, SRL, LI): Indent.
	(LA, EH_FRAME_ALIGN, FDE_ADDR_BYTES): New preprocessor macros.
	(FFI_DEFAULT_ABI): Set for n64 case.
	(FFI_CLOSURES, FFI_TRAMPOLINE_SIZE): Define for n32 and n64 cases.
	* src/mips/n32.S (ffi_call_N32): Add debug macros and labels for FDE.
	(ffi_closure_N32): New function.
	(.eh_frame): New section
	* src/mips/o32.S: Clean up comments.
	(ffi_closure_O32): Pass ffi_closure parameter in $12.
	* src/mips/ffi.c: Use FFI_MIPS_N32 instead of
	_MIPS_SIM == _ABIN32 throughout.
	(FFI_MIPS_STOP_HERE): New, use in place of
	ffi_stop_here.
	(ffi_prep_args): Use unsigned long to hold pointer values.  Rewrite
	to support n32/n64 ABIs.
	(calc_n32_struct_flags): Rewrite.
	(calc_n32_return_struct_flags): Remove unused variable.  Reverse
	position of flag bits.
	(ffi_prep_cif_machdep): Rewrite n32 portion.
	(ffi_call): Enable for n64.  Add special handling for small structure
	return values.
	(ffi_prep_closure_loc): Add n32 and n64 support.
	(ffi_closure_mips_inner_O32): Add cast to silence warning.
	(copy_struct_N32, ffi_closure_mips_inner_N32): New functions.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127336 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
daney committed Aug 10, 2007
1 parent ab0ab0a commit edd57a0
Show file tree
Hide file tree
Showing 10 changed files with 635 additions and 96 deletions.
33 changes: 33 additions & 0 deletions libffi/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
2007-08-10 David Daney <[email protected]>

PR libffi/28313
* configure.ac: Don't treat mips64 as a special case.
* Makefile.am (nodist_libffi_la_SOURCES): Add n32.S.
* configure: Regenerate
* Makefile.in: Ditto.
* fficonfig.h.in: Ditto.
* src/mips/ffitarget.h (REG_L, REG_S, SUBU, ADDU, SRL, LI): Indent.
(LA, EH_FRAME_ALIGN, FDE_ADDR_BYTES): New preprocessor macros.
(FFI_DEFAULT_ABI): Set for n64 case.
(FFI_CLOSURES, FFI_TRAMPOLINE_SIZE): Define for n32 and n64 cases.
* src/mips/n32.S (ffi_call_N32): Add debug macros and labels for FDE.
(ffi_closure_N32): New function.
(.eh_frame): New section
* src/mips/o32.S: Clean up comments.
(ffi_closure_O32): Pass ffi_closure parameter in $12.
* src/mips/ffi.c: Use FFI_MIPS_N32 instead of
_MIPS_SIM == _ABIN32 throughout.
(FFI_MIPS_STOP_HERE): New, use in place of
ffi_stop_here.
(ffi_prep_args): Use unsigned long to hold pointer values. Rewrite
to support n32/n64 ABIs.
(calc_n32_struct_flags): Rewrite.
(calc_n32_return_struct_flags): Remove unused variable. Reverse
position of flag bits.
(ffi_prep_cif_machdep): Rewrite n32 portion.
(ffi_call): Enable for n64. Add special handling for small structure
return values.
(ffi_prep_closure_loc): Add n32 and n64 support.
(ffi_closure_mips_inner_O32): Add cast to silence warning.
(copy_struct_N32, ffi_closure_mips_inner_N32): New functions.

2007-08-08 David Daney <[email protected]>

* testsuite/libffi.call/ffitest.h (ffi_type_mylong): Remove definition.
Expand Down
2 changes: 1 addition & 1 deletion libffi/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ if MIPS_IRIX
nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
endif
if MIPS_LINUX
nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S
nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
endif
if X86
nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S
Expand Down
5 changes: 3 additions & 2 deletions libffi/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
@MIPS_IRIX_TRUE@am__append_1 = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
@MIPS_LINUX_TRUE@am__append_2 = src/mips/ffi.c src/mips/o32.S
@MIPS_LINUX_TRUE@am__append_2 = src/mips/ffi.c src/mips/o32.S src/mips/n32.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
Expand Down Expand Up @@ -97,7 +97,8 @@ am_libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
src/raw_api.lo src/java_raw_api.lo src/closures.lo
@MIPS_IRIX_TRUE@am__objects_1 = src/mips/ffi.lo src/mips/o32.lo \
@MIPS_IRIX_TRUE@ src/mips/n32.lo
@MIPS_LINUX_TRUE@am__objects_2 = src/mips/ffi.lo src/mips/o32.lo
@MIPS_LINUX_TRUE@am__objects_2 = src/mips/ffi.lo src/mips/o32.lo \
@MIPS_LINUX_TRUE@ src/mips/n32.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 \
Expand Down
2 changes: 0 additions & 2 deletions libffi/configure
Original file line number Diff line number Diff line change
Expand Up @@ -10324,8 +10324,6 @@ case "$host" in
TARGET=M68K; TARGETDIR=m68k
;;
mips64*-*)
;;
mips-sgi-irix5.* | mips-sgi-irix6.*)
TARGET=MIPS_IRIX; TARGETDIR=mips
;;
Expand Down
2 changes: 0 additions & 2 deletions libffi/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ case "$host" in
TARGET=M68K; TARGETDIR=m68k
;;

mips64*-*)
;;
mips-sgi-irix5.* | mips-sgi-irix6.*)
TARGET=MIPS_IRIX; TARGETDIR=mips
;;
Expand Down
7 changes: 7 additions & 0 deletions libffi/fficonfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
*/
#undef HAVE_AS_SPARC_UA_PCREL

/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H

/* Define if __attribute__((visibility("hidden"))) is supported. */
#undef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE

Expand Down Expand Up @@ -91,6 +94,10 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H

/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR

/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O

Expand Down
Loading

0 comments on commit edd57a0

Please sign in to comment.