This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[AVR, GCC 4.4] Deprecating the "-mno-tablejump" option for GCC 4.4
- From: Anatoly Sokolov <aesok at post dot ru>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 1 Apr 2009 11:15:53 +0400
- Subject: [AVR, GCC 4.4] Deprecating the "-mno-tablejump" option for GCC 4.4
Hello.
This patch to deprecate the "-mno-tablejump" option in GCC 4.4, for AVR
target.
* config/avr/avr.c (avr_override_options): Inform user that
-mno-tablejump option is deprecated.
* doc/invoke.texi (AVR Options): Update -mno-tablejump.
Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi (revision 145389)
+++ gcc/doc/invoke.texi (working copy)
@@ -9295,6 +9295,8 @@
@item -mno-tablejump
@opindex mno-tablejump
Do not generate tablejump insns which sometimes increase code size.
+The option is now deprecated in favor of the equivalent
+@option{-fno-jump-tables}
@item -mtiny-stack
@opindex mtiny-stack
Index: gcc/config/avr/avr.c
===================================================================
--- gcc/config/avr/avr.c (revision 145389)
+++ gcc/config/avr/avr.c (working copy)
@@ -367,6 +367,7 @@
avr_override_options (void)
{
const struct mcu_type_s *t;
+ static bool warned_no_tablejump_deprecated = false;
flag_delete_null_pointer_checks = 0;
@@ -392,6 +393,15 @@
avr_case_values_threshold =
(!AVR_HAVE_JMP_CALL || TARGET_CALL_PROLOGUES) ? 8 : 17;
+ if (TARGET_NO_TABLEJUMP
+ && !warned_no_tablejump_deprecated)
+ {
+ inform (input_location, "the -mno-tablejump switch is deprecated");
+ inform (input_location, "GCC 4.4 is the last release with this switch");
+ inform (input_location, "use the -fno-jump-tables switch instead");
+ warned_no_tablejump_deprecated = true;
+ }
+
tmp_reg_rtx = gen_rtx_REG (QImode, TMP_REGNO);
zero_reg_rtx = gen_rtx_REG (QImode, ZERO_REGNO);
Anatoly.