[Bug target/53033] New: [avr]: Wrong register number for 3-byte loads via X
gjl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Apr 18 19:54:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53033
Bug #: 53033
Summary: [avr]: Wrong register number for 3-byte loads via X
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: gjl@gcc.gnu.org
Target: avr
void foo (__int24 *p)
{
void bar (__int24);
asm ("" : "+x" (p));
bar (*++p);
}
Compile with
$ avr-gcc foo.c -S -Os
and the generated code is
foo:
mov r26,r24
mov r27,r25
adiw r26,3
ld r24,X+
ld r25,X+
ld r26,X
sbiw r26,3+2
rjmp bar
The destination register of the PSI move is always R24.
More information about the Gcc-bugs
mailing list