public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug target/50289] New: [avr]: call-prologues saveing/restoring global register variables @ 2011-09-04 21:52 gjl at gcc dot gnu.org 2011-09-04 21:53 ` [Bug target/50289] [avr]: call-prologues saving/restoring " gjl at gcc dot gnu.org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: gjl at gcc dot gnu.org @ 2011-09-04 21:52 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50289 Bug #: 50289 Summary: [avr]: call-prologues saveing/restoring global register variables Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: target AssignedTo: unassigned@gcc.gnu.org ReportedBy: gjl@gcc.gnu.org CC: eric.weddington@atmel.com Target: avr void bar (long long, long long, void*); register char x asm ("7"); void foo (char a) { asm volatile ("":::"6"); bar (0, 0, &a); } This small program, compiles with avr-gcc-4.6.1 -mcall-prologues -S -Os -mmcu=atmega8 to foo: ldi r26,lo8(1) ldi r27,hi8(1) ldi r30,lo8(gs(1f)) ldi r31,hi8(gs(1f)) jmp __prologue_saves__+((18 - 13) * 2) 1: This means that __prologue_saves__ from libgcc saves R7 (i.e. R6..R17 and Y) even though R7 is a global register variable and must not saved/restored by function prologue/epilogue. The function to fix is avr.c:sequent_regs_live() ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/50289] [avr]: call-prologues saving/restoring global register variables 2011-09-04 21:52 [Bug target/50289] New: [avr]: call-prologues saveing/restoring global register variables gjl at gcc dot gnu.org @ 2011-09-04 21:53 ` gjl at gcc dot gnu.org 2011-09-05 12:21 ` gjl at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: gjl at gcc dot gnu.org @ 2011-09-04 21:53 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50289 Georg-Johann Lay <gjl at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P4 Status|UNCONFIRMED |NEW Last reconfirmed| |2011-09-04 Target Milestone|--- |4.6.2 Ever Confirmed|0 |1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/50289] [avr]: call-prologues saving/restoring global register variables 2011-09-04 21:52 [Bug target/50289] New: [avr]: call-prologues saveing/restoring global register variables gjl at gcc dot gnu.org 2011-09-04 21:53 ` [Bug target/50289] [avr]: call-prologues saving/restoring " gjl at gcc dot gnu.org @ 2011-09-05 12:21 ` gjl at gcc dot gnu.org 2011-09-05 12:24 ` gjl at gcc dot gnu.org 2011-09-05 12:27 ` gjl at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: gjl at gcc dot gnu.org @ 2011-09-05 12:21 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50289 --- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-09-05 12:20:18 UTC --- Author: gjl Date: Mon Sep 5 12:20:03 2011 New Revision: 178528 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178528 Log: PR target/50289 * config/avr/avr.c (sequent_regs_live): Don't recognize sequences that contain global register variable. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr.c ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/50289] [avr]: call-prologues saving/restoring global register variables 2011-09-04 21:52 [Bug target/50289] New: [avr]: call-prologues saveing/restoring global register variables gjl at gcc dot gnu.org 2011-09-04 21:53 ` [Bug target/50289] [avr]: call-prologues saving/restoring " gjl at gcc dot gnu.org 2011-09-05 12:21 ` gjl at gcc dot gnu.org @ 2011-09-05 12:24 ` gjl at gcc dot gnu.org 2011-09-05 12:27 ` gjl at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: gjl at gcc dot gnu.org @ 2011-09-05 12:24 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50289 --- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-09-05 12:24:17 UTC --- Author: gjl Date: Mon Sep 5 12:24:06 2011 New Revision: 178529 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178529 Log: PR target/50289 Backport from mainline r178528 * config/avr/avr.c (sequent_regs_live): Don't recognize sequences that contain global register variable. Modified: branches/gcc-4_6-branch/gcc/ChangeLog branches/gcc-4_6-branch/gcc/config/avr/avr.c ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/50289] [avr]: call-prologues saving/restoring global register variables 2011-09-04 21:52 [Bug target/50289] New: [avr]: call-prologues saveing/restoring global register variables gjl at gcc dot gnu.org ` (2 preceding siblings ...) 2011-09-05 12:24 ` gjl at gcc dot gnu.org @ 2011-09-05 12:27 ` gjl at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: gjl at gcc dot gnu.org @ 2011-09-05 12:27 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50289 Georg-Johann Lay <gjl at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED AssignedTo|unassigned at gcc dot |gjl at gcc dot gnu.org |gnu.org | --- Comment #3 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-09-05 12:26:35 UTC --- Fixed for the 4.6.2 Milestone. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-09-05 12:27 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-09-04 21:52 [Bug target/50289] New: [avr]: call-prologues saveing/restoring global register variables gjl at gcc dot gnu.org 2011-09-04 21:53 ` [Bug target/50289] [avr]: call-prologues saving/restoring " gjl at gcc dot gnu.org 2011-09-05 12:21 ` gjl at gcc dot gnu.org 2011-09-05 12:24 ` gjl at gcc dot gnu.org 2011-09-05 12:27 ` gjl at gcc dot gnu.org
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).