From: Georg-Johann Lay <avr@gjlay.de>
To: gcc-patches@gcc.gnu.org
Subject: [Committed][AVR]: PR target/45263: Don't use r20 around calls of __tablejump_elpm__
Date: Wed, 13 Apr 2011 17:00:00 -0000 [thread overview]
Message-ID: <4DA5D69F.9080508@gjlay.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 249 bytes --]
PR target/45263
* config/avr/libgcc.S (__do_global_ctors, __do_global_dtors): Don't use
r20 around calls of __tablejump_elpm__
http://gcc.gnu.org/viewcvs?view=revision&revision=172384
http://gcc.gnu.org/viewcvs?view=revision&revision=172385
[-- Attachment #2: pr45263-v2.diff --]
[-- Type: text/x-patch, Size: 1571 bytes --]
Index: config/avr/libgcc.S
===================================================================
--- config/avr/libgcc.S (Revision 172258)
+++ config/avr/libgcc.S (Arbeitskopie)
@@ -791,22 +791,22 @@ __do_clear_bss:
#if defined(__AVR_HAVE_RAMPZ__)
__do_global_ctors:
ldi r17, hi8(__ctors_start)
- ldi r16, hh8(__ctors_start)
ldi r28, lo8(__ctors_end)
ldi r29, hi8(__ctors_end)
- ldi r20, hh8(__ctors_end)
+ ldi r16, hh8(__ctors_end)
rjmp .L__do_global_ctors_start
.L__do_global_ctors_loop:
sbiw r28, 2
- sbc r20, __zero_reg__
+ sbc r16, __zero_reg__
mov_h r31, r29
mov_l r30, r28
- out __RAMPZ__, r20
+ out __RAMPZ__, r16
XCALL __tablejump_elpm__
.L__do_global_ctors_start:
cpi r28, lo8(__ctors_start)
cpc r29, r17
- cpc r20, r16
+ ldi r24, hh8(__ctors_start)
+ cpc r16, r24
brne .L__do_global_ctors_loop
#else
__do_global_ctors:
@@ -832,22 +832,22 @@ __do_global_ctors:
#if defined(__AVR_HAVE_RAMPZ__)
__do_global_dtors:
ldi r17, hi8(__dtors_end)
- ldi r16, hh8(__dtors_end)
ldi r28, lo8(__dtors_start)
ldi r29, hi8(__dtors_start)
- ldi r20, hh8(__dtors_start)
+ ldi r16, hh8(__dtors_start)
rjmp .L__do_global_dtors_start
.L__do_global_dtors_loop:
sbiw r28, 2
- sbc r20, __zero_reg__
+ sbc r16, __zero_reg__
mov_h r31, r29
mov_l r30, r28
- out __RAMPZ__, r20
+ out __RAMPZ__, r16
XCALL __tablejump_elpm__
.L__do_global_dtors_start:
cpi r28, lo8(__dtors_end)
cpc r29, r17
- cpc r20, r16
+ ldi r24, hh8(__dtors_end)
+ cpc r16, r24
brne .L__do_global_dtors_loop
#else
__do_global_dtors:
next reply other threads:[~2011-04-13 17:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-13 17:00 Georg-Johann Lay [this message]
2011-04-13 20:19 ` Eric Botcazou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DA5D69F.9080508@gjlay.de \
--to=avr@gjlay.de \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).