aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-10-15 13:45:58 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2010-10-15 13:45:58 +0100
commita32b99ad60f2df32ed7122cc549afacf708ed492 (patch)
tree5c11a9816a20d0390ef224d9b07b88e16f4f92ec
parent55bd9c35eb4196c89c571ebceff7fba7715d4e79 (diff)
downloadgcc-a32b99ad60f2df32ed7122cc549afacf708ed492.zip
gcc-a32b99ad60f2df32ed7122cc549afacf708ed492.tar.gz
gcc-a32b99ad60f2df32ed7122cc549afacf708ed492.tar.bz2
rx.c (rx_option_optimization): Change to rx_override_options_after_change.
* config/rx/rx.c (rx_option_optimization): Change to rx_override_options_after_change. Don't change flag_lto_compression_level. Don't check for changes to whether FPU instructions can be used. Check and set only flag_finite_math_only, not other fast-math flags. (rx_option_override): Call rx_override_options_after_change. (TARGET_OPTION_OPTIMIZATION): Remove. (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define. From-SVN: r165508
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/rx/rx.c31
2 files changed, 22 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3f449f7..271988a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,16 @@
2010-10-15 Joseph Myers <joseph@codesourcery.com>
+ * config/rx/rx.c (rx_option_optimization): Change to
+ rx_override_options_after_change. Don't change
+ flag_lto_compression_level. Don't check for changes to whether
+ FPU instructions can be used. Check and set only
+ flag_finite_math_only, not other fast-math flags.
+ (rx_option_override): Call rx_override_options_after_change.
+ (TARGET_OPTION_OPTIMIZATION): Remove.
+ (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
+
+2010-10-15 Joseph Myers <joseph@codesourcery.com>
+
* config/rs6000/rs6000.c (rs6000_option_optimization): Don't
disable section anchors for lang_hooks.name[4] != 'O'.
diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c
index af1aff3..f087c66 100644
--- a/gcc/config/rx/rx.c
+++ b/gcc/config/rx/rx.c
@@ -2191,29 +2191,21 @@ rx_handle_option (size_t code, const char * arg ATTRIBUTE_UNUSED, int value)
return true;
}
-/* Implement TARGET_OPTION_OPTIMIZATION. */
+/* Implement TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE. */
static void
-rx_option_optimization (int level ATTRIBUTE_UNUSED, int size ATTRIBUTE_UNUSED)
+rx_override_options_after_change (void)
{
static bool first_time = TRUE;
- static bool saved_allow_rx_fpu = TRUE;
if (first_time)
{
/* If this is the first time through and the user has not disabled
- the use of RX FPU hardware then enable unsafe math optimizations,
- since the FPU instructions themselves are unsafe. */
+ the use of RX FPU hardware then enable -ffinite-math-only,
+ since the FPU instructions do not support NaNs and infinities. */
if (TARGET_USE_FPU)
- set_fast_math_flags (true);
+ flag_finite_math_only = 1;
- /* FIXME: For some unknown reason LTO compression is not working,
- at least on my local system. So set the default compression
- level to none, for now. */
- if (flag_lto_compression_level == -1)
- flag_lto_compression_level = 0;
-
- saved_allow_rx_fpu = ALLOW_RX_FPU_INSNS;
first_time = FALSE;
}
else
@@ -2221,11 +2213,8 @@ rx_option_optimization (int level ATTRIBUTE_UNUSED, int size ATTRIBUTE_UNUSED)
/* Alert the user if they are changing the optimization options
to use IEEE compliant floating point arithmetic with RX FPU insns. */
if (TARGET_USE_FPU
- && ! fast_math_flags_set_p ())
- warning (0, "RX FPU instructions are not IEEE compliant");
-
- if (saved_allow_rx_fpu != ALLOW_RX_FPU_INSNS)
- error ("Changing the FPU insns/math optimizations pairing is not supported");
+ && !flag_finite_math_only)
+ warning (0, "RX FPU instructions do not support NaNs and infinities");
}
}
@@ -2235,6 +2224,8 @@ rx_option_override (void)
/* This target defaults to strict volatile bitfields. */
if (flag_strict_volatile_bitfields < 0)
flag_strict_volatile_bitfields = 1;
+
+ rx_override_options_after_change ();
}
@@ -2834,8 +2825,8 @@ rx_memory_move_cost (enum machine_mode mode, enum reg_class regclass, bool in)
#undef TARGET_OPTION_OVERRIDE
#define TARGET_OPTION_OVERRIDE rx_option_override
-#undef TARGET_OPTION_OPTIMIZATION
-#define TARGET_OPTION_OPTIMIZATION rx_option_optimization
+#undef TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE
+#define TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE rx_override_options_after_change
#undef TARGET_EXCEPT_UNWIND_INFO
#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info