mips.c (mips_expand_call): Don't allow laziy binding for n32 & n64 abicalls.
authorRichard Sandiford <rsandifo@redhat.com>
Fri, 5 Dec 2003 10:45:50 +0000 (10:45 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Fri, 5 Dec 2003 10:45:50 +0000 (10:45 +0000)
* config/mips/mips.c (mips_expand_call): Don't allow laziy binding
for n32 & n64 abicalls.

From-SVN: r74324

gcc/ChangeLog
gcc/config/mips/mips.c

index 824cb149a826f63cb275ca1e5852285e1def9911..e492f702dfde8ed53c312159378daa2715d0eaf9 100644 (file)
@@ -1,3 +1,8 @@
+2003-12-05  Richard Sandiford  <rsandifo@redhat.com>
+
+       * config/mips/mips.c (mips_expand_call): Don't allow laziy binding
+       for n32 & n64 abicalls.
+
 2003-12-05  Richard Sandiford  <rsandifo@redhat.com>
 
        PR bootstrap/13145
index f73b1a9798518a3cb58597f60a1b830f025b1994..2ed6ab167bfda907ff2d8a1b0b04b5824e918c0d 100644 (file)
@@ -3187,7 +3187,13 @@ mips_expand_call (rtx result, rtx addr, rtx args_size, rtx aux, int sibcall_p)
 {
   if (!call_insn_operand (addr, VOIDmode))
     {
-      if (TARGET_EXPLICIT_RELOCS && global_got_operand (addr, VOIDmode))
+      /* If we're generating PIC, and this call is to a global function,
+        try to allow its address to be resolved lazily.  This isn't
+        possible for NewABI sibcalls since the value of $gp on entry
+        to the stub would be our caller's gp, not ours.  */
+      if (TARGET_EXPLICIT_RELOCS
+         && !(sibcall_p && TARGET_NEWABI)
+         && global_got_operand (addr, VOIDmode))
        {
          rtx high, lo_sum_symbol;