PATCH for MIPS conditional-move patterns

Mark Mitchell mark@codesourcery.com
Mon Oct 4 02:30:00 GMT 1999


For reasons I can't fathom, these two conditional-move patterns were
omitted.  The result was unrecognized expressions.

Gavin, I'd much appreciate your eyes on these, even though I already
checked them in.  I cut-and-pasted from neighboring patterns, and I
think I changed what need to change, but I'd appreciate a second
opinion.

Thanks,

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

Mon Oct  4 02:31:20 1999  Mark Mitchell  <mark@codesourcery.com>

	* mips.md: Define conditional move patterns for floating point
	operands and DI mode conditions.

Index: config/mips/mips.md
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/mips/mips.md,v
retrieving revision 1.63
diff -c -p -r1.63 mips.md
*** mips.md	1999/09/23 17:46:23	1.63
--- mips.md	1999/10/04 09:25:01
*************** move\\t%0,%z4\\n\\
*** 10079,10084 ****
--- 10079,10099 ----
  (define_insn ""
    [(set (match_operand:SF 0 "register_operand" "=f,f")
  	(if_then_else:SF
+ 	 (match_operator 4 "equality_op"
+ 			 [(match_operand:DI 1 "se_register_operand" "d,d")
+ 			  (const_int 0)])
+ 	 (match_operand:SF 2 "register_operand" "f,0")
+ 	 (match_operand:SF 3 "register_operand" "0,f")))]
+   "mips_isa >= 4 && TARGET_HARD_FLOAT"
+   "@
+     mov%B4.s\\t%0,%2,%1
+     mov%b4.s\\t%0,%3,%1"
+   [(set_attr "type" "move")
+    (set_attr "mode" "SF")])
+ 
+ (define_insn ""
+   [(set (match_operand:SF 0 "register_operand" "=f,f")
+ 	(if_then_else:SF
  	 (match_operator 3 "equality_op" [(match_operand:CC 4
  							    "register_operand"
  							    "z,z")
*************** move\\t%0,%z4\\n\\
*** 10097,10102 ****
--- 10112,10132 ----
  	(if_then_else:DF
  	 (match_operator 4 "equality_op"
  			 [(match_operand:SI 1 "register_operand" "d,d")
+ 			  (const_int 0)])
+ 	 (match_operand:DF 2 "register_operand" "f,0")
+ 	 (match_operand:DF 3 "register_operand" "0,f")))]
+   "mips_isa >= 4 && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT"
+   "@
+     mov%B4.d\\t%0,%2,%1
+     mov%b4.d\\t%0,%3,%1"
+   [(set_attr "type" "move")
+    (set_attr "mode" "DF")])
+ 
+ (define_insn ""
+   [(set (match_operand:DF 0 "register_operand" "=f,f")
+ 	(if_then_else:DF
+ 	 (match_operator 4 "equality_op"
+ 			 [(match_operand:DI 1 "se_register_operand" "d,d")
  			  (const_int 0)])
  	 (match_operand:DF 2 "register_operand" "f,0")
  	 (match_operand:DF 3 "register_operand" "0,f")))]


More information about the Gcc-patches mailing list