This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: symbol_ref constants
- From: Sanjiv Kumar Gupta <skgnu at yahoo dot com>
- To: James E Wilson <wilson at specifixinc dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 31 Mar 2005 22:05:29 -0800 (PST)
- Subject: Re: symbol_ref constants
--- James E Wilson <wilson@specifixinc.com> 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