Commit bb6f2bac by Georg-Johann Lay Committed by Georg-Johann Lay

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

	PR target/57844
	* config/avr/avr.c (avr_prologue_setup_frame): Trunk -size to mode
	of my_fp.

From-SVN: r200872
parent 5219b232
2013-07-10 Georg-Johann Lay <avr@gjlay.de> 2013-07-10 Georg-Johann Lay <avr@gjlay.de>
PR target/57844
* config/avr/avr.c (avr_prologue_setup_frame): Trunk -size to mode
of my_fp.
2013-07-10 Georg-Johann Lay <avr@gjlay.de>
PR target/57506 PR target/57506
* config/avr/avr-mcus.def (atmega16hva, atmega16hva2, atmega16hvb) * config/avr/avr-mcus.def (atmega16hva, atmega16hva2, atmega16hvb)
(atmega16m1, atmega16u4, atmega32a, atmega32c1, atmega32hvb) (atmega16m1, atmega16u4, atmega32a, atmega32c1, atmega32hvb)
......
...@@ -1112,7 +1112,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set) ...@@ -1112,7 +1112,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
leaf function and thus X has already been saved. */ leaf function and thus X has already been saved. */
int irq_state = -1; 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; rtx fp_plus_insns, fp, my_fp;
gcc_assert (frame_pointer_needed gcc_assert (frame_pointer_needed
...@@ -1151,6 +1151,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set) ...@@ -1151,6 +1151,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
} }
size = trunc_int_for_mode (size, GET_MODE (my_fp)); 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 ************/ /************ Method 1: Adjust frame pointer ************/
...@@ -1171,7 +1172,8 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set) ...@@ -1171,7 +1172,8 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
} }
insn = emit_move_insn (my_fp, plus_constant (GET_MODE (my_fp), insn = emit_move_insn (my_fp, plus_constant (GET_MODE (my_fp),
my_fp, -size)); my_fp, neg_size));
if (frame_pointer_needed) if (frame_pointer_needed)
{ {
RTX_FRAME_RELATED_P (insn) = 1; RTX_FRAME_RELATED_P (insn) = 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