]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config/nios2/nios2.cc
nios2: Fix PIC function call slowness
[thirdparty/gcc.git] / gcc / config / nios2 / nios2.cc
index f193cde5a345345dc430ca0e211b6fb0c60d1a46..1a33c88f19fb6c896fb7ab3977875c2454e5538f 100644 (file)
@@ -2552,7 +2552,10 @@ nios2_load_pic_address (rtx sym, int unspec, rtx tmp)
       return nios2_large_got_address (offset, tmp);
     }
 
-  return gen_const_mem (Pmode, nios2_got_address (sym, unspec));
+  if (unspec == UNSPEC_PIC_CALL_SYM)
+    return gen_rtx_MEM (Pmode, nios2_got_address (sym, unspec));
+  else
+    return gen_const_mem (Pmode, nios2_got_address (sym, unspec));
 }
 
 /* Nonzero if the constant value X is a legitimate general operand