This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] expand mips_scalar_mode_accepted_p


After talking yesterday it was thought to be probably better to
explicitly call out everything that is acceptable for the port. So I've
done so.

Tested on mipsisa64-elf, mips64vr-elf (build only), mips-elf.

-eric

2004-12-08  Eric Christopher  <echristo@redhat.com>

	* config/mips/mips.c (mips_scalar_mode_supported_p): Rewrite
	to avoid call to default function.

Index: gcc/config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.480
diff -u -p -w -r1.480 mips.c
--- gcc/config/mips/mips.c	7 Dec 2004 22:40:40 -0000	1.480
+++ gcc/config/mips/mips.c	8 Dec 2004 22:38:19 -0000
@@ -7087,19 +7087,34 @@ mips_valid_pointer_mode (enum machine_mo
 
    then compiled with -mabi=64 and -mint64. We have no
    32-bit type at that point and so the default case
-   always fails.  Instead of special casing everything
-   it's easier to accept SImode in this function and
-   then punt to the default which will work for all
-   of the cases where we deal with TARGET_64BIT, etc.  */
+   always fails.  */
+
 static bool
 mips_scalar_mode_supported_p (enum machine_mode mode)
 {
-  /* We can always handle SImode.  */
-  if (mode == SImode)
+  switch (mode)
+    {
+    case QImode:
+    case HImode:
+    case SImode:
+    case DImode:
     return true;
-  else
-    return default_scalar_mode_supported_p (mode);
 
+      /* Handled via optabs.c.  */
+    case TImode:
+      return TARGET_64BIT;
+
+    case SFmode:
+    case DFmode:
+      return true;
+
+      /* LONG_DOUBLE_TYPE_SIZE is 128 for TARGET_NEWABI only.  */
+    case TFmode:
+      return TARGET_NEWABI;
+
+    default:
+      return false;
+    }
 }
 
 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]