ffi.c (ffi_prep_cif_machdep): Handle long double return type.
2007-12-07 David Daney <ddaney@avtrex.com> * src/mips/ffi.c (ffi_prep_cif_machdep): Handle long double return type. From-SVN: r130699
This commit is contained in:
parent
24eaa34f8c
commit
3875b6d772
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user