diff options
author | daney <> | 2007-12-07 23:21:04 +0000 |
---|---|---|
committer | daney <> | 2007-12-07 23:21:04 +0000 |
commit | 5967f82431459b8bf36f8f9644a8aade5c9d9456 (patch) | |
tree | d93a19bffb36f8867f216d2ce09fc899afcb7eb6 /libffi | |
parent | 16190cb8203b3b4c3bfd3ab9ab8d463b0400c0c6 (diff) |
2007-12-07 David Daney <ddaney@avtrex.com>
* src/mips/ffi.c (ffi_prep_cif_machdep): Handle long double return
type.
Diffstat (limited to 'libffi')
-rw-r--r-- | libffi/ChangeLog | 4 | ||||
-rw-r--r-- | libffi/src/mips/ffi.c | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog index 3a937c48bed..b23058687fd 100644 --- a/libffi/ChangeLog +++ b/libffi/ChangeLog @@ -1,3 +1,7 @@ +2007-12-07 David Daney <ddaney@avtrex.com> + * src/mips/ffi.c (ffi_prep_cif_machdep): Handle long double return + type. + 2007-12-06 David Daney <ddaney@avtrex.com> * include/ffi.h.in (FFI_SIZEOF_JAVA_RAW): Define if not already 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; |