OSDN Git Service

* config/spu/spu.c (spu_override_options): Default to -mno-safe-hints
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Sep 2008 13:26:00 +0000 (13:26 +0000)
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Sep 2008 13:26:00 +0000 (13:26 +0000)
when building for the celledp architecture.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140316 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/spu/spu.c

index 5e66ff6..653dc51 100644 (file)
@@ -1,3 +1,8 @@
+2008-09-12  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
+
+       * config/spu/spu.c (spu_override_options): Default to -mno-safe-hints
+       when building for the celledp architecture.
+
 2008-09-12  Richard Guenther  <rguenther@suse.de>
 
        * tree-vrp.c (simplify_truth_ops_using_ranges): Fix types.
index 35a04a7..e3781d5 100644 (file)
@@ -390,6 +390,16 @@ spu_override_options (void)
         error ("Unknown architecture '%s'", &spu_tune_string[0]);
     }
 
+  /* Change defaults according to the processor architecture.  */
+  if (spu_arch == PROCESSOR_CELLEDP)
+    {
+      /* If no command line option has been otherwise specified, change
+        the default to -mno-safe-hints on celledp -- only the original
+        Cell/B.E. processors require this workaround.  */
+      if (!(target_flags_explicit & MASK_SAFE_HINTS))
+       target_flags &= ~MASK_SAFE_HINTS;
+    }
+
   REAL_MODE_FORMAT (SFmode) = &spu_single_format;
 }
 \f