summaryrefslogtreecommitdiffstats
path: root/libffi
diff options
context:
space:
mode:
authorkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-18 00:35:13 +0000
committerkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-18 00:35:13 +0000
commit003f258f2ea9f8e5ee0e750e898b317b7cad9fac (patch)
tree979210fcf1532855829f967a4fdd19327886843b /libffi
parentdd3befbb0852d1b78f1cd22c20da691d886ed0f2 (diff)
downloadppe42-gcc-003f258f2ea9f8e5ee0e750e898b317b7cad9fac.tar.gz
ppe42-gcc-003f258f2ea9f8e5ee0e750e898b317b7cad9fac.zip
* src/sh/ffi.c (ffi_closure_helper_SYSV): Remove unused variable
and cast integer to void * if needed. Update the pointer to the FP register saved area correctly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111225 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi')
-rw-r--r--libffi/ChangeLog6
-rw-r--r--libffi/src/sh/ffi.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 6d1542ee533..2ed033e89db 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,9 @@
+2006-02-18 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ * src/sh/ffi.c (ffi_closure_helper_SYSV): Remove unused variable
+ and cast integer to void * if needed. Update the pointer to
+ the FP register saved area correctly.
+
2006-02-17 Andreas Tobler <a.tobler@schweiz.ch>
* testsuite/libffi.call/nested_struct6.c: XFAIL this test until PR25630
diff --git a/libffi/src/sh/ffi.c b/libffi/src/sh/ffi.c
index 38449e9e6c1..2bcb98196a4 100644
--- a/libffi/src/sh/ffi.c
+++ b/libffi/src/sh/ffi.c
@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------
- ffi.c - Copyright (c) 2002, 2003, 2004, 2005 Kaz Kojima
+ ffi.c - Copyright (c) 2002, 2003, 2004, 2005, 2006 Kaz Kojima
SuperH Foreign Function Interface
@@ -535,7 +535,6 @@ ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
int freg = 0;
#endif
ffi_cif *cif;
- double temp;
cif = closure->cif;
avalue = alloca(cif->nargs * sizeof(void *));
@@ -544,7 +543,7 @@ ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
returns the data directly to the caller. */
if (cif->rtype->type == FFI_TYPE_STRUCT && STRUCT_VALUE_ADDRESS_WITH_ARG)
{
- rvalue = *pgr++;
+ rvalue = (void *) *pgr++;
ireg = 1;
}
else
@@ -611,6 +610,8 @@ ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
{
if (freg + 1 >= NFREGARG)
continue;
+ if (freg & 1)
+ pfr++;
freg = (freg + 1) & ~1;
freg += 2;
avalue[i] = pfr;
OpenPOWER on IntegriCloud