OSDN Git Service

* config/avr/avr.c (avr_case_values_threshold): New.
authordenisc <denisc@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Nov 2000 19:05:41 +0000 (19:05 +0000)
committerdenisc <denisc@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Nov 2000 19:05:41 +0000 (19:05 +0000)
commit21167a30c24714442173b2895c0f1291959de447
tree3a24dcbbbebd7103ba32d2670d15160d3eefcb3c
parent04a130bd362cb787879af63eb3c19236a6ad2d56
* 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".

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37465 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/avr/avr.c
gcc/config/avr/avr.h
gcc/config/avr/avr.md
gcc/config/avr/libgcc.S