Commit 006257dc by Richard Sandiford Committed by Richard Sandiford

mips.c (mips_ok_for_lazy_binding_p): Always return false for locally-binding symbols.

gcc/
	* config/mips/mips.c (mips_ok_for_lazy_binding_p): Always return
	false for locally-binding symbols.
	(mips_dangerous_for_la25_p): Check mips_global_symbol_p.

From-SVN: r123754
parent eb28fb7d
2007-04-12 Richard Sandiford <richard@codesourcery.com> 2007-04-12 Richard Sandiford <richard@codesourcery.com>
* config/mips/mips.c (mips_ok_for_lazy_binding_p): Always return
false for locally-binding symbols.
(mips_dangerous_for_la25_p): Check mips_global_symbol_p.
2007-04-12 Richard Sandiford <richard@codesourcery.com>
* config/mips/mips-protos.h (SYMBOL_GOT_LOCAL): Rename to... * config/mips/mips-protos.h (SYMBOL_GOT_LOCAL): Rename to...
(SYMBOL_GOT_PAGE_OFST): ...this. (SYMBOL_GOT_PAGE_OFST): ...this.
(SYMBOL_GOT_GLOBAL): Rename to... (SYMBOL_GOT_GLOBAL): Rename to...
......
...@@ -3367,9 +3367,7 @@ mips_ok_for_lazy_binding_p (rtx x) ...@@ -3367,9 +3367,7 @@ mips_ok_for_lazy_binding_p (rtx x)
{ {
return (TARGET_USE_GOT return (TARGET_USE_GOT
&& GET_CODE (x) == SYMBOL_REF && GET_CODE (x) == SYMBOL_REF
&& (TARGET_ABSOLUTE_ABICALLS && !mips_symbol_binds_local_p (x));
? !mips_symbol_binds_local_p (x)
: mips_global_symbol_p (x)));
} }
/* Load function address ADDR into register DEST. SIBCALL_P is true /* Load function address ADDR into register DEST. SIBCALL_P is true
...@@ -7630,7 +7628,10 @@ mips_cannot_change_mode_class (enum machine_mode from, ...@@ -7630,7 +7628,10 @@ mips_cannot_change_mode_class (enum machine_mode from,
bool bool
mips_dangerous_for_la25_p (rtx x) mips_dangerous_for_la25_p (rtx x)
{ {
return !TARGET_EXPLICIT_RELOCS && mips_ok_for_lazy_binding_p (x); return (!TARGET_EXPLICIT_RELOCS
&& TARGET_USE_GOT
&& GET_CODE (x) == SYMBOL_REF
&& mips_global_symbol_p (x));
} }
/* Implement PREFERRED_RELOAD_CLASS. */ /* Implement PREFERRED_RELOAD_CLASS. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment