* 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
+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
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;