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: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 30 Mar 2005 04:43:33 -0800 (PST)
- Subject: Re: symbol_ref constants
--- Nathan Sidwell <nathan@codesourcery.com> wrote:
> Sanjiv Kumar Gupta wrote:
>
> > add symbol_ref + const_int, r1
> >
> > The relocation entry generated for this insn look
> like
> > symbol + addend.
> >
> > The resultant value is beoyond the relocation
> size,
> > and results into relocation overflow.
>
> > I guess CSE will not do this if I exclude
> constants
> > like symobol_ref + const_int from the insn
> pattern.
> > Currently I allow "nonmemory_operand" for this
> insn.
>
> If your add instructions cannot take symbol refs,
> then
> you need a different predicate -- const_int_operand
> would
> probably be correct.
>
> nathan
>
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?
thanks.
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/