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]

[3.4/head] fix alphaev4 execute/nestfunc-5.c


This and the following two patches were tested simultaneously on
alphaev4-, alphaev5-, alphaev56-, alphaev67-linux.

Not sure what was different between ev4 and my normal ev67 tester,
but in execute/nestfunc-5.c we emitted one half of a ldgp pair,
which is an assembler error.  In the case in question, we shouldn't
have generated either half.

The problem is that in this test case, we have an edge from the
call to exit back to the non-local label (which is right).  This
edge keeps the GP live, so the peep2_regno_dead_p check isn't
complete enough.


r~



        * config/alpha/alpha.md (call peepholes): Check for REG_NORETURN
        as well as $29 dead.

Index: alpha.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.md,v
retrieving revision 1.215.6.1
diff -c -p -d -r1.215.6.1 alpha.md
*** alpha.md	19 Jan 2004 09:53:46 -0000	1.215.6.1
--- alpha.md	19 Jan 2004 19:36:28 -0000
***************
*** 4718,4724 ****
  	      (clobber (reg:DI 26))])]
    "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && reload_completed
     && ! samegp_function_operand (operands[0], Pmode)
!    && peep2_regno_dead_p (1, 29)"
    [(parallel [(call (mem:DI (match_dup 2))
  		    (match_dup 1))
  	      (set (reg:DI 26) (plus:DI (pc) (const_int 4)))
--- 4718,4725 ----
  	      (clobber (reg:DI 26))])]
    "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && reload_completed
     && ! samegp_function_operand (operands[0], Pmode)
!    && (peep2_regno_dead_p (1, 29)
!        || find_reg_note (insn, REG_NORETURN, NULL_RTX))"
    [(parallel [(call (mem:DI (match_dup 2))
  		    (match_dup 1))
  	      (set (reg:DI 26) (plus:DI (pc) (const_int 4)))
***************
*** 4748,4754 ****
  	      (clobber (reg:DI 26))])]
    "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && reload_completed
     && ! samegp_function_operand (operands[0], Pmode)
!    && ! peep2_regno_dead_p (1, 29)"
    [(parallel [(call (mem:DI (match_dup 2))
  		    (match_dup 1))
  	      (set (reg:DI 26) (plus:DI (pc) (const_int 4)))
--- 4749,4756 ----
  	      (clobber (reg:DI 26))])]
    "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && reload_completed
     && ! samegp_function_operand (operands[0], Pmode)
!    && ! (peep2_regno_dead_p (1, 29)
!          || find_reg_note (insn, REG_NORETURN, NULL_RTX))"
    [(parallel [(call (mem:DI (match_dup 2))
  		    (match_dup 1))
  	      (set (reg:DI 26) (plus:DI (pc) (const_int 4)))
***************
*** 7895,7901 ****
  	      (clobber (reg:DI 26))])]
    "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && reload_completed
     && ! samegp_function_operand (operands[1], Pmode)
!    && peep2_regno_dead_p (1, 29)"
    [(parallel [(set (match_dup 0)
  		   (call (mem:DI (match_dup 3))
  			 (match_dup 2)))
--- 7863,7870 ----
  	      (clobber (reg:DI 26))])]
    "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && reload_completed
     && ! samegp_function_operand (operands[1], Pmode)
!    && (peep2_regno_dead_p (1, 29)
!        || find_reg_note (insn, REG_NORETURN, NULL_RTX))"
    [(parallel [(set (match_dup 0)
  		   (call (mem:DI (match_dup 3))
  			 (match_dup 2)))
***************
*** 7927,7933 ****
  	      (clobber (reg:DI 26))])]
    "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && reload_completed
     && ! samegp_function_operand (operands[1], Pmode)
!    && ! peep2_regno_dead_p (1, 29)"
    [(parallel [(set (match_dup 0)
  		   (call (mem:DI (match_dup 3))
  			 (match_dup 2)))
--- 7896,7903 ----
  	      (clobber (reg:DI 26))])]
    "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && reload_completed
     && ! samegp_function_operand (operands[1], Pmode)
!    && ! (peep2_regno_dead_p (1, 29)
!          || find_reg_note (insn, REG_NORETURN, NULL_RTX))"
    [(parallel [(set (match_dup 0)
  		   (call (mem:DI (match_dup 3))
  			 (match_dup 2)))


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