avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] ldd Y+const not working, bug?


From: Erik Christiansen
Subject: Re: [avr-gcc-list] ldd Y+const not working, bug?
Date: Thu, 11 Nov 2004 15:36:25 +1100
User-agent: Mutt/1.5.6+20040722i

Denis & Marek,

Would you have any advice for this gas rookie, on whether it is
reasonable to attempt to patch the ldi constant-handling code to also
deal with ldd?

We have seen that avr-as successfully deals with this:

alpha: 
   ldi   r16,(beta - alpha)
   .space 200
beta:

(I failed to notice previously that "Warning: expression possibly out of
8-bit range" is flagged for all values, rather than generating an error
if 255 is exceeded. So there is in fact no lack of robustness here.
Sorry)

Apart from the wording of the warning, I don't immediately see any
difference in the required handling.

A stone or two, thrown into the pond, to suggest where to dive for the
ldi constant-handling code would be very helpful indeed, if the idea has
any chance.

Incidentally, since the code snippet generates this in the object file;

000000c8 <beta>:
  c8: 08 ec          ldi   r16, 0xC8   ; 200

it's not quite clear why avr-as can compute this absolute difference
between relocatable values, but not perform a range check afterwards?

Erik


reply via email to

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