Sanjiv Kumar Gupta wrote:
Thanks for a prompt reply, Nathan. The add insn can take a symbol_ref, which is converted to const_int during relocation. 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?
you could do that, but I don't understand why symref+const is not allowed. After all, you could have a different plain symref whose value was the original symbol+const.
I.e. why is add r1,foo+10 not allowed, but add r1,baz allowed. When linking baz could be defined as 'foo+10'. so what's going on?
nathan -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC [EMAIL PROTECTED] :: http://www.planetfall.pwp.blueyonder.co.uk