I386.md: *_mixed and *_sse

Ye, Joey joey.ye@intel.com
Wed Apr 23 11:06:00 GMT 2008


Hi,

From i386.md, alternative 1 of *fop_sf_comm_mixed is duplicated with
*fop_sf_comm_sse. Why do we define a _mixed pattern here?

(define_insn "*fop_sf_comm_mixed"
  [(set (match_operand:SF 0 "register_operand" "=f,x")
	(match_operator:SF 3 "binary_fp_operator"
			[(match_operand:SF 1 "nonimmediate_operand"
"%0,0")
			 (match_operand:SF 2 "nonimmediate_operand"
"fm,xm")]))]
  "TARGET_MIX_SSE_I387
   && COMMUTATIVE_ARITH_P (operands[3])
   && !(MEM_P (operands[1]) && MEM_P (operands[2]))"
  "* return output_387_binary_op (insn, operands);"
  [(set (attr "type")
	(if_then_else (eq_attr "alternative" "1")
	   (if_then_else (match_operand:SF 3 "mult_operator" "")
	      (const_string "ssemul")
	      (const_string "sseadd"))
	   (if_then_else (match_operand:SF 3 "mult_operator" "")
	      (const_string "fmul")
	      (const_string "fop"))))
   (set_attr "mode" "SF")])

(define_insn "*fop_sf_comm_sse"
  [(set (match_operand:SF 0 "register_operand" "=x")
	(match_operator:SF 3 "binary_fp_operator"
			[(match_operand:SF 1 "nonimmediate_operand"
"%0")
			 (match_operand:SF 2 "nonimmediate_operand"
"xm")]))]
  "TARGET_SSE_MATH
   && COMMUTATIVE_ARITH_P (operands[3])
   && !(MEM_P (operands[1]) && MEM_P (operands[2]))"
  "* return output_387_binary_op (insn, operands);"
  [(set (attr "type")
        (if_then_else (match_operand:SF 3 "mult_operator" "")
	   (const_string "ssemul")
	   (const_string "sseadd")))
   (set_attr "mode" "SF")])

Thanks - Joey



More information about the Gcc mailing list