summaryrefslogtreecommitdiffstats
path: root/libffi/src/prep_cif.c
diff options
context:
space:
mode:
authorgreen <green@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-17 02:15:32 +0000
committergreen <green@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-17 02:15:32 +0000
commitd7a35c6c8ed56febd7ecab5f2248fe633ccb5b48 (patch)
tree5eee77be9c61a0f60260a8f47e6085ac5e0738a5 /libffi/src/prep_cif.c
parent95b21bb9da597abff55397a5477b5b01211dc9ca (diff)
downloadppe42-gcc-d7a35c6c8ed56febd7ecab5f2248fe633ccb5b48.tar.gz
ppe42-gcc-d7a35c6c8ed56febd7ecab5f2248fe633ccb5b48.zip
Port to sparc 32 and 64 Linux.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33196 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/src/prep_cif.c')
-rw-r--r--libffi/src/prep_cif.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/libffi/src/prep_cif.c b/libffi/src/prep_cif.c
index 4c731b99455..3f21411a6cb 100644
--- a/libffi/src/prep_cif.c
+++ b/libffi/src/prep_cif.c
@@ -107,7 +107,11 @@ ffi_status ffi_prep_cif(/*@out@*/ /*@partial@*/ ffi_cif *cif,
#ifndef M68K
/* Make space for the return structure pointer */
- if (cif->rtype->type == FFI_TYPE_STRUCT)
+ if (cif->rtype->type == FFI_TYPE_STRUCT
+#ifdef SPARC
+ && (cif->abi != FFI_V9 || cif->rtype->size > 32)
+#endif
+ )
bytes = STACK_ARG_SIZE(sizeof(void*));
#endif
@@ -121,8 +125,10 @@ ffi_status ffi_prep_cif(/*@out@*/ /*@partial@*/ ffi_cif *cif,
return FFI_BAD_TYPEDEF;
#ifdef SPARC
- if ((*ptr)->type == FFI_TYPE_STRUCT
- || (*ptr)->type == FFI_TYPE_LONGDOUBLE)
+ if (((*ptr)->type == FFI_TYPE_STRUCT
+ && ((*ptr)->size > 16 || cif->abi != FFI_V9))
+ || ((*ptr)->type == FFI_TYPE_LONGDOUBLE
+ && cif->abi != FFI_V9))
bytes += sizeof(void*);
else
#endif
@@ -140,4 +146,3 @@ ffi_status ffi_prep_cif(/*@out@*/ /*@partial@*/ ffi_cif *cif,
/* Perform machine dependent cif processing */
return ffi_prep_cif_machdep(cif);
}
-
OpenPOWER on IntegriCloud