public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Patch AVR: fix call prologue saves for avr6
@ 2008-05-21 11:03 Tristan Gingold
  0 siblings, 0 replies; only message in thread
From: Tristan Gingold @ 2008-05-21 11:03 UTC (permalink / raw)
  To: gcc-patches; +Cc: Anatoly Sokolov

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]

Hi,

this is a tiny patch to fix the use of prologue_saves on avr6.  As  
EIND is always 0, a stub must be
generated (if required) for the return point.

Tested by recompiling GCC.

Tristan.

2008-05-21  Tristan Gingold  <gingold@adacore.com>

	* 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.


[-- Attachment #2: avr-gcc-fsf.diffs --]
[-- Type: application/octet-stream, Size: 526 bytes --]

2008-05-21  Tristan Gingold  <gingold@adacore.com>

	* 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.

--- gcc/config/avr/avr.md	(revision 135711)
+++ gcc/config/avr/avr.md	(working copy)
@@ -2777,8 +2777,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"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-21 10:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-21 11:03 Patch AVR: fix call prologue saves for avr6 Tristan Gingold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).