--- James E Wilson <[EMAIL PROTECTED]> wrote:
> 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
> 
Thank Jim, for your help.
I have fixed the problem by disallowing such operands
for the insn.
It was actually a signed offset, and the sign bit of
large negative offset was getting lost during
relocation. So adding the same constant wouldn't
restore it back.

Thanks again.

Regards
--Sanjiv

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to