[nios2, committed] allow constant offset with %gprel

Sandra Loosemore sandra@codesourcery.com
Sun Jul 5 21:59:00 GMT 2015


I've checked in the attached patch to fix an oversight in the handling 
of GP-relative addressing modes in the nios2 back end.  It allows GCC to 
generate addresses of the form "%gprel(sym+offset)(gp)" instead of just 
"%gprel(sym)(gp)".  Formerly GCC required a scratch register and extra 
instruction to compute the address in this case, but in fact both the 
assembler and underlying relocation support a constant offset with %gprel.

-Sandra

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-gprel.log
Type: text/x-log
Size: 569 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150705/fbbf2563/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-gprel.patch
Type: text/x-patch
Size: 2695 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150705/fbbf2563/attachment-0001.bin>


More information about the Gcc-patches mailing list