avr.c (avr_case_values_threshold): New.
authorMarek Michalkiewicz <marekm@linux.org.pl>
Tue, 14 Nov 2000 19:05:41 +0000 (22:05 +0300)
committerDenis Chertykov <denisc@gcc.gnu.org>
Tue, 14 Nov 2000 19:05:41 +0000 (22:05 +0300)
commit1268b05f5ae93bb9b92d772e8addcad41cc50ad9
tree3a24dcbbbebd7103ba32d2670d15160d3eefcb3c
parent09ad4749472c897816a6255006944097c7e33162
avr.c (avr_case_values_threshold): New.

* config/avr/avr.c (avr_case_values_threshold): New.
(avr_override_options): Set it depending on options, make it large
when not optimizing to work around "unable to generate reloads".

* config/avr/avr.h (TARGET_SWITCHES): Add -mno-tablejump option.
(EXTRA_SECTION_FUNCTIONS): Make the .progmem.gcc_sw_table section
executable if not AVR_MEGA.  Make sure jump tables are word-aligned.
(JUMP_TABLES_IN_TEXT_SECTION): Define as 0, not 1.
(ASM_OUTPUT_ADDR_VEC_ELT): Optimize, use "rjmp" if not AVR_MEGA.
(avr_case_values_threshold): Declare as extern int.
(CASE_VALUES_THRESHOLD): Define as avr_case_values_threshold.

* config/avr/avr.md (tablejump): Removed.
(*tablejump_rjmp): New for jump tables made from "rjmp" instructions.
(*tablejump_lib, *tablejump_enh, *tablejump): Change to expect the
index in the table, not multiplied by 2.
(casesi): Change to match the above insns.  Always enable.

* config/avr/libgcc.S (__tablejump__): Rename to __tablejump2__.
Change to expect the word address of the table, multiply it by 2
here and not in the caller.  Change "adiw" to faster "inc".

From-SVN: r37465
gcc/ChangeLog
gcc/config/avr/avr.c
gcc/config/avr/avr.h
gcc/config/avr/avr.md
gcc/config/avr/libgcc.S