diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-18 12:32:36 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-18 12:32:36 +0000 |
commit | 3647950da6a1b3a9e1653a33fd4b289928610be3 (patch) | |
tree | 6d11613a6465cc0f53789e34009ab2f57cfbaf75 /libffi/include | |
parent | 8fb55fe1967b15e53bfc4e6369bfeceddf897fe1 (diff) | |
download | gcc-3647950da6a1b3a9e1653a33fd4b289928610be3.tar.gz |
* configure.in (powerpc64*-*-linux*): Remove.
* configure: Rebuilt.
libffi/
* include/ffi.h.in (POWERPC64): Define if 64-bit.
(enum ffi_abi): Add FFI_LINUX64 on POWERPC.
Make it the default on POWERPC64.
(FFI_TRAMPOLINE_SIZE): Define to 24 on POWERPC64.
* configure.in: Change powerpc-*-linux* into powerpc*-*-linux*.
* configure: Rebuilt.
* src/powerpc/ffi.c (hidden): Define.
(ffi_prep_args_SYSV): Renamed from
ffi_prep_args. Cast pointers to unsigned long to shut up warnings.
(NUM_GPR_ARG_REGISTERS64, NUM_FPR_ARG_REGISTERS64,
ASM_NEEDS_REGISTERS64): New.
(ffi_prep_args64): New function.
(ffi_prep_cif_machdep): Handle FFI_LINUX64 ABI.
(ffi_call): Likewise.
(ffi_prep_closure): Likewise.
(flush_icache): Surround by #ifndef POWERPC64.
(ffi_dblfl): New union type.
(ffi_closure_helper_SYSV): Use it to avoid aliasing problems.
(ffi_closure_helper_LINUX64): New function.
* src/powerpc/ppc_closure.S: Surround whole file by #ifndef
__powerpc64__.
* src/powerpc/sysv.S: Likewise.
(ffi_call_SYSV): Rename ffi_prep_args to ffi_prep_args_SYSV.
* src/powerpc/linux64.S: New file.
* src/powerpc/linux64_closure.S: New file.
* Makefile.am (EXTRA_DIST): Add src/powerpc/linux64.S and
src/powerpc/linux64_closure.S.
(TARGET_SRC_POWERPC): Likewise.
* src/ffitest.c (closure_test_fn, closure_test_fn1, closure_test_fn2,
closure_test_fn3): Fix result printing on big-endian 64-bit
machines.
(main): Print tst2_arg instead of uninitialized tst2_result.
* src/ffitest.c (main): Hide what closure pointer really points to
from the compiler.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65781 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/include')
-rw-r--r-- | libffi/include/ffi.h.in | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libffi/include/ffi.h.in b/libffi/include/ffi.h.in index fe91ecd5e2e..c51a809ea3f 100644 --- a/libffi/include/ffi.h.in +++ b/libffi/include/ffi.h.in @@ -158,6 +158,12 @@ extern "C" { #define SIZEOF_ARG SIZEOF_VOID_P #endif +#ifdef POWERPC +#if defined (__powerpc64__) +#define POWERPC64 +#endif +#endif + #ifdef SPARC #if defined(__arch64__) || defined(__sparcv9) #define SPARC64 @@ -250,7 +256,12 @@ typedef enum ffi_abi { #ifdef POWERPC FFI_SYSV, FFI_GCC_SYSV, + FFI_LINUX64, +# ifdef POWERPC64 + FFI_DEFAULT_ABI = FFI_LINUX64, +# else FFI_DEFAULT_ABI = FFI_GCC_SYSV, +# endif #endif #ifdef POWERPC_AIX @@ -435,7 +446,11 @@ struct ffi_ia64_trampoline_struct { #elif defined(POWERPC) #define FFI_CLOSURES 1 +#ifdef POWERPC64 +#define FFI_TRAMPOLINE_SIZE 24 +#else #define FFI_TRAMPOLINE_SIZE 40 +#endif #define FFI_NATIVE_RAW_API 0 #elif defined(POWERPC_DARWIN) |