This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
As could be seen by the many testsuite failures, the previous
implementation didn't support long double. Nor did it correctly
support homogenous floating point aggregate structures.
I've rewritten it from scratch, so I'm posting the new files
instead of diffs.
r~
* 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.
Index: src/types.c
===================================================================
RCS file: /cvs/gcc/gcc/libffi/src/types.c,v
retrieving revision 1.17
diff -c -p -d -r1.17 types.c
*** src/types.c 13 Oct 2004 17:20:24 -0000 1.17
--- src/types.c 31 Dec 2004 20:08:56 -0000
*************** FFI_INTEGRAL_TYPEDEF(uint32, 4, 4, FFI_T
*** 42,64 ****
FFI_INTEGRAL_TYPEDEF(sint32, 4, 4, FFI_TYPE_SINT32);
FFI_INTEGRAL_TYPEDEF(float, 4, 4, FFI_TYPE_FLOAT);
! #if defined ALPHA || defined SPARC64 || defined X86_64 || defined S390X \
! || defined IA64 || defined POWERPC64
!
! FFI_INTEGRAL_TYPEDEF(pointer, 8, 8, FFI_TYPE_POINTER);
!
! #else
!
! FFI_INTEGRAL_TYPEDEF(pointer, 4, 4, FFI_TYPE_POINTER);
!
! #endif
!
! #if defined X86 || defined ARM || defined M68K
!
! FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
! FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
! #elif defined SH
FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
--- 42,50 ----
FFI_INTEGRAL_TYPEDEF(sint32, 4, 4, FFI_TYPE_SINT32);
FFI_INTEGRAL_TYPEDEF(float, 4, 4, FFI_TYPE_FLOAT);
! FFI_INTEGRAL_TYPEDEF(pointer, sizeof(void*), sizeof(void*), FFI_TYPE_POINTER);
! #if defined X86 || defined ARM || defined M68K || SH
FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
*************** FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16,
*** 99,105 ****
FFI_INTEGRAL_TYPEDEF(longdouble, 16, 8, FFI_TYPE_LONGDOUBLE);
#endif
! #elif defined X86_64 || defined POWERPC64
FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE);
FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE);
--- 85,91 ----
FFI_INTEGRAL_TYPEDEF(longdouble, 16, 8, FFI_TYPE_LONGDOUBLE);
#endif
! #elif defined X86_64 || defined POWERPC64 || defined IA64
FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE);
FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE);
*************** FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_T
*** 110,113 ****
FFI_INTEGRAL_TYPEDEF(longdouble, 8, 8, FFI_TYPE_LONGDOUBLE);
#endif
-
--- 96,98 ----
Index: src/ia64/ffitarget.h
===================================================================
RCS file: /cvs/gcc/gcc/libffi/src/ia64/ffitarget.h,v
retrieving revision 1.1
diff -c -p -d -r1.1 ffitarget.h
*** src/ia64/ffitarget.h 21 Oct 2003 19:07:50 -0000 1.1
--- src/ia64/ffitarget.h 31 Dec 2004 20:08:56 -0000
*************** typedef enum ffi_abi {
*** 45,58 ****
/* can be interpreted as a C function */
/* descriptor: */
- #ifndef LIBFFI_ASM
- struct ffi_ia64_trampoline_struct {
- void * code_pointer; /* Pointer to ffi_closure_UNIX */
- void * fake_gp; /* Pointer to closure, installed as gp */
- void * real_gp; /* Real gp value, reinstalled by */
- /* ffi_closure_UNIX. */
- };
- #endif
-
#endif
--- 45,49 ----
Attachment:
ffi.c
Description: Text document
Attachment:
unix.S
Description: Text document
Attachment:
ia64_flags.h
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |