aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/mips/mips.c8
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 824cb14..e492f70 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
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
* config/mips/mips.h (FIRST_PSEUDO_REGISTER): Adjust comment.
* config/mips/mips.c (mips_reg_names, mips_sw_reg_names): Add $fcall.
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index f73b1a9..2ed6ab1 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -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;