re PR other/50925 ([avr] ICE at spill_failure, at reload1.c:2118)
authorRichard Henderson <rth@redhat.com>
Thu, 12 Jan 2012 18:29:54 +0000 (10:29 -0800)
committerDenis Chertykov <denisc@gcc.gnu.org>
Thu, 12 Jan 2012 18:29:54 +0000 (22:29 +0400)
commit105b876e5556ffbb0fe367eda217cb4e74125c1f
treee889933a6e7bcc591d23cf6cfddc2fffc5cbe794
parent4643a68ec2e8c5b8fcce324a74fe83a87a976d0a
re PR other/50925 ([avr] ICE at spill_failure, at reload1.c:2118)

PR target/50925
* config/avr/avr-protos.h (avr_hard_regno_nregs): Declare.
* config/avr/avr.c (avr_can_eliminate): Simplify.
(avr_initial_elimination_offset): Likewise.
(avr_prologue_setup_frame): Use hard_frame_pointer_rtx.
(expand_epilogue): Likewise.
(avr_legitimize_address): Gut.
(avr_legitimize_reload_address): Use hard_frame_pointer_rtx.
(avr_hard_regno_nregs): New.
(avr_hard_regno_ok): Allow only Pmode for arg and frame_pointers.
(avr_regno_mode_code_ok_for_base_b): Handle arg and frame pointers.
* config/avr/avr.h (FIXED_REGISTERS): Adjust arg pointer,
add soft frame pointer.
(CALL_USED_REGISTERS): Likewise.
(REG_CLASS_CONTENTS): Likewise.
(REGISTER_NAMES): Likewise.
(HARD_REGNO_NREGS): Use avr_hard_regno_nregs.
(HARD_FRAME_POINTER_REGNUM): New.
(FRAME_POINTER_REGNUM): Use soft frame pointer.
(ELIMINABLE_REGS): Eliminate from the soft frame pointer,
remove the HARD_FRAME_POINTER self-elimination.

Co-Authored-By: Denis Chertykov <chertykov@gmail.com>
From-SVN: r183136
gcc/ChangeLog
gcc/config/avr/avr-protos.h
gcc/config/avr/avr.c
gcc/config/avr/avr.h