This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: symbol_ref constants


Sanjiv Kumar Gupta wrote:
But I don't want to
allow expressions like (const:SI (plus:SI
symbol_ref:SI) (const_int)) in the insn.
How should I do that, do I need to implement
LEGITIMATE_CONST_P () accordingly?

Try making CONSTANT_ADDRESS_P reject the value.


Though it still isn't clear why you are getting relocation errors. If addresses wrap around at segment boundaries, then this should just work fine. a-40 gets converted into a very large positive segment offset that then wraps around back to a when 40 is added to it. Perhaps the assembler/linker need some work to handle this correctly.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]