public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/36424] New: avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization
@ 2008-06-02 17:56 aesok at gcc dot gnu dot org
2008-06-02 18:06 ` [Bug target/36424] " aesok at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: aesok at gcc dot gnu dot org @ 2008-06-02 17:56 UTC (permalink / raw)
To: gcc-bugs
Testcase:
#include <avr/io.h>
#include <avr/interrupt.h>
volatile unsigned char UART_RxChar;
volatile unsigned char UART_ReceivedChar;
SIGNAL(SIG_USART_RECV)
{
/* Indicate that the UART has received a character */
UART_ReceivedChar = 1;
/* Store received character */
UART_RxChar = UDR;
}
Request: use -frename-registers optimization, enabled on -O3.
Result code:
.global __vector_13
.type __vector_13, @function
__vector_13:
.LFB2:
.LM1:
push __zero_reg__
push r0
in r0,__SREG__
push r0
clr __zero_reg__
push r24
/* prologue: Signal */
/* frame size = 0 */
.LM2:
ldi r26,lo8(1)
sts UART_ReceivedChar,r26
.LM3:
lds r24,198
sts UART_RxChar,r24
/* epilogue start */
.LM4:
pop r24
pop r0
out __SREG__,r0
pop r0
pop __zero_reg__
reti
R26 register used in ISR but don't saved/restored.
To fix bug, need define HARD_REGNO_RENAME_OK macro in config/avr.h
Anatoly.
--
Summary: avr-gcc use don't saved registers in ISR with -O3 ('-
frename-registers' ) optimization
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: aesok at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36424
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/36424] avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization
2008-06-02 17:56 [Bug target/36424] New: avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization aesok at gcc dot gnu dot org
@ 2008-06-02 18:06 ` aesok at gcc dot gnu dot org
2008-06-04 22:56 ` eric dot weddington at atmel dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: aesok at gcc dot gnu dot org @ 2008-06-02 18:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from aesok at gcc dot gnu dot org 2008-06-02 18:06 -------
Created an attachment (id=15713)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15713&action=view)
The patch for 36424
--
aesok at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |aesok at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36424
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/36424] avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization
2008-06-02 17:56 [Bug target/36424] New: avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization aesok at gcc dot gnu dot org
2008-06-02 18:06 ` [Bug target/36424] " aesok at gcc dot gnu dot org
@ 2008-06-04 22:56 ` eric dot weddington at atmel dot com
2008-06-08 16:09 ` aesok at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: eric dot weddington at atmel dot com @ 2008-06-04 22:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from eric dot weddington at atmel dot com 2008-06-04 22:55 -------
*** Bug 36423 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36424
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/36424] avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization
2008-06-02 17:56 [Bug target/36424] New: avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization aesok at gcc dot gnu dot org
2008-06-02 18:06 ` [Bug target/36424] " aesok at gcc dot gnu dot org
2008-06-04 22:56 ` eric dot weddington at atmel dot com
@ 2008-06-08 16:09 ` aesok at gcc dot gnu dot org
2008-06-08 17:33 ` eric dot weddington at atmel dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: aesok at gcc dot gnu dot org @ 2008-06-08 16:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from aesok at gcc dot gnu dot org 2008-06-08 16:08 -------
Subject: Bug 36424
Author: aesok
Date: Sun Jun 8 16:08:08 2008
New Revision: 136562
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136562
Log:
PR target/36424
* config/avr/avr.h (HARD_REGNO_RENAME_OK): Define.
* config/avr/avr.c (avr_hard_regno_rename_ok): New function.
* config/avr/avr-protos.h (avr_hard_regno_rename_ok): New prototype.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr-protos.h
trunk/gcc/config/avr/avr.c
trunk/gcc/config/avr/avr.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36424
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/36424] avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization
2008-06-02 17:56 [Bug target/36424] New: avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization aesok at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-06-08 16:09 ` aesok at gcc dot gnu dot org
@ 2008-06-08 17:33 ` eric dot weddington at atmel dot com
2008-06-15 21:33 ` aesok at gcc dot gnu dot org
2008-06-15 21:37 ` aesok at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: eric dot weddington at atmel dot com @ 2008-06-08 17:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from eric dot weddington at atmel dot com 2008-06-08 17:32 -------
Fixed for 4.4.0.
--
eric dot weddington at atmel dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36424
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/36424] avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization
2008-06-02 17:56 [Bug target/36424] New: avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization aesok at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-06-08 17:33 ` eric dot weddington at atmel dot com
@ 2008-06-15 21:33 ` aesok at gcc dot gnu dot org
2008-06-15 21:37 ` aesok at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: aesok at gcc dot gnu dot org @ 2008-06-15 21:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from aesok at gcc dot gnu dot org 2008-06-15 21:33 -------
Subject: Bug 36424
Author: aesok
Date: Sun Jun 15 21:32:29 2008
New Revision: 136826
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136826
Log:
PR target/36424
* config/avr/avr.h (HARD_REGNO_RENAME_OK): Define.
* config/avr/avr.c (avr_hard_regno_rename_ok): New function.
* config/avr/avr-protos.h (avr_hard_regno_rename_ok): New prototype.
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/config/avr/avr-protos.h
branches/gcc-4_3-branch/gcc/config/avr/avr.c
branches/gcc-4_3-branch/gcc/config/avr/avr.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36424
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/36424] avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization
2008-06-02 17:56 [Bug target/36424] New: avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization aesok at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-06-15 21:33 ` aesok at gcc dot gnu dot org
@ 2008-06-15 21:37 ` aesok at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: aesok at gcc dot gnu dot org @ 2008-06-15 21:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from aesok at gcc dot gnu dot org 2008-06-15 21:36 -------
Fixed for 4.3.2.
--
aesok at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.4.0 |4.3.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36424
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-06-15 21:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-02 17:56 [Bug target/36424] New: avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization aesok at gcc dot gnu dot org
2008-06-02 18:06 ` [Bug target/36424] " aesok at gcc dot gnu dot org
2008-06-04 22:56 ` eric dot weddington at atmel dot com
2008-06-08 16:09 ` aesok at gcc dot gnu dot org
2008-06-08 17:33 ` eric dot weddington at atmel dot com
2008-06-15 21:33 ` aesok at gcc dot gnu dot org
2008-06-15 21:37 ` aesok at gcc dot gnu dot 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).