|
112 | 112 | UNSPEC_STOS |
113 | 113 | UNSPEC_PEEPSIB |
114 | 114 | UNSPEC_INSN_FALSE_DEP |
| 115 | + UNSPEC_SBB |
115 | 116 |
|
116 | 117 | ;; For SSE/MMX support: |
117 | 118 | UNSPEC_FIX_NOTRUNC |
|
1273 | 1274 | (compare:CC (match_operand:SWI48 0 "nonimmediate_operand") |
1274 | 1275 | (match_operand:SWI48 1 "<general_operand>")))]) |
1275 | 1276 |
|
1276 | | -(define_insn_and_split "cmp<dwi>_doubleword" |
1277 | | - [(set (reg:CCGZ FLAGS_REG) |
1278 | | - (compare:CCGZ |
1279 | | - (match_operand:<DWI> 1 "register_operand" "0") |
1280 | | - (match_operand:<DWI> 2 "x86_64_hilo_general_operand" "ro<di>"))) |
1281 | | - (clobber (match_scratch:<DWI> 0 "=r"))] |
1282 | | - "" |
1283 | | - "#" |
1284 | | - "reload_completed" |
1285 | | - [(set (reg:CC FLAGS_REG) |
1286 | | - (compare:CC (match_dup 1) (match_dup 2))) |
1287 | | - (parallel [(set (reg:CCGZ FLAGS_REG) |
1288 | | - (compare: CCGZ |
1289 | | - (match_dup 4) |
1290 | | - (plus:DWIH |
1291 | | - (ltu:DWIH (reg:CC FLAGS_REG) (const_int 0)) |
1292 | | - (match_dup 5)))) |
1293 | | - (clobber (match_dup 3))])] |
1294 | | - "split_double_mode (<DWI>mode, &operands[0], 3, &operands[0], &operands[3]);") |
1295 | | - |
1296 | 1277 | (define_insn "*cmp<mode>_ccno_1" |
1297 | 1278 | [(set (reg FLAGS_REG) |
1298 | 1279 | (compare (match_operand:SWI 0 "nonimmediate_operand" "<r>,?m<r>") |
|
6911 | 6892 | (set_attr "pent_pair" "pu") |
6912 | 6893 | (set_attr "mode" "SI")]) |
6913 | 6894 |
|
6914 | | -(define_insn "*sub<mode>3_carry_ccgz" |
| 6895 | +(define_insn "sub<mode>3_carry_ccc" |
| 6896 | + [(set (reg:CCC FLAGS_REG) |
| 6897 | + (compare:CCC |
| 6898 | + (zero_extend:<DWI> (match_operand:DWIH 1 "register_operand" "0")) |
| 6899 | + (plus:<DWI> |
| 6900 | + (ltu:<DWI> (reg:CC FLAGS_REG) (const_int 0)) |
| 6901 | + (zero_extend:<DWI> |
| 6902 | + (match_operand:DWIH 2 "x86_64_sext_operand" "rmWe"))))) |
| 6903 | + (clobber (match_scratch:DWIH 0 "=r"))] |
| 6904 | + "" |
| 6905 | + "sbb{<imodesuffix>}\t{%2, %0|%0, %2}" |
| 6906 | + [(set_attr "type" "alu") |
| 6907 | + (set_attr "mode" "<MODE>")]) |
| 6908 | + |
| 6909 | +(define_insn "*sub<mode>3_carry_ccc_1" |
| 6910 | + [(set (reg:CCC FLAGS_REG) |
| 6911 | + (compare:CCC |
| 6912 | + (zero_extend:<DWI> (match_operand:DWIH 1 "register_operand" "0")) |
| 6913 | + (plus:<DWI> |
| 6914 | + (ltu:<DWI> (reg:CC FLAGS_REG) (const_int 0)) |
| 6915 | + (match_operand:<DWI> 2 "x86_64_dwzext_immediate_operand" "Wf")))) |
| 6916 | + (clobber (match_scratch:DWIH 0 "=r"))] |
| 6917 | + "" |
| 6918 | +{ |
| 6919 | + operands[3] = simplify_subreg (<MODE>mode, operands[2], <DWI>mode, 0); |
| 6920 | + return "sbb{<imodesuffix>}\t{%3, %0|%0, %3}"; |
| 6921 | +} |
| 6922 | + [(set_attr "type" "alu") |
| 6923 | + (set_attr "mode" "<MODE>")]) |
| 6924 | + |
| 6925 | +;; The sign flag is set from the |
| 6926 | +;; (compare (match_dup 1) (plus:DWIH (ltu:DWIH ...) (match_dup 2))) |
| 6927 | +;; result, the overflow flag likewise, but the overflow flag is also |
| 6928 | +;; set if the (plus:DWIH (ltu:DWIH ...) (match_dup 2)) overflows. |
| 6929 | +(define_insn "sub<mode>3_carry_ccgz" |
6915 | 6930 | [(set (reg:CCGZ FLAGS_REG) |
6916 | | - (compare:CCGZ |
6917 | | - (match_operand:DWIH 1 "register_operand" "0") |
6918 | | - (plus:DWIH |
6919 | | - (ltu:DWIH (reg:CC FLAGS_REG) (const_int 0)) |
6920 | | - (match_operand:DWIH 2 "x86_64_general_operand" "rme")))) |
| 6931 | + (unspec:CCGZ [(match_operand:DWIH 1 "register_operand" "0") |
| 6932 | + (match_operand:DWIH 2 "x86_64_general_operand" "rme") |
| 6933 | + (ltu:DWIH (reg:CC FLAGS_REG) (const_int 0))] |
| 6934 | + UNSPEC_SBB)) |
6921 | 6935 | (clobber (match_scratch:DWIH 0 "=r"))] |
6922 | 6936 | "" |
6923 | 6937 | "sbb{<imodesuffix>}\t{%2, %0|%0, %2}" |
|
0 commit comments