[Bug target/46779] wrong code generation for array access

mschulze at ivs dot cs.ovgu.de gcc-bugzilla@gcc.gnu.org
Fri Dec 3 14:16:00 GMT 2010


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

--- Comment #4 from Michael Schulze <mschulze at ivs dot cs.ovgu.de> 2010-12-03 14:16:30 UTC ---
> I don't know anything about AVR, so I can't say that (I just noticed the r1
> issue).
Ok due to the compiler abi for the avr, r0,r1 are fixed registers that are
never allocated by gcc for local data, but often used for fixed purposes. r0 is
a temporary register that may be globbered by any C-code. r1 is assumed to be
always zero in any C-code. This is the reason, why it is cleared at the end of
the inline assembler.



More information about the Gcc-bugs mailing list