public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "aesok at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/36424] New: avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization Date: Mon, 02 Jun 2008 17:56:00 -0000 [thread overview] Message-ID: <bug-36424-13216@http.gcc.gnu.org/bugzilla/> (raw) 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
next reply other threads:[~2008-06-02 17:56 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-06-02 17:56 aesok at gcc dot gnu dot org [this message] 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
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=bug-36424-13216@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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: linkBe 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).