From 59dbe4fef06b1690567719388feb11f2e3658e9c Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Fri, 12 Sep 2008 13:26:00 +0000 Subject: [PATCH] spu.c (spu_override_options): Default to -mno-safe-hints when building for the celledp architecture. * config/spu/spu.c (spu_override_options): Default to -mno-safe-hints when building for the celledp architecture. From-SVN: r140316 --- gcc/ChangeLog | 5 +++++ gcc/config/spu/spu.c | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5e66ff672d6..653dc51e059 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-09-12 Ulrich Weigand + + * config/spu/spu.c (spu_override_options): Default to -mno-safe-hints + when building for the celledp architecture. + 2008-09-12 Richard Guenther * tree-vrp.c (simplify_truth_ops_using_ranges): Fix types. diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index 35a04a7a820..e3781d5c8a1 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -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; }