public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch,AVR]: Fix PR45263
@ 2011-04-01 18:20 Georg-Johann Lay
  2011-04-01 22:06 ` Georg-Johann Lay
  0 siblings, 1 reply; 9+ messages in thread
From: Georg-Johann Lay @ 2011-04-01 18:20 UTC (permalink / raw)
  To: gcc-patches; +Cc: Denis Chertykov, Anatoly Sokolov, Eric Weddington

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

This is straight forward fix for PR45263 (R20 clobbered by
constructor/destructor).

Using call-saved register like R15 is undesired because upcoming
ATtiny10 architecture.

2011-04-01  Georg-Johann Lay  <avr@gjlay.de>

	PR target/45263
	* config/avr/libgcc.S (__do_global_ctors, __do_global_dtors): 		Save
R20 around calls of __tablejump_elpm__

[-- Attachment #2: pr45263.diff --]
[-- Type: text/x-patch, Size: 612 bytes --]

Index: config/avr/libgcc.S
===================================================================
--- config/avr/libgcc.S	(Revision 171824)
+++ config/avr/libgcc.S	(Arbeitskopie)
@@ -802,7 +802,9 @@ __do_global_ctors:
 	mov_h	r31, r29
 	mov_l	r30, r28
 	out     __RAMPZ__, r20
+	push	r20
 	XCALL	__tablejump_elpm__
+	pop	r20
 .L__do_global_ctors_start:
 	cpi	r28, lo8(__ctors_start)
 	cpc	r29, r17
@@ -843,7 +845,9 @@ __do_global_dtors:
 	mov_h	r31, r29
 	mov_l	r30, r28
 	out     __RAMPZ__, r20
+	push	r20
 	XCALL	__tablejump_elpm__
+	pop	r20
 .L__do_global_dtors_start:
 	cpi	r28, lo8(__dtors_end)
 	cpc	r29, r17

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-05-27 17:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-01 18:20 [Patch,AVR]: Fix PR45263 Georg-Johann Lay
2011-04-01 22:06 ` Georg-Johann Lay
2011-04-01 22:29   ` Weddington, Eric
2011-04-04 14:03     ` Georg-Johann Lay
2011-04-06 13:30       ` Georg-Johann Lay
2011-04-11 17:05         ` Ping: " Georg-Johann Lay
2011-04-12  5:35           ` Denis Chertykov
2011-05-27 16:41           ` [Patch, 4.6, AVR]: " Georg-Johann Lay
2011-05-27 18:42             ` Denis Chertykov

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