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]

Fix rs6000.md divmodsi4 pattern


	MQ register is not allowed by gpc_reg_operand predicate.

        * config/rs6000/rs6000.md (divmodsi4): Use register_operand
        predicate for mod result.

Index: rs6000.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.236
diff -c -p -r1.236 rs6000.md
*** rs6000.md	10 Feb 2003 20:13:01 -0000	1.236
--- rs6000.md	11 Feb 2003 20:36:57 -0000
***************
*** 2573,2579 ****
    [(parallel [(set (match_operand:SI 0 "gpc_reg_operand" "")
  		   (div:SI (match_operand:SI 1 "gpc_reg_operand" "")
  			   (match_operand:SI 2 "gpc_reg_operand" "")))
! 	      (set (match_operand:SI 3 "gpc_reg_operand" "")
  		   (mod:SI (match_dup 1) (match_dup 2)))])]
    "TARGET_POWER || (! TARGET_POWER && ! TARGET_POWERPC)"
    "
--- 2573,2579 ----
    [(parallel [(set (match_operand:SI 0 "gpc_reg_operand" "")
  		   (div:SI (match_operand:SI 1 "gpc_reg_operand" "")
  			   (match_operand:SI 2 "gpc_reg_operand" "")))
! 	      (set (match_operand:SI 3 "register_operand" "")
  		   (mod:SI (match_dup 1) (match_dup 2)))])]
    "TARGET_POWER || (! TARGET_POWER && ! TARGET_POWERPC)"
    "
***************
*** 2589,2599 ****
      }
  }")
  
! (define_insn ""
    [(set (match_operand:SI 0 "gpc_reg_operand" "=r")
  	(div:SI (match_operand:SI 1 "gpc_reg_operand" "r")
  		(match_operand:SI 2 "gpc_reg_operand" "r")))
!    (set (match_operand:SI 3 "gpc_reg_operand" "=q")
  	(mod:SI (match_dup 1) (match_dup 2)))]
    "TARGET_POWER"
    "divs %0,%1,%2"
--- 2589,2599 ----
      }
  }")
  
! (define_insn "*divmodsi4_internal"
    [(set (match_operand:SI 0 "gpc_reg_operand" "=r")
  	(div:SI (match_operand:SI 1 "gpc_reg_operand" "r")
  		(match_operand:SI 2 "gpc_reg_operand" "r")))
!    (set (match_operand:SI 3 "register_operand" "=q")
  	(mod:SI (match_dup 1) (match_dup 2)))]
    "TARGET_POWER"
    "divs %0,%1,%2"


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