[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: [avr-libc-dev] eeprom_read_word causes problems for the compiler

From: Haase Bjoern (PT/EMM1)
Subject: AW: [avr-libc-dev] eeprom_read_word causes problems for the compiler
Date: Mon, 15 Oct 2007 09:07:56 +0200

>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
>> 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. :-(



reply via email to

[Prev in Thread] Current Thread [Next in Thread]