re PR target/32313 (Bootstrap failure running gengtype in stage 2.)

PR target/32313
	* config/mips/mips.c (mips_expand_call): Mark $gp as used by
	local function call.

From-SVN: r125818
This commit is contained in:
David Daney 2007-06-18 17:36:42 +00:00 committed by David Daney
parent 046d30f4e0
commit d4977f6ca6
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2007-06-18 David Daney <ddaney@avtrex.com
PR target/32313
* config/mips/mips.c (mips_expand_call): Mark $gp as used by
local function call.
2007-06-18 Kenneth Zadeck <zadeck@naturalbridge.com>
PR middle-end/32355

View File

@ -3562,8 +3562,13 @@ mips_expand_call (rtx result, rtx addr, rtx args_size, rtx aux, int sibcall_p)
insn = emit_call_insn (pattern);
/* Lazy-binding stubs require $gp to be valid on entry. */
if (mips_ok_for_lazy_binding_p (orig_addr))
/* Lazy-binding stubs require $gp to be valid on entry. So does the
case of calling a local function with TARGET_ABICALLS and
-mno-shared (a.k.a. TARGET_ABSOLUTE_ABICALLS). */
if (mips_ok_for_lazy_binding_p (orig_addr)
|| (TARGET_ABSOLUTE_ABICALLS
&& (GET_CODE (orig_addr) == SYMBOL_REF)
&& targetm.binds_local_p (SYMBOL_REF_DECL (orig_addr))))
use_reg (&CALL_INSN_FUNCTION_USAGE (insn), pic_offset_table_rtx);
}