diff options
author | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-11 05:17:57 +0000 |
---|---|---|
committer | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-11 05:17:57 +0000 |
commit | 341b7dcf9c85c99fd302c271b9cecf0c35d51769 (patch) | |
tree | 7fe48b10869cf553f80c9159b587e3d1c6056b5c /libffi/src | |
parent | 9300b3b3105dd3571b065924aab607c34a8f7a3d (diff) | |
download | gcc-341b7dcf9c85c99fd302c271b9cecf0c35d51769.tar.gz |
* src/types.c (double, longdouble): Merge identical SH and ARM
typedefs, and add POWERPC64.
* src/powerpc/ffi.c (ffi_prep_args64): Correct next_arg calc for
struct split over gpr and rest.
(ffi_prep_cif_machdep): Correct intarg_count for structures.
* src/powerpc/linux64.S (ffi_call_LINUX64): Fix gpr offsets.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71295 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/src')
-rw-r--r-- | libffi/src/powerpc/ffi.c | 6 | ||||
-rw-r--r-- | libffi/src/powerpc/linux64.S | 8 | ||||
-rw-r--r-- | libffi/src/types.c | 7 |
3 files changed, 8 insertions, 13 deletions
diff --git a/libffi/src/powerpc/ffi.c b/libffi/src/powerpc/ffi.c index 010050f91ba..9ad85ea7b86 100644 --- a/libffi/src/powerpc/ffi.c +++ b/libffi/src/powerpc/ffi.c @@ -376,11 +376,11 @@ void hidden ffi_prep_args64(extended_cif *ecif, unsigned long *const stack) words = ((*ptr)->size + 7) / 8; if (next_arg >= gpr_base && next_arg + words > gpr_end) { - unsigned int first = (char *) gpr_end - (char *) next_arg; + size_t first = (char *) gpr_end - (char *) next_arg; memcpy((char *) next_arg, (char *) *p_argv, first); memcpy((char *) rest, (char *) *p_argv + first, (*ptr)->size - first); - next_arg = rest + words * 8 - first; + next_arg = (unsigned long *) ((char *) rest + words * 8 - first); } else { @@ -591,7 +591,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif) #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE case FFI_TYPE_LONGDOUBLE: #endif - intarg_count += ((*ptr)->size + 7) & ~7; + intarg_count += ((*ptr)->size + 7) / 8; break; default: diff --git a/libffi/src/powerpc/linux64.S b/libffi/src/powerpc/linux64.S index d8af13b108a..22079807720 100644 --- a/libffi/src/powerpc/linux64.S +++ b/libffi/src/powerpc/linux64.S @@ -73,10 +73,10 @@ ffi_call_LINUX64: ld %r5, -32-(6*8)(%r28) ld %r6, -32-(5*8)(%r28) bf- 5, 1f - ld %r7, -32-(4*4)(%r28) - ld %r8, -32-(3*4)(%r28) - ld %r9, -32-(2*4)(%r28) - ld %r10, -32-(1*4)(%r28) + ld %r7, -32-(4*8)(%r28) + ld %r8, -32-(3*8)(%r28) + ld %r9, -32-(2*8)(%r28) + ld %r10, -32-(1*8)(%r28) 1: /* Load all the FP registers. */ diff --git a/libffi/src/types.c b/libffi/src/types.c index ae52f11f78c..7d4d0a0d84a 100644 --- a/libffi/src/types.c +++ b/libffi/src/types.c @@ -76,12 +76,7 @@ FFI_INTEGRAL_TYPEDEF(sint64, 8, 8, FFI_TYPE_SINT64); FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE); -#elif defined ARM - -FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); -FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE); - -#elif defined SH +#elif defined ARM || defined SH || defined POWERPC64 FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE); |