Merged ARM-Thumb branch...

Richard Earnshaw rearnsha@arm.com
Fri Feb 11 04:00:00 GMT 2000


> > Could you give me an example of why this is needed;

> This was so long ago.  This patch dates from 1998, and was probably made by Pat
> Beirne (who is probably in the thick of the Inprise acquistion ATM).  If I
> remember correctly, this patch ensures that local objects that are going to
> require a GOTOFF reloc have a load of sl with the address of the GOT.

Hmm, I think this was fixed more generally some time back (these aren't 
valid PIC operands):

Sat Feb 13 05:32:00 1999  Richard Earnshaw  (rearnsha@arm.com)

        * arm.h ...
        (GO_IF_LEGITIMATE_ADDRESS): When generating PIC, references to 
symbols
        in the constant pool aren't valid.
        (LEGITIMATE_PIC_OPERAND_P): Likewise.

> If I remember correctly, the label_mentioned_p() is needed if someone 
> does arithmetic with a label or the address of a label.
> 

But a non-constant expression involving a label isn't a valid 
general_operand for the ARM, so it shouldn't even be passed to movsi.  If 
it is getting through then the bug is elsewhere, not in movsi.  Constant 
expressions would be either pure LABEL_REFs or and expression wrapped 
inside CONST; either way, CONSTANT_P will be true for these and the 
existing test will be sufficient.

Richard.




More information about the Gcc mailing list