backport: re PR target/57844 (ICE: unrecognizable addqi3 insn with -msp8 and frame size of 128 bytes)

Backport from 2013-07-10 trunk r200872.
	PR target/57844
	* config/avr/avr.c (avr_prologue_setup_frame): Trunk -size to mode
	of my_fp.

From-SVN: r200874
This commit is contained in:
Georg-Johann Lay 2013-07-10 12:43:07 +00:00 committed by Georg-Johann Lay
parent 32e89de24c
commit a5710c842a
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2013-07-10 Georg-Johann Lay <avr@gjlay.de>
Backport from 2013-07-10 trunk r200872.
PR target/57844
* config/avr/avr.c (avr_prologue_setup_frame): Trunk -size to mode
of my_fp.
2013-07-10 Uros Bizjak <ubizjak@gmail.com>
Backport from mainline

View File

@ -1004,7 +1004,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
leaf function and thus X has already been saved. */
int irq_state = -1;
HOST_WIDE_INT size_cfa = size;
HOST_WIDE_INT size_cfa = size, neg_size;
rtx fp_plus_insns, fp, my_fp;
gcc_assert (frame_pointer_needed
@ -1043,6 +1043,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
}
size = trunc_int_for_mode (size, GET_MODE (my_fp));
neg_size = trunc_int_for_mode (-size, GET_MODE (my_fp));
/************ Method 1: Adjust frame pointer ************/
@ -1062,7 +1063,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
gen_rtx_SET (VOIDmode, fp, stack_pointer_rtx));
}
insn = emit_move_insn (my_fp, plus_constant (my_fp, -size));
insn = emit_move_insn (my_fp, plus_constant (my_fp, neg_size));
if (frame_pointer_needed)
{
RTX_FRAME_RELATED_P (insn) = 1;