>In the CVS log's I see his patch changed made the read word return to
>r30:r31. But I can't figure out why.
>
>> I like the idea of your proposed approach, to change the EEPROM
routines
>> into C functions.

IIRC, the reason is simply due to the restrictions of inline avr
assembly. You could require a parameter to be passed in a specific
register only by using x,y or z register specifiers (there are two
others for r0 and r1 IIRC, but those were not useable). There is no such
identifier, unfortunately, for other registers. So if I want to return
values in registers by the assembly inline, I have to use x, y or z.

I know that in complicated code, this could irritate the dreaded reload
pass so that the compiler does not find how to allocate a new pointer
register. :-(

HTH,

Bjoern.


_______________________________________________
AVR-libc-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to