From 01bdc11e45553255fab8a1319c70442cd08fc027 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Fri, 5 Dec 2003 10:45:50 +0000 Subject: [PATCH] mips.c (mips_expand_call): Don't allow laziy binding for n32 & n64 abicalls. * config/mips/mips.c (mips_expand_call): Don't allow laziy binding for n32 & n64 abicalls. From-SVN: r74324 --- gcc/ChangeLog | 5 +++++ gcc/config/mips/mips.c | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 824cb149a82..e492f702dfd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-12-05 Richard Sandiford + + * config/mips/mips.c (mips_expand_call): Don't allow laziy binding + for n32 & n64 abicalls. + 2003-12-05 Richard Sandiford PR bootstrap/13145 diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index f73b1a97985..2ed6ab167bf 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; -- 2.30.2