]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* config/avr/avr.h (avr_case_values_threshold): Remove declaration.
authoraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Apr 2009 05:57:14 +0000 (05:57 +0000)
committeraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Apr 2009 05:57:14 +0000 (05:57 +0000)
(CASE_VALUES_THRESHOLD): Redefine.
* config/avr/avr.c (avr_override_options): Remove initialization of
avr_case_values_threshold variable.
(avr_case_values_threshold): Remove variable. Add new function.
* config/avr/avr-protos.h (avr_case_values_threshold): Declare.
* config/avr/avr.opt (mno-tablejump): Remove option.
* doc/invoke.texi (AVR Options): Remove -mno-tablejump.

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

gcc/ChangeLog
gcc/config/avr/avr-protos.h
gcc/config/avr/avr.c
gcc/config/avr/avr.h
gcc/config/avr/avr.opt
gcc/doc/invoke.texi

index 67439f6e7a3abf3538b661f4c62e72f8ded546d8..b767290676b8fe1b142b709bdeac35c806810dd7 100644 (file)
@@ -1,3 +1,14 @@
+2009-04-01  Anatoly Sokolov  <aesok@post.ru>
+
+       * config/avr/avr.h (avr_case_values_threshold): Remove declaration.
+       (CASE_VALUES_THRESHOLD): Redefine.
+       * config/avr/avr.c (avr_override_options): Remove initialization of
+       avr_case_values_threshold variable.
+       (avr_case_values_threshold): Remove variable. Add new function.
+       * config/avr/avr-protos.h (avr_case_values_threshold): Declare.
+       * config/avr/avr.opt (mno-tablejump): Remove option.
+       * doc/invoke.texi (AVR Options): Remove -mno-tablejump.
+
 2009-04-01  DJ Delorie  <dj@redhat.com>
 
        * varasm.c (default_function_rodata_section): Don't assume
index 2df4a16d1cf9deaf7d884d0ada6788c45a5c89ee..cb936efb6fdf2aa2b56d958cb1d48b48925b166b 100644 (file)
@@ -39,6 +39,7 @@ extern int avr_simple_epilogue (void);
 extern void gas_output_limited_string (FILE *file, const char *str);
 extern void gas_output_ascii (FILE *file, const char *str, size_t length);
 extern int avr_hard_regno_rename_ok (unsigned int, unsigned int);
+extern unsigned int avr_case_values_threshold (void);
 
 #ifdef TREE_CODE
 extern void asm_output_external (FILE *file, tree decl, char *name);
index 82a9742392ce4fe2444ff173ea41ecf29952298d..e868a97bed44ad4164302f3a8781911647603867 100644 (file)
@@ -308,7 +308,6 @@ static const struct mcu_type_s avr_mcu_types[] = {
   { NULL,           ARCH_UNKNOWN, NULL }
 };
 
-int avr_case_values_threshold = 30000;
 \f
 /* Initialize the GCC target structure.  */
 #undef TARGET_ASM_ALIGNED_HI_OP
@@ -388,10 +387,6 @@ avr_override_options (void)
   avr_current_arch = &avr_arch_types[t->arch];
   avr_extra_arch_macro = t->macro;
 
-  if (optimize && !TARGET_NO_TABLEJUMP)
-    avr_case_values_threshold = 
-      (!AVR_HAVE_JMP_CALL || TARGET_CALL_PROLOGUES) ? 8 : 17;
-
   tmp_reg_rtx  = gen_rtx_REG (QImode, TMP_REGNO);
   zero_reg_rtx = gen_rtx_REG (QImode, ZERO_REGNO);
 
@@ -6114,4 +6109,11 @@ avr_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
     return false;
 }
 
+/* Worker function for CASE_VALUES_THRESHOLD.  */
+
+unsigned int avr_case_values_threshold (void)
+{
+  return (!AVR_HAVE_JMP_CALL || TARGET_CALL_PROLOGUES) ? 8 : 17;
+}
+
 #include "gt-avr.h"
index 54c607a0e04631137eb942eb78b888c7c428f9e5..f09e8ecaa5904c243b10d99ea55448537ccca174 100644 (file)
@@ -734,9 +734,7 @@ fprintf (STREAM, "\t.skip %lu,0\n", (unsigned long)(N))
 
 #define CASE_VECTOR_MODE HImode
 
-extern int avr_case_values_threshold;
-
-#define CASE_VALUES_THRESHOLD avr_case_values_threshold
+#define CASE_VALUES_THRESHOLD avr_case_values_threshold ()
 
 #undef WORD_REGISTER_OPERATIONS
 
index 51789ec5f16acf97b61cc0cda8684a7ec8ba06d8..f94d6a3c2ac837a3f207c8465c67cebd9745b1d8 100644 (file)
@@ -37,10 +37,6 @@ mno-interrupts
 Target Report RejectNegative Mask(NO_INTERRUPTS)
 Change the stack pointer without disabling interrupts
 
-mno-tablejump
-Target Report RejectNegative Mask(NO_TABLEJUMP)
-Do not generate tablejump insns
-
 morder1
 Target Report Undocumented Mask(ORDER_1)
 
index 131633db1b7c571753b5de5967141ea56311675e..52fd70d1ad9683a6eaa8112b446626aff8907c27 100644 (file)
@@ -457,7 +457,7 @@ Objective-C and Objective-C++ Dialects}.
 
 @emph{AVR Options}
 @gccoptlist{-mmcu=@var{mcu}  -msize  -minit-stack=@var{n}  -mno-interrupts @gol
--mcall-prologues  -mno-tablejump  -mtiny-stack  -mint8}
+-mcall-prologues  -mtiny-stack  -mint8}
 
 @emph{Blackfin Options}
 @gccoptlist{-mcpu=@var{cpu}@r{[}-@var{sirevision}@r{]} @gol
@@ -9313,10 +9313,6 @@ Code size will be smaller.
 Functions prologues/epilogues expanded as call to appropriate
 subroutines.  Code size will be smaller.
 
-@item -mno-tablejump
-@opindex mno-tablejump
-Do not generate tablejump insns which sometimes increase code size.
-
 @item -mtiny-stack
 @opindex mtiny-stack
 Change only the low 8 bits of the stack pointer.