How to legitimize the reload address?
Ian Lance Taylor
iant@google.com
Wed May 21 13:52:00 GMT 2008
"Mohamed Shafi" <shafitvm@gmail.com> writes:
> Everything starts when cleanup_subreg_operands() is called from
> reload() for the following pattern.
>
> (set (subreg:HI (mem:SI (plus:HI (reg:HI 12 [SP]) (const_int 256)) 2)
> (reg:HI 3))
I think your movhi operand predicate may have to look for this case
and reject it.
> This pattern is not legitimate due to out of range offset.
> Will i be able to overcome this if i write LEGITIMIZE_RELOAD_ADDRESS
> or LEGITIMIZE_ADDRESS
No, because those won't reliably be called on a legitimate address.
You need to reject the operand at some point.
Ian
More information about the Gcc
mailing list