aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/avr
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2008-05-26 17:44:50 +0000
committerAnatoly Sokolov <aesok@gcc.gnu.org>2008-05-26 21:44:50 +0400
commit4d492420f6e180fbce3e5616cfc10a322f39630c (patch)
treea644f876c3111306c7a760cc1c41bea69c9b1f26 /gcc/config/avr
parent319a58c6c8568d2c9e335487c861da5ae515c54f (diff)
downloadgcc-4d492420f6e180fbce3e5616cfc10a322f39630c.zip
gcc-4d492420f6e180fbce3e5616cfc10a322f39630c.tar.gz
gcc-4d492420f6e180fbce3e5616cfc10a322f39630c.tar.bz2
avr.md ("call_prologue_saves"): Use hi8(gs())/lo8(gs()) instead of pm_lo8/pm_hi8 to makes this call working on avr6.
* config/avr/avr.md ("call_prologue_saves"): Use hi8(gs())/lo8(gs()) instead of pm_lo8/pm_hi8 to makes this call working on avr6. * config/avr/avr.c (expand_prologue): Tune "call_prologue" optimization for 'avr6' architecture. Co-Authored-By: Anatoly Sokolov <aesok@post.ru> From-SVN: r135953
Diffstat (limited to 'gcc/config/avr')
-rw-r--r--gcc/config/avr/avr.c4
-rw-r--r--gcc/config/avr/avr.md4
2 files changed, 5 insertions, 3 deletions
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 012a7e4..d2cc33a 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -682,7 +682,9 @@ expand_prologue (void)
/* Prevent any attempt to delete the setting of ZERO_REG! */
emit_insn (gen_rtx_USE (VOIDmode, zero_reg_rtx));
}
- if (minimize && (frame_pointer_needed || live_seq > 6))
+ if (minimize && (frame_pointer_needed
+ || (AVR_2_BYTE_PC && live_seq > 6)
+ || live_seq > 7))
{
insn = emit_move_insn (gen_rtx_REG (HImode, REG_X),
gen_int_mode (size, HImode));
diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md
index 47042e9..ffbbefa 100644
--- a/gcc/config/avr/avr.md
+++ b/gcc/config/avr/avr.md
@@ -2765,8 +2765,8 @@
(use (reg:HI REG_X))
(clobber (reg:HI REG_Z))]
""
- "ldi r30,pm_lo8(1f)
- ldi r31,pm_hi8(1f)
+ "ldi r30,lo8(gs(1f))
+ ldi r31,hi8(gs(1f))
%~jmp __prologue_saves__+((18 - %0) * 2)
1:"
[(set_attr_alternative "length"