switch (code)
{
case LE: case LEU: case GT: case GTU:
- std::swap (lo[0], lo[1]);
- std::swap (hi[0], hi[1]);
+ std::swap (op0, op1);
code = swap_condition (code);
/* FALLTHRU */
case LT: case LTU: case GE: case GEU:
{
- rtx (*cmp_insn) (rtx, rtx);
- rtx (*sbb_insn) (rtx, rtx, rtx);
+ rtx (*cmp_insn) (rtx, rtx, rtx);
if (TARGET_64BIT)
- cmp_insn = gen_cmpdi_1, sbb_insn = gen_subdi3_carry_ccgz;
+ cmp_insn = gen_cmpti_doubleword;
else
- cmp_insn = gen_cmpsi_1, sbb_insn = gen_subsi3_carry_ccgz;
-
- if (!nonimmediate_operand (lo[0], submode))
- lo[0] = force_reg (submode, lo[0]);
- if (!x86_64_general_operand (lo[1], submode))
- lo[1] = force_reg (submode, lo[1]);
+ cmp_insn = gen_cmpdi_doubleword;
- if (!register_operand (hi[0], submode))
- hi[0] = force_reg (submode, hi[0]);
- if (!x86_64_general_operand (hi[1], submode))
- hi[1] = force_reg (submode, hi[1]);
+ if (!register_operand (op0, mode))
+ op0 = force_reg (mode, op0);
+ if (!x86_64_hilo_general_operand (op1, mode))
+ op1 = force_reg (mode, op1);
- emit_insn (cmp_insn (lo[0], lo[1]));
- emit_insn (sbb_insn (gen_rtx_SCRATCH (submode), hi[0], hi[1]));
+ emit_insn (cmp_insn (gen_rtx_SCRATCH (mode), op0, op1));
tmp = gen_rtx_REG (CCGZmode, FLAGS_REG);
(compare:CC (match_operand:SWI48 0 "nonimmediate_operand")
(match_operand:SWI48 1 "<general_operand>")))])
+(define_insn_and_split "cmp<dwi>_doubleword"
+ [(set (reg:CCGZ FLAGS_REG)
+ (compare:CCGZ
+ (match_operand:<DWI> 1 "register_operand" "0")
+ (match_operand:<DWI> 2 "x86_64_hilo_general_operand" "ro<di>")))
+ (clobber (match_scratch:<DWI> 0 "=r"))]
+ ""
+ "#"
+ "reload_completed"
+ [(set (reg:CC FLAGS_REG)
+ (compare:CC (match_dup 1) (match_dup 2)))
+ (parallel [(set (reg:CCGZ FLAGS_REG)
+ (compare: CCGZ
+ (match_dup 4)
+ (plus:DWIH
+ (ltu:DWIH (reg:CC FLAGS_REG) (const_int 0))
+ (match_dup 5))))
+ (clobber (match_dup 3))])]
+ "split_double_mode (<DWI>mode, &operands[0], 3, &operands[0], &operands[3]);")
+
(define_insn "*cmp<mode>_ccno_1"
[(set (reg FLAGS_REG)
(compare (match_operand:SWI 0 "nonimmediate_operand" "<r>,?m<r>")
(set_attr "pent_pair" "pu")
(set_attr "mode" "SI")])
-(define_insn "sub<mode>3_carry_ccgz"
+(define_insn "*sub<mode>3_carry_ccgz"
[(set (reg:CCGZ FLAGS_REG)
(compare:CCGZ
(match_operand:DWIH 1 "register_operand" "0")