This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

MIPS patch for n32/n64 sibcalls


Another problem with mips lazy binding.  I found this while reading
the code,  I don't know of a specific test case that fails because of it.

Anyway, we're allowing lazy binding of sibcalls for n32 & n64.
That can't work because the stub needs access to the caller's $gp,
not the caller's caller's.

Bootstrapped & regression tested on mips-sgi-irix6.5 and mips64el-linux-gnu.
OK to install?

Richard


	* config/mips/mips.c (mips_expand_call): Don't allow laziy binding
	for n32 & n64 abicalls.

Common subdirectories: config/mips.13145/CVS and config/mips/CVS
diff -cpd config/mips.13145/mips.c config/mips/mips.c
*** config/mips.13145/mips.c	Sat Nov 29 08:42:24 2003
--- config/mips/mips.c	Sat Nov 29 16:01:35 2003
*************** mips_expand_call (rtx result, rtx addr, 
*** 3187,3193 ****
  {
    if (!call_insn_operand (addr, VOIDmode))
      {
!       if (TARGET_EXPLICIT_RELOCS && global_got_operand (addr, VOIDmode))
  	{
  	  rtx high, lo_sum_symbol, reg;
  
--- 3187,3199 ----
  {
    if (!call_insn_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, reg;
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]