This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
symbol_ref constants
- From: Sanjiv Kumar Gupta <skgnu at yahoo dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 30 Mar 2005 03:57:18 -0800 (PST)
- Subject: symbol_ref constants
My port have insns like
add symbol_ref, r1
We emit relocation entries for symbol_ref.
Now CSE (-O2) combines insns like below
mov symbol_ref, r0
add const_int, r0
add r0, r1
to
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.
But the code works fine with -O0, since the relocation
generated for symbol is within the limits.
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.
Thanks for any help on this.
Regards
--Sanjiv
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/