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.1] GCC PowerPC ICE fix


	The following patch fixes the ICE reported by on the GCC
mailinglist two days ago.  The code example worked on GCC 2.95 but failed
on GCC 3.0 and GCC 3.1 and the development trunk.  I have bootstrapped the
pach with no regressions and applied it to the trunk.

	Mark, may I apply this patch to the GCC 3.1 branch?

Thanks, David


	* config/rs6000/rs6000.md (sCC pattern): Remove clobber and use
	result as temporary value.

Index: rs6000.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.180
diff -c -p -r1.180 rs6000.md
*** rs6000.md	23 Apr 2002 00:19:14 -0000	1.180
--- rs6000.md	26 Apr 2002 15:20:46 -0000
***************
*** 10846,10863 ****
  			       (match_dup 4)))])
  
  (define_insn ""
!   [(set (match_operand:SI 0 "gpc_reg_operand" "=r,r,r,r,r")
  	(plus:SI (eq:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r,r,r,r")
  			(match_operand:SI 2 "reg_or_cint_operand" "r,O,K,L,I"))
! 		 (match_operand:SI 3 "gpc_reg_operand" "r,r,r,r,r")))
!    (clobber (match_scratch:SI 4 "=&r,&r,&r,&r,&r"))]
    "! TARGET_POWERPC64"
    "@
!    xor %4,%1,%2\;{sfi|subfic} %4,%4,0\;{aze|addze} %0,%3
!    {sfi|subfic} %4,%1,0\;{aze|addze} %0,%3
!    {xoril|xori} %4,%1,%b2\;{sfi|subfic} %4,%4,0\;{aze|addze} %0,%3
!    {xoriu|xoris} %4,%1,%u2\;{sfi|subfic} %4,%4,0\;{aze|addze} %0,%3
!    {sfi|subfic} %4,%1,%2\;{sfi|subfic} %4,%4,0\;{aze|addze} %0,%3"
    [(set_attr "length" "12,8,12,12,12")])
  
  (define_insn ""
--- 10846,10862 ----
  			       (match_dup 4)))])
  
  (define_insn ""
!   [(set (match_operand:SI 0 "gpc_reg_operand" "=&r,&r,&r,&r,&r")
  	(plus:SI (eq:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r,r,r,r")
  			(match_operand:SI 2 "reg_or_cint_operand" "r,O,K,L,I"))
! 		 (match_operand:SI 3 "gpc_reg_operand" "r,r,r,r,r")))]
    "! TARGET_POWERPC64"
    "@
!    xor %0,%1,%2\;{sfi|subfic} %0,%0,0\;{aze|addze} %0,%3
!    {sfi|subfic} %0,%1,0\;{aze|addze} %0,%3
!    {xoril|xori} %0,%1,%b2\;{sfi|subfic} %0,%0,0\;{aze|addze} %0,%3
!    {xoriu|xoris} %0,%1,%u2\;{sfi|subfic} %0,%0,0\;{aze|addze} %0,%3
!    {sfi|subfic} %0,%1,%2\;{sfi|subfic} %0,%0,0\;{aze|addze} %0,%3"
    [(set_attr "length" "12,8,12,12,12")])
  
  (define_insn ""


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