diff options
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/avr/avr.c | 9 | ||||
-rw-r--r-- | gcc/config/avr/avr.md | 12 |
3 files changed, 19 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 72780c1..e01cf06 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2007-06-29 Anatoly Sokolov <aesok@post.ru> + + PR target/32335 + * config/avr/avr.c: Include dataflow header file. + (expand_prologue): Adjust for prologue insn change. + * config/avr/avr.md (call_prologue_saves): Only modify REG_SP once + inside a insn. + 2007-06-29 Richard Guenther <rguenther@suse.de> PR middle-end/32493 diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index a393cff..d9dec88 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -44,6 +44,7 @@ #include "tm_p.h" #include "target.h" #include "target-def.h" +#include "df.h" /* Maximal allowed offset for an address in the LD command */ #define MAX_LD_OFFSET(MODE) (64 - (signed)GET_MODE_SIZE (MODE)) @@ -631,9 +632,13 @@ expand_prologue (void) } else if (minimize && (frame_pointer_needed || live_seq > 6)) { + insn = emit_move_insn (gen_rtx_REG (HImode, REG_X), + gen_int_mode (size, HImode)); + RTX_FRAME_RELATED_P (insn) = 1; + insn = - emit_insn (gen_call_prologue_saves (gen_int_mode (size, HImode), - gen_int_mode (live_seq, HImode))); + emit_insn (gen_call_prologue_saves (gen_int_mode (live_seq, HImode), + gen_int_mode (size + live_seq, HImode))); RTX_FRAME_RELATED_P (insn) = 1; } else diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index 34dc703..2a7c9c8 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -2706,20 +2706,16 @@ ;; Library prologue saves (define_insn "call_prologue_saves" [(unspec_volatile:HI [(const_int 0)] UNSPECV_PROLOGUE_SAVES) - (set (reg:HI REG_SP) (minus:HI - (reg:HI REG_SP) - (match_operand:HI 0 "immediate_operand" ""))) + (match_operand:HI 0 "immediate_operand" "") (set (reg:HI REG_SP) (minus:HI (reg:HI REG_SP) (match_operand:HI 1 "immediate_operand" ""))) - (set (reg:HI REG_X) (match_dup 0)) + (use (reg:HI REG_X)) (clobber (reg:HI REG_Z))] "" - "ldi r26,lo8(%0) - ldi r27,hi8(%0) - ldi r30,pm_lo8(1f) + "ldi r30,pm_lo8(1f) ldi r31,pm_hi8(1f) - %~jmp __prologue_saves__+((18 - %1) * 2) + %~jmp __prologue_saves__+((18 - %0) * 2) 1:" [(set_attr_alternative "length" [(if_then_else (eq_attr "mcu_mega" "yes") |