+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
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);
}
#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}}