[PATCH, spu]: use -mno-safe-hints by default on celledp

Ben Elliston bje@au1.ibm.com
Fri Aug 31 06:41:00 GMT 2007


I am submitting the following patch for Sa Liu, who authored the patch.
It has been well tested in our internal tree.  Okay for mainline?

2007-08-31  Sa Liu  <saliu@de.ibm.com>

        * config/spu/spu.c (spu_override_options): Use -mno-safe-hints on
        celledp by default.

Index: config/spu/spu.c
===================================================================
--- config/spu/spu.c    (revision 127950)
+++ config/spu/spu.c    (working copy)
@@ -315,7 +315,13 @@ spu_override_options (void)
       if (strcmp (&spu_arch_string[0], "cell") == 0)
         spu_arch = PROCESSOR_CELL;
       else if (strcmp (&spu_arch_string[0], "celledp") == 0)
-        spu_arch = PROCESSOR_CELLEDP;
+       {
+          spu_arch = PROCESSOR_CELLEDP;
+
+         /* Use -mno-safe-hints on celledp by default.  */
+         if (! (target_flags_explicit & MASK_SAFE_HINTS))
+            target_flags &= ~MASK_SAFE_HINTS;
+       }
       else
         error ("Unknown architecture '%s'", &spu_arch_string[0]);
     }



More information about the Gcc-patches mailing list