public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/43104]  New: Incorrect code generation for target mcu ATMega164P
@ 2010-02-17 14:48 smal dot root at gmail dot com
  2010-03-08 20:56 ` [Bug target/43104] " eric dot weddington at atmel dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: smal dot root at gmail dot com @ 2010-02-17 14:48 UTC (permalink / raw)
  To: gcc-bugs

Source

volatile uint8_t mUsart0BufferReadPtr;

void Usart0AtModeSkipLine(void)
{
uint8_t rdptr = 0;

        rdptr = mUsart0BufferReadPtr;
        rdptr = mUsart0BufferReadPtr;
        rdptr = mUsart0BufferReadPtr;
}
-------------
Generated asm
+00000694:   93DF        PUSH      R29            Push register on stack
+00000695:   93CF        PUSH      R28            Push register on stack
+00000696:   920F        PUSH      R0             Push register on stack
+00000697:   B7CD        IN        R28,0x3D       In from I/O location
+00000698:   B7DE        IN        R29,0x3E       In from I/O location
179:      uint8_t rdptr = 0;
+00000699:   8219        STD       Y+1,R1         Store indirect with
displacement
181:            rdptr = mUsart0BufferReadPtr;
+0000069A:   91800000    LDS       R24,0x0000     Load direct from data space
+0000069C:   8389        STD       Y+1,R24        Store indirect with
displacement
182:            rdptr = mUsart0BufferReadPtr;
+0000069D:   91800264    LDS       R24,0x0264     Load direct from data space
+0000069F:   8389        STD       Y+1,R24        Store indirect with
displacement
183:            rdptr = mUsart0BufferReadPtr;
+000006A0:   91800264    LDS       R24,0x0264     Load direct from data space
+000006A2:   8389        STD       Y+1,R24        Store indirect with
displacement

------------------------
OS: WinXP
gcc: avr-gcc.EXE (WinAVR 20100110) 4.3.3


-- 
           Summary: Incorrect code generation for target mcu ATMega164P
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: smal dot root at gmail dot com
  GCC host triplet: Win32
GCC target triplet: avr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43104


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

end of thread, other threads:[~2010-09-20  2:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-17 14:48 [Bug c/43104] New: Incorrect code generation for target mcu ATMega164P smal dot root at gmail dot com
2010-03-08 20:56 ` [Bug target/43104] " eric dot weddington at atmel dot com
2010-03-08 21:15 ` smal dot root at gmail dot com
2010-03-08 21:35 ` eric dot weddington at atmel dot com
2010-03-08 21:49 ` smal dot root at gmail dot com
2010-03-08 23:26 ` eric dot weddington at atmel dot com
2010-03-09  1:03 ` smal dot root at gmail dot com
2010-09-20  2:25 ` eric dot weddington at atmel dot com

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