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/