Fix http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57260 (patch from
gcc's repository). This bugs show up with Xorg, preventing xf86-video-sis and xf86-video-silicon modules from being loaded.
This commit is contained in:
parent
8dfb7255af
commit
bf5517d87e
@ -6522,6 +6522,15 @@ mips_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
|
||||
&& const_call_insn_operand (XEXP (DECL_RTL (decl), 0), VOIDmode))
|
||||
return false;
|
||||
|
||||
/* Sibling calls should not prevent lazy binding. Lazy-binding stubs
|
||||
require $gp to be valid on entry, so sibcalls can only use stubs
|
||||
if $gp is call-clobbered. */
|
||||
if (decl
|
||||
&& TARGET_CALL_SAVED_GP
|
||||
&& !TARGET_ABICALLS_PIC0
|
||||
&& !targetm.binds_local_p (decl))
|
||||
return false;
|
||||
|
||||
/* Otherwise OK. */
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user