[(set (reg:CC 17)
(compare:CC (match_operand:DF 0 "cmp_fp_expander_operand" "")
(match_operand:DF 1 "cmp_fp_expander_operand" "")))]
- "TARGET_80387"
+ "TARGET_80387 || TARGET_SSE2"
"
{
ix86_compare_op0 = operands[0];
[(set (reg:CC 17)
(compare:CC (match_operand:SF 0 "cmp_fp_expander_operand" "")
(match_operand:SF 1 "cmp_fp_expander_operand" "")))]
- "TARGET_80387"
+ "TARGET_80387 || TARGET_SSE"
"
{
ix86_compare_op0 = operands[0];
(compare:CCFP (match_operand 0 "register_operand" "f")
(match_operand 1 "register_operand" "f")))]
"TARGET_80387 && TARGET_CMOVE
+ && !SSE_FLOAT_MODE_P (GET_MODE (operands[0]))
&& FLOAT_MODE_P (GET_MODE (operands[0]))
&& GET_MODE (operands[0]) == GET_MODE (operands[0])"
"* return output_fp_compare (insn, operands, 1, 0);"
(set_attr "mode" "unknownfp")
(set_attr "athlon_decode" "vector")])
+(define_insn "*cmpfp_i_sse"
+ [(set (reg:CCFP 17)
+ (compare:CCFP (match_operand 0 "register_operand" "f#x,x#f")
+ (match_operand 1 "nonimmediate_operand" "f#x,xm#f")))]
+ "TARGET_80387
+ && SSE_FLOAT_MODE_P (GET_MODE (operands[0]))
+ && GET_MODE (operands[0]) == GET_MODE (operands[0])"
+ "* return output_fp_compare (insn, operands, 1, 0);"
+ [(set_attr "type" "fcmp,sse")
+ (set_attr "mode" "unknownfp")
+ (set_attr "athlon_decode" "vector")])
+
+(define_insn "*cmpfp_i_sse_only"
+ [(set (reg:CCFP 17)
+ (compare:CCFP (match_operand 0 "register_operand" "x")
+ (match_operand 1 "nonimmediate_operand" "xm")))]
+ "SSE_FLOAT_MODE_P (GET_MODE (operands[0]))
+ && GET_MODE (operands[0]) == GET_MODE (operands[0])"
+ "* return output_fp_compare (insn, operands, 1, 0);"
+ [(set_attr "type" "sse")
+ (set_attr "mode" "unknownfp")
+ (set_attr "athlon_decode" "vector")])
+
(define_insn "*cmpfp_iu"
[(set (reg:CCFPU 17)
(compare:CCFPU (match_operand 0 "register_operand" "f")
(match_operand 1 "register_operand" "f")))]
"TARGET_80387 && TARGET_CMOVE
+ && !SSE_FLOAT_MODE_P (GET_MODE (operands[0]))
&& FLOAT_MODE_P (GET_MODE (operands[0]))
&& GET_MODE (operands[0]) == GET_MODE (operands[1])"
"* return output_fp_compare (insn, operands, 1, 1);"
[(set_attr "type" "fcmp")
(set_attr "mode" "unknownfp")
(set_attr "athlon_decode" "vector")])
+
+(define_insn "*cmpfp_iu_sse"
+ [(set (reg:CCFPU 17)
+ (compare:CCFPU (match_operand 0 "register_operand" "f#x,x#f")
+ (match_operand 1 "nonimmediate_operand" "f#x,xm#f")))]
+ "TARGET_80387
+ && SSE_FLOAT_MODE_P (GET_MODE (operands[0]))
+ && GET_MODE (operands[0]) == GET_MODE (operands[1])"
+ "* return output_fp_compare (insn, operands, 1, 1);"
+ [(set_attr "type" "fcmp,sse")
+ (set_attr "mode" "unknownfp")
+ (set_attr "athlon_decode" "vector")])
+
+(define_insn "*cmpfp_iu_sse_only"
+ [(set (reg:CCFPU 17)
+ (compare:CCFPU (match_operand 0 "register_operand" "x")
+ (match_operand 1 "nonimmediate_operand" "xm")))]
+ "SSE_FLOAT_MODE_P (GET_MODE (operands[0]))
+ && GET_MODE (operands[0]) == GET_MODE (operands[1])"
+ "* return output_fp_compare (insn, operands, 1, 1);"
+ [(set_attr "type" "sse")
+ (set_attr "mode" "unknownfp")
+ (set_attr "athlon_decode" "vector")])
\f
;; Move instructions.
(define_expand "sunordered"
[(set (match_operand:SI 0 "register_operand" "")
(unordered:SI (reg:CC 17) (const_int 0)))]
- "TARGET_80387"
+ "TARGET_80387 || TARGET_SSE"
"if (ix86_expand_setcc (UNORDERED, operands[0])) DONE; else FAIL;")
(define_expand "sordered"
(define_expand "suneq"
[(set (match_operand:SI 0 "register_operand" "")
(uneq:SI (reg:CC 17) (const_int 0)))]
- "TARGET_80387"
+ "TARGET_80387 || TARGET_SSE"
"if (ix86_expand_setcc (UNEQ, operands[0])) DONE; else FAIL;")
(define_expand "sunge"
[(set (match_operand:SI 0 "register_operand" "")
(unge:SI (reg:CC 17) (const_int 0)))]
- "TARGET_80387"
+ "TARGET_80387 || TARGET_SSE"
"if (ix86_expand_setcc (UNGE, operands[0])) DONE; else FAIL;")
(define_expand "sungt"
[(set (match_operand:SI 0 "register_operand" "")
(ungt:SI (reg:CC 17) (const_int 0)))]
- "TARGET_80387"
+ "TARGET_80387 || TARGET_SSE"
"if (ix86_expand_setcc (UNGT, operands[0])) DONE; else FAIL;")
(define_expand "sunle"
[(set (match_operand:SI 0 "register_operand" "")
(unle:SI (reg:CC 17) (const_int 0)))]
- "TARGET_80387"
+ "TARGET_80387 || TARGET_SSE"
"if (ix86_expand_setcc (UNLE, operands[0])) DONE; else FAIL;")
(define_expand "sunlt"
[(set (match_operand:SI 0 "register_operand" "")
(unlt:SI (reg:CC 17) (const_int 0)))]
- "TARGET_80387"
+ "TARGET_80387 || TARGET_SSE"
"if (ix86_expand_setcc (UNLT, operands[0])) DONE; else FAIL;")
(define_expand "sltgt"
[(set (match_operand:SI 0 "register_operand" "")
(ltgt:SI (reg:CC 17) (const_int 0)))]
- "TARGET_80387"
+ "TARGET_80387 || TARGET_SSE"
"if (ix86_expand_setcc (LTGT, operands[0])) DONE; else FAIL;")
(define_insn "*setcc_1"
(if_then_else (match_dup 1)
(label_ref (match_operand 0 "" ""))
(pc)))]
- "TARGET_80387"
+ "TARGET_80387 || TARGET_SSE"
"ix86_expand_branch (UNORDERED, operands[0]); DONE;")
(define_expand "bordered"
(if_then_else (match_dup 1)
(label_ref (match_operand 0 "" ""))
(pc)))]
- "TARGET_80387"
+ "TARGET_80387 || TARGET_SSE"
"ix86_expand_branch (ORDERED, operands[0]); DONE;")
(define_expand "buneq"
(if_then_else (match_dup 1)
(label_ref (match_operand 0 "" ""))
(pc)))]
- "TARGET_80387"
+ "TARGET_80387 || TARGET_SSE"
"ix86_expand_branch (UNEQ, operands[0]); DONE;")
(define_expand "bunge"
(if_then_else (match_dup 1)
(label_ref (match_operand 0 "" ""))
(pc)))]
- "TARGET_80387"
+ "TARGET_80387 || TARGET_SSE"
"ix86_expand_branch (UNGE, operands[0]); DONE;")
(define_expand "bungt"
(if_then_else (match_dup 1)
(label_ref (match_operand 0 "" ""))
(pc)))]
- "TARGET_80387"
+ "TARGET_80387 || TARGET_SSE"
"ix86_expand_branch (UNGT, operands[0]); DONE;")
(define_expand "bunle"
(if_then_else (match_dup 1)
(label_ref (match_operand 0 "" ""))
(pc)))]
- "TARGET_80387"
+ "TARGET_80387 || TARGET_SSE"
"ix86_expand_branch (UNLE, operands[0]); DONE;")
(define_expand "bunlt"
(if_then_else (match_dup 1)
(label_ref (match_operand 0 "" ""))
(pc)))]
- "TARGET_80387"
+ "TARGET_80387 || TARGET_SSE"
"ix86_expand_branch (UNLT, operands[0]); DONE;")
(define_expand "bltgt"
(if_then_else (match_dup 1)
(label_ref (match_operand 0 "" ""))
(pc)))]
- "TARGET_80387"
+ "TARGET_80387 || TARGET_SSE"
"ix86_expand_branch (LTGT, operands[0]); DONE;")
(define_insn "*jcc_1"
(clobber (reg:CCFP 18))
(clobber (reg:CCFP 17))]
"TARGET_CMOVE && TARGET_80387
+ && !SSE_FLOAT_MODE_P (GET_MODE (operands[1]))
&& FLOAT_MODE_P (GET_MODE (operands[1]))
&& GET_MODE (operands[1]) == GET_MODE (operands[2])"
"#")
+(define_insn "*fp_jcc_1_sse"
+ [(set (pc)
+ (if_then_else (match_operator 0 "comparison_operator"
+ [(match_operand 1 "register_operand" "f#x,x#f")
+ (match_operand 2 "nonimmediate_operand" "f#x,xm#f")])
+ (label_ref (match_operand 3 "" ""))
+ (pc)))
+ (clobber (reg:CCFP 18))
+ (clobber (reg:CCFP 17))]
+ "TARGET_80387
+ && SSE_FLOAT_MODE_P (GET_MODE (operands[1]))
+ && GET_MODE (operands[1]) == GET_MODE (operands[2])"
+ "#")
+
+(define_insn "*fp_jcc_1_sse_only"
+ [(set (pc)
+ (if_then_else (match_operator 0 "comparison_operator"
+ [(match_operand 1 "register_operand" "x")
+ (match_operand 2 "nonimmediate_operand" "xm")])
+ (label_ref (match_operand 3 "" ""))
+ (pc)))
+ (clobber (reg:CCFP 18))
+ (clobber (reg:CCFP 17))]
+ "SSE_FLOAT_MODE_P (GET_MODE (operands[1]))
+ && GET_MODE (operands[1]) == GET_MODE (operands[2])"
+ "#")
+
(define_insn "*fp_jcc_2"
[(set (pc)
(if_then_else (match_operator 0 "comparison_operator"
(clobber (reg:CCFP 18))
(clobber (reg:CCFP 17))]
"TARGET_CMOVE && TARGET_80387
+ && !SSE_FLOAT_MODE_P (GET_MODE (operands[1]))
&& FLOAT_MODE_P (GET_MODE (operands[1]))
&& GET_MODE (operands[1]) == GET_MODE (operands[2])"
"#")
+(define_insn "*fp_jcc_2_sse"
+ [(set (pc)
+ (if_then_else (match_operator 0 "comparison_operator"
+ [(match_operand 1 "register_operand" "f#x,x#f")
+ (match_operand 2 "nonimmediate_operand" "f#x,xm#f")])
+ (pc)
+ (label_ref (match_operand 3 "" ""))))
+ (clobber (reg:CCFP 18))
+ (clobber (reg:CCFP 17))]
+ "TARGET_80387
+ && SSE_FLOAT_MODE_P (GET_MODE (operands[1]))
+ && GET_MODE (operands[1]) == GET_MODE (operands[2])"
+ "#")
+
+(define_insn "*fp_jcc_2_sse_only"
+ [(set (pc)
+ (if_then_else (match_operator 0 "comparison_operator"
+ [(match_operand 1 "register_operand" "x")
+ (match_operand 2 "nonimmediate_operand" "xm")])
+ (pc)
+ (label_ref (match_operand 3 "" ""))))
+ (clobber (reg:CCFP 18))
+ (clobber (reg:CCFP 17))]
+ "SSE_FLOAT_MODE_P (GET_MODE (operands[1]))
+ && GET_MODE (operands[1]) == GET_MODE (operands[2])"
+ "#")
+
(define_insn "*fp_jcc_3"
[(set (pc)
(if_then_else (match_operator 0 "comparison_operator"