re PR target/46278 (avr-gcc 4.5.1 doing suboptimal reloads using X)
authorGeorg-Johann Lay <avr@gjlay.de>
Fri, 14 Oct 2011 15:42:33 +0000 (15:42 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Fri, 14 Oct 2011 15:42:33 +0000 (15:42 +0000)
commite8ac5ac96a3d85b56ada2d953100bdbd6eda749b
tree91b3c432bb96e3b99e5406a18369fc6373642fb4
parent7d7a0211604472c2d489d6304f8b56df4c619537
re PR target/46278 (avr-gcc 4.5.1 doing suboptimal reloads using X)

PR target/46278
* doc/invoke.texi (AVR Options): Document -mstrict-X.
* config/avr/avr.opt (-mstrict-X): New option.
(avr_strict_X): New variable reflecting -mstrict-X.
* config/avr/avr.c (avr_reg_ok_for_addr_p): Add parameter
outer_code and pass it down to avr_regno_mode_code_ok_for_base_p.
(avr_legitimate_address_p): Pass outer_code to
avr_reg_ok_for_addr_p and use that function in case PLUS.
(avr_mode_code_base_reg_class): Depend on avr_strict_X.
(avr_regno_mode_code_ok_for_base_p): Ditto, and depend on outer_code.
(avr_option_override): Disable -fcaller-saves if -mstrict-X is on.

From-SVN: r179993
gcc/ChangeLog
gcc/config/avr/avr.c
gcc/config/avr/avr.opt
gcc/doc/invoke.texi