diff options
author | Bo Thorsen <bo@suse.de> | 2002-07-18 23:08:31 +0000 |
---|---|---|
committer | Bo Thorsen <bo@gcc.gnu.org> | 2002-07-19 01:08:31 +0200 |
commit | c94974caeddd0561408261d5c2a37331edc8a52e (patch) | |
tree | 31860a62cf64b5a75a76259340d1e0a1ac48ef45 /libffi/src/prep_cif.c | |
parent | ad28cff7c180b612f54512fd7f7ed7b11f09fc05 (diff) | |
download | gcc-c94974caeddd0561408261d5c2a37331edc8a52e.zip gcc-c94974caeddd0561408261d5c2a37331edc8a52e.tar.gz gcc-c94974caeddd0561408261d5c2a37331edc8a52e.tar.bz2 |
[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
Diffstat (limited to 'libffi/src/prep_cif.c')
-rw-r--r-- | libffi/src/prep_cif.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libffi/src/prep_cif.c b/libffi/src/prep_cif.c index d53981a..9851364 100644 --- a/libffi/src/prep_cif.c +++ b/libffi/src/prep_cif.c @@ -103,7 +103,9 @@ ffi_status ffi_prep_cif(/*@out@*/ /*@partial@*/ ffi_cif *cif, /* Perform a sanity check on the return type */ FFI_ASSERT(ffi_type_test(cif->rtype)); -#ifndef M68K + /* x86-64 and s390 stack space allocation is handled in prep_machdep. + TODO: Disable this for s390 too? */ +#if !defined M68K && !defined __x86_64__ /* Make space for the return structure pointer */ if (cif->rtype->type == FFI_TYPE_STRUCT #ifdef SPARC @@ -122,6 +124,8 @@ ffi_status ffi_prep_cif(/*@out@*/ /*@partial@*/ ffi_cif *cif, if (((*ptr)->size == 0) && (initialize_aggregate((*ptr)) != FFI_OK)) return FFI_BAD_TYPEDEF; + /* TODO: Disable this calculation for s390 too? */ +#ifndef __x86_64__ #ifdef SPARC if (((*ptr)->type == FFI_TYPE_STRUCT && ((*ptr)->size > 16 || cif->abi != FFI_V9)) @@ -137,6 +141,7 @@ ffi_status ffi_prep_cif(/*@out@*/ /*@partial@*/ ffi_cif *cif, bytes += STACK_ARG_SIZE((*ptr)->size); } +#endif } cif->bytes = bytes; |