Commit 8aa7d1fc by Joern Rennecke Committed by Joern Rennecke

avr.c (avr_can_eliminate): Allow elimination from ARG_POINTER_REGNUM to STACK_POINTER_REGNUM if...

        * config/avr/avr.c (avr_can_eliminate): Allow elimination from
        ARG_POINTER_REGNUM
        to STACK_POINTER_REGNUM if !frame_pointer_needed.
        * config/avr/avr.c (ELIMINABLE_REGS): Add elimination from
        ARG_POINTER_REGNUM to STACK_POINTER_REGNUM.

From-SVN: r208045
parent 0294729c
2014-02-22 Joern Rennecke <joern.rennecke@embecosm.com>
* config/avr/avr.c (avr_can_eliminate): Allow elimination from
ARG_POINTER_REGNUM
to STACK_POINTER_REGNUM if !frame_pointer_needed.
* config/avr/avr.c (ELIMINABLE_REGS): Add elimination from
ARG_POINTER_REGNUM to STACK_POINTER_REGNUM.
2014-02-21 Vladimir Makarov <vmakarov@redhat.com>
PR target/60298
......
......@@ -734,11 +734,8 @@ avr_allocate_stack_slots_for_args (void)
static bool
avr_can_eliminate (const int from, const int to)
{
return ((from == ARG_POINTER_REGNUM && to == FRAME_POINTER_REGNUM)
|| (frame_pointer_needed && to == FRAME_POINTER_REGNUM)
|| ((from == FRAME_POINTER_REGNUM
|| from == FRAME_POINTER_REGNUM + 1)
&& !frame_pointer_needed));
return ((frame_pointer_needed && to == FRAME_POINTER_REGNUM)
|| !frame_pointer_needed);
}
......
......@@ -306,6 +306,7 @@ enum reg_class {
#define STATIC_CHAIN_REGNUM 2
#define ELIMINABLE_REGS { \
{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
{ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \
{FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM} \
,{FRAME_POINTER_REGNUM+1,STACK_POINTER_REGNUM+1}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment