"TARGET_CMOVE"
"
{
+ rtx temp;
+
if (GET_MODE_CLASS (GET_MODE (i386_compare_op0)) != MODE_INT)
FAIL;
- operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]),
+ /* The floating point conditional move instructions don't directly
+ support conditions resulting from a signed integer comparison. */
+
+ switch (GET_CODE (operands[1]))
+ {
+ case LT:
+ case LE:
+ case GE:
+ case GT:
+ temp = emit_store_flag (gen_reg_rtx (QImode),
+ GET_CODE (operands[1]), i386_compare_op0, i386_compare_op1,
+ VOIDmode, 0, 0);
+
+ if (!temp)
+ FAIL;
+
+ operands[1] = gen_rtx_fmt_ee (NE, QImode, temp, const0_rtx);
+ break;
+
+ default:
+ operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]),
GET_MODE (i386_compare_op0),
i386_compare_op0, i386_compare_op1);
+ break;
+ }
}")
(define_insn ""
(match_operand:QI 3 "general_operand" "qmn,qn,qmn,qn,qmn,qn")])
(match_operand:SF 4 "register_operand" "f,f,0,0,f,f")
(match_operand:SF 5 "register_operand" "0,0,f,f,f,f")))]
- "TARGET_CMOVE"
+ "TARGET_CMOVE
+ && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE
+ && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT"
"#")
(define_insn ""
(match_operand 3 "general_operand" "rmi,ri,rmi,ri,rmi,ri")])
(match_operand:SF 4 "register_operand" "f,f,0,0,f,f")
(match_operand:SF 5 "register_operand" "0,0,f,f,f,f")))]
- "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT"
+ "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT
+ && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE
+ && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT"
"#")
(define_split
"TARGET_CMOVE"
"
{
+ rtx temp;
+
if (GET_MODE_CLASS (GET_MODE (i386_compare_op0)) != MODE_INT)
FAIL;
- /* The floating point conditional move instructions don't support
- signed integer comparisons. */
+ /* The floating point conditional move instructions don't directly
+ support conditions resulting from a signed integer comparison. */
switch (GET_CODE (operands[1]))
{
case LE:
case GE:
case GT:
- FAIL;
- /* NOTREACHED */
- break;
+ temp = emit_store_flag (gen_reg_rtx (QImode),
+ GET_CODE (operands[1]), i386_compare_op0, i386_compare_op1,
+ VOIDmode, 0, 0);
- default:
+ if (!temp)
+ FAIL;
+
+ operands[1] = gen_rtx_fmt_ee (NE, QImode, temp, const0_rtx);
break;
- }
- operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]),
+ default:
+ operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]),
GET_MODE (i386_compare_op0),
i386_compare_op0, i386_compare_op1);
+ break;
+ }
}")
(define_insn ""
(match_operand:QI 3 "general_operand" "qmn,qn,qmn,qn,qmn,qn")])
(match_operand:DF 4 "register_operand" "f,f,0,0,f,f")
(match_operand:DF 5 "register_operand" "0,0,f,f,f,f")))]
- "TARGET_CMOVE"
+ "TARGET_CMOVE
+ && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE
+ && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT"
"#")
(define_insn ""
(match_operand 3 "general_operand" "rmi,ri,rmi,ri,rmi,ri")])
(match_operand:DF 4 "register_operand" "f,f,0,0,f,f")
(match_operand:DF 5 "register_operand" "0,0,f,f,f,f")))]
- "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT"
+ "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT
+ && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE
+ && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT"
"#")
(define_split
"TARGET_CMOVE"
"
{
+ rtx temp;
+
if (GET_MODE_CLASS (GET_MODE (i386_compare_op0)) != MODE_INT)
FAIL;
- /* The floating point conditional move instructions don't support
- signed integer comparisons. */
+ /* The floating point conditional move instructions don't directly
+ support conditions resulting from a signed integer comparison. */
switch (GET_CODE (operands[1]))
{
case LE:
case GE:
case GT:
- FAIL;
- /* NOTREACHED */
- break;
+ temp = emit_store_flag (gen_reg_rtx (QImode),
+ GET_CODE (operands[1]), i386_compare_op0, i386_compare_op1,
+ VOIDmode, 0, 0);
- default:
+ if (!temp)
+ FAIL;
+
+ operands[1] = gen_rtx_fmt_ee (NE, QImode, temp, const0_rtx);
break;
- }
- operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]),
+ default:
+ operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]),
GET_MODE (i386_compare_op0),
i386_compare_op0, i386_compare_op1);
+ break;
+ }
}")
(define_insn ""
(match_operand:QI 3 "general_operand" "qmn,qn,qmn,qn,qmn,qn")])
(match_operand:XF 4 "register_operand" "f,f,0,0,f,f")
(match_operand:XF 5 "register_operand" "0,0,f,f,f,f")))]
- "TARGET_CMOVE"
+ "TARGET_CMOVE
+ && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE
+ && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT"
"#")
(define_insn ""
(match_operand 3 "general_operand" "rmi,ri,rmi,ri,rmi,ri")])
(match_operand:XF 4 "register_operand" "f,f,0,0,f,f")
(match_operand:XF 5 "register_operand" "0,0,f,f,f,f")))]
- "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT"
+ "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT
+ && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE
+ && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT"
"#")
(define_split
if (GET_MODE_CLASS (GET_MODE (i386_compare_op0)) != MODE_INT)
FAIL;
- /* The floating point conditional move instructions don't support
- signed integer comparisons. */
-
- switch (GET_CODE (operands[1]))
- {
- case LT:
- case LE:
- case GE:
- case GT:
- FAIL;
- /* NOTREACHED */
- break;
-
- default:
- break;
- }
-
operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]),
GET_MODE (i386_compare_op0),
i386_compare_op0, i386_compare_op1);