re PR libffi/53014 (libffi failures on mips64-linux-gnu with soft-float)
authorAndrew Pinski <apinski@cavium.com>
Sun, 26 Aug 2012 18:29:21 +0000 (18:29 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Sun, 26 Aug 2012 18:29:21 +0000 (11:29 -0700)
2012-08-26  Andrew Pinski  <apinski@cavium.com>

PR libffi/53014
* src/mips/ffi.c (ffi_prep_closure_loc): Allow n32 with soft-float and n64 with
soft-float.

From-SVN: r190696

libffi/ChangeLog
libffi/src/mips/ffi.c

index f66a84927e8276f0b557f93e8ffc29679e36b293..73599767c2573f77eda385571f1694a0f025cf35 100644 (file)
@@ -1,3 +1,9 @@
+2012-08-26  Andrew Pinski  <apinski@cavium.com>
+
+       PR libffi/53014
+       * src/mips/ffi.c (ffi_prep_closure_loc): Allow n32 with soft-float and n64 with
+       soft-float.
+
 2012-08-08  Uros Bizjak  <ubizjak@gmail.com>
 
        * src/s390/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
index 79cff9b5304e5149ea86b864ae830ee6af07eea9..03121e39222ea10a66cde7d8f1818a1e43bd284c 100644 (file)
@@ -670,9 +670,16 @@ ffi_prep_closure_loc (ffi_closure *closure,
   if (cif->abi != FFI_O32 && cif->abi != FFI_O32_SOFT_FLOAT)
     return FFI_BAD_ABI;
   fn = ffi_closure_O32;
-#else /* FFI_MIPS_N32 */
-  if (cif->abi != FFI_N32 && cif->abi != FFI_N64)
+#else
+#if _MIPS_SIM ==_ABIN32
+  if (cif->abi != FFI_N32
+      && cif->abi != FFI_N32_SOFT_FLOAT)
+    return FFI_BAD_ABI;
+#else
+  if (cif->abi != FFI_N64
+      && cif->abi != FFI_N64_SOFT_FLOAT)
     return FFI_BAD_ABI;
+#endif
   fn = ffi_closure_N32;
 #endif /* FFI_MIPS_O32 */