diff options
author | daney <daney@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-07 23:21:04 +0000 |
---|---|---|
committer | daney <daney@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-07 23:21:04 +0000 |
commit | 2c3f7870a88c22ff731fbe82889be5235de6807e (patch) | |
tree | d93a19bffb36f8867f216d2ce09fc899afcb7eb6 /libffi/src | |
parent | 95ded19e746f2075e18fc791fedc096f71b5c491 (diff) | |
download | gcc-2c3f7870a88c22ff731fbe82889be5235de6807e.tar.gz |
2007-12-07 David Daney <ddaney@avtrex.com>
* src/mips/ffi.c (ffi_prep_cif_machdep): Handle long double return
type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130699 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/src')
-rw-r--r-- | libffi/src/mips/ffi.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libffi/src/mips/ffi.c b/libffi/src/mips/ffi.c index cc2a42e7a9f..d0ce201a151 100644 --- a/libffi/src/mips/ffi.c +++ b/libffi/src/mips/ffi.c @@ -462,7 +462,13 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif) case FFI_TYPE_DOUBLE: cif->flags += cif->rtype->type << (FFI_FLAG_BITS * 8); break; - + case FFI_TYPE_LONGDOUBLE: + /* Long double is returned as if it were a struct containing + two doubles. */ + cif->flags += FFI_TYPE_STRUCT << (FFI_FLAG_BITS * 8); + cif->flags += (FFI_TYPE_DOUBLE + (FFI_TYPE_DOUBLE << FFI_FLAG_BITS)) + << (4 + (FFI_FLAG_BITS * 8)); + break; default: cif->flags += FFI_TYPE_INT << (FFI_FLAG_BITS * 8); break; |