Commit 265dab10 by Jan Hubicka Committed by Mark Mitchell

i386.c (ix86_comparison_operator, [...]): Handle CCRCmode.

        * i386.c (ix86_comparison_operator, put_condition_code,
        ix86_match_ccmode, ix86_cc_mode): Handle CCRCmode.
        (ix86_expand_strlensi_unroll_1): Use CCRCmode.
        * i386.h (EXTRA_CC_MODES): Add CCRCmode.
        * i386.md (adddi and negdi splitter): Use CCRCmode.
        (add?i_3, add?i_4, add?i_5): Use CCRCmode; swap operands
        (subsi3_carry): add '*'
        (addsi3_carry_rc, subsi3_carry_rc, x86_movsicc_0_m1_rc): New.
        (cmp to add peep2): Use CCRCmode; swap operands.

From-SVN: r36927
parent f27e6bb2
2000-10-18 Jan Hubikca <jh@suse.cz>
* i386.c (ix86_comparison_operator, put_condition_code,
ix86_match_ccmode, ix86_cc_mode): Handle CCRCmode.
(ix86_expand_strlensi_unroll_1): Use CCRCmode.
* i386.h (EXTRA_CC_MODES): Add CCRCmode.
* i386.md (adddi and negdi splitter): Use CCRCmode.
(add?i_3, add?i_4, add?i_5): Use CCRCmode; swap operands
(subsi3_carry): add '*'
(addsi3_carry_rc, subsi3_carry_rc, x86_movsicc_0_m1_rc): New.
(cmp to add peep2): Use CCRCmode; swap operands.
2000-10-18 Kazu Hirata <kazu@hxi.com> 2000-10-18 Kazu Hirata <kazu@hxi.com>
* config/h8300/h8300.md: Remove an unnecessary sign_extend * config/h8300/h8300.md: Remove an unnecessary sign_extend
...@@ -307,11 +319,9 @@ Tue Oct 17 20:05:51 2000 Martin Buchholz <martin@xemacs.org> ...@@ -307,11 +319,9 @@ Tue Oct 17 20:05:51 2000 Martin Buchholz <martin@xemacs.org>
* gengenrtl.c (gendef): Don't include * gengenrtl.c (gendef): Don't include
ggc_p conditionals. ggc_p conditionals.
* ggc-callbacks.c (ggc_p): Remove. * ggc-callbacks.c (ggc_p): Remove.
* * ggc-none.c (ggc_p): Remove.
ggc-none.c (ggc_p): Remove.
* ggc.h (ggc_p): Don't declare. * ggc.h (ggc_p): Don't declare.
* * integrate.c (save_for_inline): Don't mess with obstacks.
integrate.c (save_for_inline): Don't mess with obstacks.
(integrate_decl_tree): Likewise. (integrate_decl_tree): Likewise.
(output_inline_function): Likewise. (output_inline_function): Likewise.
* lists.c * lists.c
......
...@@ -1305,18 +1305,22 @@ ix86_comparison_operator (op, mode) ...@@ -1305,18 +1305,22 @@ ix86_comparison_operator (op, mode)
return 1; return 1;
case LT: case GE: case LT: case GE:
inmode = GET_MODE (XEXP (op, 0)); inmode = GET_MODE (XEXP (op, 0));
if (inmode == CCmode || inmode == CCGCmode if (inmode == CCmode || inmode == CCGCmode || inmode == CCRCmode
|| inmode == CCGOCmode || inmode == CCNOmode) || inmode == CCGOCmode || inmode == CCNOmode)
return 1; return 1;
return 0; return 0;
case LTU: case GTU: case LEU: case ORDERED: case UNORDERED: case GEU: case LTU: case GTU:
inmode = GET_MODE (XEXP (op, 0)); inmode = GET_MODE (XEXP (op, 0));
if (inmode == CCmode) return inmode == CCmode;
case LEU: case ORDERED: case UNORDERED: case GEU:
inmode = GET_MODE (XEXP (op, 0));
if (inmode == CCmode || inmode == CCRCmode)
return 1; return 1;
return 0; return 0;
case GT: case LE: case GT: case LE:
inmode = GET_MODE (XEXP (op, 0)); inmode = GET_MODE (XEXP (op, 0));
if (inmode == CCmode || inmode == CCGCmode || inmode == CCNOmode) if (inmode == CCmode || inmode == CCGCmode || inmode == CCNOmode
|| inmode == CCRCmode)
return 1; return 1;
return 0; return 0;
default: default:
...@@ -3108,21 +3112,22 @@ put_condition_code (code, mode, reverse, fp, file) ...@@ -3108,21 +3112,22 @@ put_condition_code (code, mode, reverse, fp, file)
suffix = "ne"; suffix = "ne";
break; break;
case GT: case GT:
if (mode != CCmode && mode != CCNOmode && mode != CCGCmode) if (mode != CCmode && mode != CCNOmode && mode != CCGCmode
&& mode != CCRCmode)
abort (); abort ();
suffix = "g"; suffix = "g";
break; break;
case GTU: case GTU:
/* ??? Use "nbe" instead of "a" for fcmov losage on some assemblers. /* ??? Use "nbe" instead of "a" for fcmov losage on some assemblers.
Those same assemblers have the same but opposite losage on cmov. */ Those same assemblers have the same but opposite losage on cmov. */
if (mode != CCmode) if (mode != CCmode && mode != CCRCmode)
abort (); abort ();
suffix = fp ? "nbe" : "a"; suffix = fp ? "nbe" : "a";
break; break;
case LT: case LT:
if (mode == CCNOmode || mode == CCGOCmode) if (mode == CCNOmode || mode == CCGOCmode)
suffix = "s"; suffix = "s";
else if (mode == CCmode || mode == CCGCmode) else if (mode == CCmode || mode == CCGCmode || mode == CCRCmode)
suffix = "l"; suffix = "l";
else else
abort (); abort ();
...@@ -3135,26 +3140,33 @@ put_condition_code (code, mode, reverse, fp, file) ...@@ -3135,26 +3140,33 @@ put_condition_code (code, mode, reverse, fp, file)
case GE: case GE:
if (mode == CCNOmode || mode == CCGOCmode) if (mode == CCNOmode || mode == CCGOCmode)
suffix = "ns"; suffix = "ns";
else if (mode == CCmode || mode == CCGCmode) else if (mode == CCmode || mode == CCGCmode || mode == CCRCmode)
suffix = "ge"; suffix = "ge";
else else
abort (); abort ();
break; break;
case GEU: case GEU:
/* ??? As above. */ /* ??? As above. */
if (mode != CCmode) if (mode != CCmode && mode != CCRCmode)
abort (); abort ();
suffix = fp ? "nb" : "ae"; if (mode == CCRCmode)
suffix = "be";
else
suffix = fp ? "nb" : "ae";
break; break;
case LE: case LE:
if (mode != CCmode && mode != CCGCmode && mode != CCNOmode) if (mode != CCmode && mode != CCGCmode && mode != CCNOmode
&& mode != CCRCmode)
abort (); abort ();
suffix = "le"; suffix = "le";
break; break;
case LEU: case LEU:
if (mode != CCmode) if (mode != CCmode)
abort (); abort ();
suffix = "be"; if (mode == CCRCmode)
suffix = fp ? "nb" : "ae";
else
suffix = "be";
break; break;
case UNORDERED: case UNORDERED:
suffix = "p"; suffix = "p";
...@@ -4552,6 +4564,13 @@ ix86_match_ccmode (insn, req_mode) ...@@ -4552,6 +4564,13 @@ ix86_match_ccmode (insn, req_mode)
return 0; return 0;
break; break;
case CCmode: case CCmode:
if (req_mode == CCRCmode)
return 0;
goto no_carry;
case CCRCmode:
if (req_mode == CCmode)
return 0;
no_carry:
if (req_mode == CCGCmode) if (req_mode == CCGCmode)
return 0; return 0;
/* FALLTHRU */ /* FALLTHRU */
...@@ -4683,11 +4702,14 @@ ix86_cc_mode (code, op0, op1) ...@@ -4683,11 +4702,14 @@ ix86_cc_mode (code, op0, op1)
case NE: /* ZF!=0 */ case NE: /* ZF!=0 */
return CCZmode; return CCZmode;
/* Codes needing carry flag. */ /* Codes needing carry flag. */
case GEU: /* CF=0 */
case GTU: /* CF=0 & ZF=0 */
case LTU: /* CF=1 */ case LTU: /* CF=1 */
case LEU: /* CF=1 | ZF=1 */ case LEU: /* CF=1 | ZF=1 */
return CCmode; return CCmode;
case GEU: /* CF=0 */
case GTU: /* CF=0 & ZF=0 */
if (GET_CODE (op1) == NEG)
return CCRCmode;
return CCmode;
/* Codes possibly doable only with sign flag when /* Codes possibly doable only with sign flag when
comparing against zero. */ comparing against zero. */
case GE: /* SF=OF or SF=0 */ case GE: /* SF=OF or SF=0 */
...@@ -6145,8 +6167,8 @@ ix86_expand_strlensi_unroll_1 (out, align_rtx, scratch) ...@@ -6145,8 +6167,8 @@ ix86_expand_strlensi_unroll_1 (out, align_rtx, scratch)
/* Avoid branch in fixing the byte. */ /* Avoid branch in fixing the byte. */
tmpreg = gen_lowpart (QImode, tmpreg); tmpreg = gen_lowpart (QImode, tmpreg);
emit_insn (gen_addqi3_cc (tmpreg, tmpreg, tmpreg)); emit_insn (gen_addqi3_ccrc (tmpreg, tmpreg, tmpreg));
emit_insn (gen_subsi3_carry (out, out, GEN_INT (3))); emit_insn (gen_subsi3_carry_rc (out, out, GEN_INT (3)));
emit_label (end_0_label); emit_label (end_0_label);
} }
......
...@@ -2488,10 +2488,14 @@ while (0) ...@@ -2488,10 +2488,14 @@ while (0)
mode is used to simulate comparisons of (a-b) and (a+b) mode is used to simulate comparisons of (a-b) and (a+b)
against zero using sub/cmp/add operations. against zero using sub/cmp/add operations.
Add CCZ to indicate that only the Zero flag is valid. */ Add CCZ to indicate that only the Zero flag is valid.
Add CCRC to indicate that carry flag is valid, but reversed.
*/
#define EXTRA_CC_MODES \ #define EXTRA_CC_MODES \
CC(CCGCmode, "CCGC") \ CC(CCGCmode, "CCGC") \
CC(CCRCmode, "CCRC") \
CC(CCGOCmode, "CCGOC") \ CC(CCGOCmode, "CCGOC") \
CC(CCNOmode, "CCNO") \ CC(CCNOmode, "CCNO") \
CC(CCZmode, "CCZ") \ CC(CCZmode, "CCZ") \
......
...@@ -3738,10 +3738,11 @@ ...@@ -3738,10 +3738,11 @@
(match_operand:DI 2 "general_operand" ""))) (match_operand:DI 2 "general_operand" "")))
(clobber (reg:CC 17))] (clobber (reg:CC 17))]
"reload_completed" "reload_completed"
[(parallel [(set (reg:CC 17) (compare:CC (neg:SI (match_dup 2)) (match_dup 1))) [(parallel [(set (reg:CCRC 17)
(compare:CCRC (match_dup 1) (neg:SI (match_dup 2))))
(set (match_dup 0) (plus:SI (match_dup 1) (match_dup 2)))]) (set (match_dup 0) (plus:SI (match_dup 1) (match_dup 2)))])
(parallel [(set (match_dup 3) (parallel [(set (match_dup 3)
(plus:SI (plus:SI (ltu:SI (reg:CC 17) (const_int 0)) (plus:SI (plus:SI (gtu:SI (reg:CCRC 17) (const_int 0))
(match_dup 4)) (match_dup 4))
(match_dup 5))) (match_dup 5)))
(clobber (reg:CC 17))])] (clobber (reg:CC 17))])]
...@@ -3762,6 +3763,19 @@ ...@@ -3762,6 +3763,19 @@
(set_attr "mode" "SI") (set_attr "mode" "SI")
(set_attr "ppro_uops" "few")]) (set_attr "ppro_uops" "few")])
(define_insn "*addsi3_carry_rc"
[(set (match_operand:SI 0 "nonimmediate_operand" "=rm,r")
(plus:SI (plus:SI (gtu:SI (reg:CCRC 17) (const_int 0))
(match_operand:SI 1 "nonimmediate_operand" "%0,0"))
(match_operand:SI 2 "general_operand" "ri,rm")))
(clobber (reg:CC 17))]
"ix86_binary_operator_ok (PLUS, SImode, operands)"
"adc{l}\\t{%2, %0|%0, %2}"
[(set_attr "type" "alu")
(set_attr "pent_pair" "pu")
(set_attr "mode" "SI")
(set_attr "ppro_uops" "few")])
(define_expand "addsi3" (define_expand "addsi3"
[(parallel [(set (match_operand:SI 0 "nonimmediate_operand" "") [(parallel [(set (match_operand:SI 0 "nonimmediate_operand" "")
(plus:SI (match_operand:SI 1 "nonimmediate_operand" "") (plus:SI (match_operand:SI 1 "nonimmediate_operand" "")
...@@ -4006,8 +4020,8 @@ ...@@ -4006,8 +4020,8 @@
(define_insn "*addsi_3" (define_insn "*addsi_3"
[(set (reg 17) [(set (reg 17)
(compare (neg:SI (match_operand:SI 2 "general_operand" "rmni")) (compare (match_operand:SI 1 "nonimmediate_operand" "%0")
(match_operand:SI 1 "nonimmediate_operand" "%0"))) (neg:SI (match_operand:SI 2 "general_operand" "rmni"))))
(clobber (match_scratch:SI 0 "=r"))] (clobber (match_scratch:SI 0 "=r"))]
"ix86_match_ccmode (insn, CCGCmode) "ix86_match_ccmode (insn, CCGCmode)
&& (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM) && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)
...@@ -4052,12 +4066,12 @@ ...@@ -4052,12 +4066,12 @@
(define_insn "*addsi_4" (define_insn "*addsi_4"
[(set (reg 17) [(set (reg 17)
(compare (neg:SI (match_operand:SI 2 "general_operand" "rmni,rni")) (compare (match_operand:SI 1 "nonimmediate_operand" "%0,0")
(match_operand:SI 1 "nonimmediate_operand" "%0,0"))) (neg:SI (match_operand:SI 2 "general_operand" "rmni,rni"))))
(set (match_operand:SI 0 "nonimmediate_operand" "=r,rm") (set (match_operand:SI 0 "nonimmediate_operand" "=r,rm")
(plus:SI (match_dup 1) (match_dup 2)))] (plus:SI (match_dup 1) (match_dup 2)))]
"ix86_binary_operator_ok (PLUS, SImode, operands) "ix86_binary_operator_ok (PLUS, SImode, operands)
&& ix86_match_ccmode (insn, CCmode) && ix86_match_ccmode (insn, CCRCmode)
/* Current assemblers are broken and do not allow @GOTOFF in /* Current assemblers are broken and do not allow @GOTOFF in
ought but a memory context. */ ought but a memory context. */
&& ! pic_symbolic_operand (operands[2], VOIDmode)" && ! pic_symbolic_operand (operands[2], VOIDmode)"
...@@ -4067,11 +4081,11 @@ ...@@ -4067,11 +4081,11 @@
(define_insn "*addsi_5" (define_insn "*addsi_5"
[(set (reg 17) [(set (reg 17)
(compare (neg:SI (match_operand:SI 2 "general_operand" "rmni")) (compare (match_operand:SI 1 "nonimmediate_operand" "%0")
(match_operand:SI 1 "nonimmediate_operand" "%0"))) (neg:SI (match_operand:SI 2 "general_operand" "rmni"))))
(clobber (match_scratch:SI 0 "=r"))] (clobber (match_scratch:SI 0 "=r"))]
"(GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM) "(GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)
&& ix86_match_ccmode (insn, CCmode) && ix86_match_ccmode (insn, CCRCmode)
/* Current assemblers are broken and do not allow @GOTOFF in /* Current assemblers are broken and do not allow @GOTOFF in
ought but a memory context. */ ought but a memory context. */
&& ! pic_symbolic_operand (operands[2], VOIDmode)" && ! pic_symbolic_operand (operands[2], VOIDmode)"
...@@ -4268,8 +4282,8 @@ ...@@ -4268,8 +4282,8 @@
(define_insn "*addhi_3" (define_insn "*addhi_3"
[(set (reg 17) [(set (reg 17)
(compare (neg:HI (match_operand:HI 2 "general_operand" "rmni")) (compare (match_operand:HI 1 "nonimmediate_operand" "%0")
(match_operand:HI 1 "nonimmediate_operand" "%0"))) (neg:HI (match_operand:HI 2 "general_operand" "rmni"))))
(clobber (match_scratch:HI 0 "=r"))] (clobber (match_scratch:HI 0 "=r"))]
"ix86_match_ccmode (insn, CCGCmode) "ix86_match_ccmode (insn, CCGCmode)
&& (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)"
...@@ -4308,11 +4322,11 @@ ...@@ -4308,11 +4322,11 @@
(define_insn "*addhi_4" (define_insn "*addhi_4"
[(set (reg 17) [(set (reg 17)
(compare (neg:HI (match_operand:HI 2 "general_operand" "rmni,rni")) (compare (match_operand:HI 1 "nonimmediate_operand" "%0,0")
(match_operand:HI 1 "nonimmediate_operand" "%0,0"))) (neg:HI (match_operand:HI 2 "general_operand" "rmni,rni"))))
(set (match_operand:HI 0 "nonimmediate_operand" "=r,rm") (set (match_operand:HI 0 "nonimmediate_operand" "=r,rm")
(plus:HI (match_dup 1) (match_dup 2)))] (plus:HI (match_dup 1) (match_dup 2)))]
"ix86_match_ccmode (insn, CCmode) "ix86_match_ccmode (insn, CCRCmode)
&& ix86_binary_operator_ok (PLUS, HImode, operands)" && ix86_binary_operator_ok (PLUS, HImode, operands)"
"add{w}\\t{%2, %0|%0, %2}" "add{w}\\t{%2, %0|%0, %2}"
[(set_attr "type" "alu") [(set_attr "type" "alu")
...@@ -4320,10 +4334,10 @@ ...@@ -4320,10 +4334,10 @@
(define_insn "*addhi_5" (define_insn "*addhi_5"
[(set (reg 17) [(set (reg 17)
(compare (neg:HI (match_operand:HI 2 "general_operand" "rmni")) (compare (match_operand:HI 1 "nonimmediate_operand" "%0")
(match_operand:HI 1 "nonimmediate_operand" "%0"))) (neg:HI (match_operand:HI 2 "general_operand" "rmni"))))
(clobber (match_scratch:HI 0 "=r"))] (clobber (match_scratch:HI 0 "=r"))]
"ix86_match_ccmode (insn, CCmode) "ix86_match_ccmode (insn, CCRCmode)
&& (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)"
"add{w}\\t{%2, %0|%0, %2}" "add{w}\\t{%2, %0|%0, %2}"
[(set_attr "type" "alu") [(set_attr "type" "alu")
...@@ -4520,8 +4534,8 @@ ...@@ -4520,8 +4534,8 @@
(define_insn "*addqi_3" (define_insn "*addqi_3"
[(set (reg 17) [(set (reg 17)
(compare (neg:QI (match_operand:QI 2 "general_operand" "qmni")) (compare (match_operand:QI 1 "nonimmediate_operand" "%0")
(match_operand:QI 1 "nonimmediate_operand" "%0"))) (neg:QI (match_operand:QI 2 "general_operand" "qmni"))))
(clobber (match_scratch:QI 0 "=r"))] (clobber (match_scratch:QI 0 "=r"))]
"ix86_match_ccmode (insn, CCGCmode) "ix86_match_ccmode (insn, CCGCmode)
&& (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)"
...@@ -4557,31 +4571,31 @@ ...@@ -4557,31 +4571,31 @@
(define_insn "*addqi_4" (define_insn "*addqi_4"
[(set (reg 17) [(set (reg 17)
(compare (neg:QI (match_operand:QI 2 "general_operand" "qmni,qni")) (compare (match_operand:QI 1 "nonimmediate_operand" "%0,0")
(match_operand:QI 1 "nonimmediate_operand" "%0,0"))) (neg:QI (match_operand:QI 2 "general_operand" "qmni,qni"))))
(set (match_operand:QI 0 "nonimmediate_operand" "=q,qm") (set (match_operand:QI 0 "nonimmediate_operand" "=q,qm")
(plus:QI (match_dup 1) (match_dup 2)))] (plus:QI (match_dup 1) (match_dup 2)))]
"ix86_match_ccmode (insn, CCmode) "ix86_match_ccmode (insn, CCRCmode)
&& ix86_binary_operator_ok (PLUS, QImode, operands)" && ix86_binary_operator_ok (PLUS, QImode, operands)"
"add{b}\\t{%2, %0|%0, %2}" "add{b}\\t{%2, %0|%0, %2}"
[(set_attr "type" "alu") [(set_attr "type" "alu")
(set_attr "mode" "QI")]) (set_attr "mode" "QI")])
(define_expand "addqi3_cc" (define_expand "addqi3_ccrc"
[(parallel [ [(parallel [
(set (reg:CC 17) (set (reg:CCRC 17)
(compare:CC (neg:QI (match_operand:QI 2 "general_operand" "")) (compare:CCRC (match_operand:QI 1 "nonimmediate_operand" "")
(match_operand:QI 1 "nonimmediate_operand" ""))) (neg:QI (match_operand:QI 2 "general_operand" ""))))
(clobber (match_scratch:QI 0 ""))])] (clobber (match_scratch:QI 0 ""))])]
"" ""
"") "")
(define_insn "*addqi_5" (define_insn "*addqi_5"
[(set (reg 17) [(set (reg 17)
(compare (neg:QI (match_operand:QI 2 "general_operand" "qmni")) (compare (match_operand:QI 1 "nonimmediate_operand" "%0")
(match_operand:QI 1 "nonimmediate_operand" "%0"))) (neg:QI (match_operand:QI 2 "general_operand" "qmni"))))
(clobber (match_scratch:QI 0 "=r"))] (clobber (match_scratch:QI 0 "=r"))]
"ix86_match_ccmode (insn, CCmode) "ix86_match_ccmode (insn, CCRCmode)
&& (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)"
"add{b}\\t{%2, %0|%0, %2}" "add{b}\\t{%2, %0|%0, %2}"
[(set_attr "type" "alu") [(set_attr "type" "alu")
...@@ -4734,7 +4748,7 @@ ...@@ -4734,7 +4748,7 @@
split_di (operands+1, 1, operands+1, operands+4); split_di (operands+1, 1, operands+1, operands+4);
split_di (operands+2, 1, operands+2, operands+5);") split_di (operands+2, 1, operands+2, operands+5);")
(define_insn "subsi3_carry" (define_insn "*subsi3_carry"
[(set (match_operand:SI 0 "nonimmediate_operand" "=rm,r") [(set (match_operand:SI 0 "nonimmediate_operand" "=rm,r")
(minus:SI (match_operand:SI 1 "nonimmediate_operand" "0,0") (minus:SI (match_operand:SI 1 "nonimmediate_operand" "0,0")
(plus:SI (ltu:SI (reg:CC 17) (const_int 0)) (plus:SI (ltu:SI (reg:CC 17) (const_int 0))
...@@ -4747,6 +4761,19 @@ ...@@ -4747,6 +4761,19 @@
(set_attr "ppro_uops" "few") (set_attr "ppro_uops" "few")
(set_attr "mode" "SI")]) (set_attr "mode" "SI")])
(define_insn "subsi3_carry_rc"
[(set (match_operand:SI 0 "nonimmediate_operand" "=rm,r")
(minus:SI (match_operand:SI 1 "nonimmediate_operand" "0,0")
(plus:SI (gtu:SI (reg:CCRC 17) (const_int 0))
(match_operand:SI 2 "general_operand" "ri,rm"))))
(clobber (reg:CC 17))]
"ix86_binary_operator_ok (MINUS, SImode, operands)"
"sbb{l}\\t{%2, %0|%0, %2}"
[(set_attr "type" "alu")
(set_attr "pent_pair" "pu")
(set_attr "ppro_uops" "few")
(set_attr "mode" "SI")])
(define_expand "subsi3" (define_expand "subsi3"
[(parallel [(set (match_operand:SI 0 "nonimmediate_operand" "") [(parallel [(set (match_operand:SI 0 "nonimmediate_operand" "")
(minus:SI (match_operand:SI 1 "nonimmediate_operand" "") (minus:SI (match_operand:SI 1 "nonimmediate_operand" "")
...@@ -6142,7 +6169,7 @@ ...@@ -6142,7 +6169,7 @@
(set (match_dup 0) (neg:SI (match_dup 2)))]) (set (match_dup 0) (neg:SI (match_dup 2)))])
(parallel (parallel
[(set (match_dup 1) [(set (match_dup 1)
(plus:SI (plus:SI (ltu:SI (reg:CC 17) (const_int 0)) (plus:SI (plus:SI (gtu:SI (reg:CCRC 17) (const_int 0))
(match_dup 3)) (match_dup 3))
(const_int 0))) (const_int 0)))
(clobber (reg:CC 17))]) (clobber (reg:CC 17))])
...@@ -10576,6 +10603,22 @@ ...@@ -10576,6 +10603,22 @@
(set_attr "mode" "SI") (set_attr "mode" "SI")
(set_attr "length_immediate" "0")]) (set_attr "length_immediate" "0")])
(define_insn "x86_movsicc_0_m1_rc"
[(set (match_operand:SI 0 "register_operand" "=r")
(if_then_else:SI (gtu (reg:CCRC 17) (const_int 0))
(const_int -1)
(const_int 0)))
(clobber (reg:CC 17))]
""
"sbb{l}\\t%0, %0"
; Since we don't have the proper number of operands for an alu insn,
; fill in all the blanks.
[(set_attr "type" "alu")
(set_attr "memory" "none")
(set_attr "imm_disp" "false")
(set_attr "mode" "SI")
(set_attr "length_immediate" "0")])
(define_insn "*movsicc_noc" (define_insn "*movsicc_noc"
[(set (match_operand:SI 0 "register_operand" "=r,r") [(set (match_operand:SI 0 "register_operand" "=r,r")
(if_then_else:SI (match_operator 1 "ix86_comparison_operator" (if_then_else:SI (match_operator 1 "ix86_comparison_operator"
...@@ -11413,8 +11456,8 @@ ...@@ -11413,8 +11456,8 @@
"ix86_match_ccmode (insn, CCGCmode) "ix86_match_ccmode (insn, CCGCmode)
&& find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))" && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
[(parallel [(set (reg:CCGC 17) [(parallel [(set (reg:CCGC 17)
(compare:CCGC (neg:SI (match_dup 1)) (compare:CCGC (match_dup 0)
(match_dup 0))) (neg:SI (match_dup 1))))
(clobber (match_dup 0))])] (clobber (match_dup 0))])]
"operands[1] = (operands[1] == const1_rtx) ? constm1_rtx : const1_rtx;") "operands[1] = (operands[1] == const1_rtx) ? constm1_rtx : const1_rtx;")
...@@ -11425,8 +11468,8 @@ ...@@ -11425,8 +11468,8 @@
"ix86_match_ccmode (insn, CCGCmode) "ix86_match_ccmode (insn, CCGCmode)
&& find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))" && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
[(parallel [(set (reg:CCGC 17) [(parallel [(set (reg:CCGC 17)
(compare:CCGC (neg:HI (match_dup 1)) (compare:CCGC (match_dup 0)
(match_dup 0))) (neg:HI (match_dup 1))))
(clobber (match_dup 0))])] (clobber (match_dup 0))])]
"operands[1] = (operands[1] == const1_rtx) ? constm1_rtx : const1_rtx;") "operands[1] = (operands[1] == const1_rtx) ? constm1_rtx : const1_rtx;")
...@@ -11437,8 +11480,8 @@ ...@@ -11437,8 +11480,8 @@
"ix86_match_ccmode (insn, CCGCmode) "ix86_match_ccmode (insn, CCGCmode)
&& find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))" && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
[(parallel [(set (reg:CCGC 17) [(parallel [(set (reg:CCGC 17)
(compare:CCGC (neg:QI (match_dup 1)) (compare:CCGC (match_dup 0)
(match_dup 0))) (neg:QI (match_dup 1))))
(clobber (match_dup 0))])] (clobber (match_dup 0))])]
"operands[1] = (operands[1] == const1_rtx) ? constm1_rtx : const1_rtx;") "operands[1] = (operands[1] == const1_rtx) ? constm1_rtx : const1_rtx;")
...@@ -11447,11 +11490,11 @@ ...@@ -11447,11 +11490,11 @@
[(set (reg 17) [(set (reg 17)
(compare (match_operand:SI 0 "register_operand" "") (compare (match_operand:SI 0 "register_operand" "")
(const_int 128)))] (const_int 128)))]
"ix86_match_ccmode (insn, CCmode) "ix86_match_ccmode (insn, CCRCmode)
&& find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))" && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
[(parallel [(set (reg:CC 17) [(parallel [(set (reg:CCRC 17)
(compare:CC (neg:SI (const_int -128)) (compare:CCRC (match_dup 0)
(match_dup 0))) (neg:SI (const_int -128))))
(clobber (match_dup 0))])] (clobber (match_dup 0))])]
"") "")
...@@ -11459,11 +11502,11 @@ ...@@ -11459,11 +11502,11 @@
[(set (reg 17) [(set (reg 17)
(compare (match_operand:HI 0 "register_operand" "") (compare (match_operand:HI 0 "register_operand" "")
(const_int 128)))] (const_int 128)))]
"ix86_match_ccmode (insn, CCmode) "ix86_match_ccmode (insn, CCRCmode)
&& find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))" && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
[(parallel [(set (reg:CC 17) [(parallel [(set (reg:CCRC 17)
(compare:CC (neg:HI (const_int -128)) (compare:CCRC (match_dup 0)
(match_dup 0))) (neg:HI (const_int -128))))
(clobber (match_dup 0))])] (clobber (match_dup 0))])]
"") "")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment