|
953 | 953 | ;; (plus (reg rN) (reg sp)) into (reg rN). In this case reload will
|
954 | 954 | ;; put the duplicated register first, and not try the commutative version.
|
955 | 955 | (define_insn_and_split "*arm_addsi3"
|
956 |
| - [(set (match_operand:SI 0 "s_register_operand" "=rk, r,k, r,r, k, r, k,k,r, k, r") |
957 |
| - (plus:SI (match_operand:SI 1 "s_register_operand" "%0, rk,k, r,rk,k, rk,k,r,rk,k, rk") |
958 |
| - (match_operand:SI 2 "reg_or_int_operand" "rk, rI,rI,k,Pj,Pj,L, L,L,PJ,PJ,?n")))] |
| 956 | + [(set (match_operand:SI 0 "s_register_operand" "=rk,l,l ,l ,r ,k ,r,r ,k ,r ,k,k,r ,k ,r") |
| 957 | + (plus:SI (match_operand:SI 1 "s_register_operand" "%0 ,l,0 ,l ,rk,k ,r,rk,k ,rk,k,r,rk,k ,rk") |
| 958 | + (match_operand:SI 2 "reg_or_int_operand" "rk ,l,Py,Pd,rI,rI,k,Pj,Pj,L ,L,L,PJ,PJ,?n")))] |
959 | 959 | "TARGET_32BIT"
|
960 | 960 | "@
|
961 | 961 | add%?\\t%0, %0, %2
|
962 | 962 | add%?\\t%0, %1, %2
|
| 963 | + add%?\\t%0, %2 |
| 964 | + add%?\\t%0, %1, %2 |
| 965 | + add%?\\t%0, %1, %2 |
963 | 966 | add%?\\t%0, %1, %2
|
964 | 967 | add%?\\t%0, %2, %1
|
965 | 968 | addw%?\\t%0, %1, %2
|
|
981 | 984 | operands[1], 0);
|
982 | 985 | DONE;
|
983 | 986 | "
|
984 |
| - [(set_attr "length" "2,4,4,4,4,4,4,4,4,4,4,16") |
| 987 | + [(set_attr "length" "2,4,4,4,4,4,4,4,4,4,4,4,4,4,16") |
985 | 988 | (set_attr "predicable" "yes")
|
986 |
| - (set_attr "arch" "t2,*,*,*,t2,t2,*,*,a,t2,t2,*") |
| 989 | + (set_attr "predicable_short_it" "yes,yes,yes,yes,no,no,no,no,no,no,no,no,no,no,no") |
| 990 | + (set_attr "arch" "t2,t2,t2,t2,*,*,*,t2,t2,*,*,a,t2,t2,*") |
987 | 991 | (set (attr "type") (if_then_else (match_operand 2 "const_int_operand" "")
|
988 | 992 | (const_string "arlo_imm")
|
989 | 993 | (const_string "arlo_reg")))
|
|
1090 | 1094 | (define_insn "*compare_negsi_si"
|
1091 | 1095 | [(set (reg:CC_Z CC_REGNUM)
|
1092 | 1096 | (compare:CC_Z
|
1093 |
| - (neg:SI (match_operand:SI 0 "s_register_operand" "r")) |
1094 |
| - (match_operand:SI 1 "s_register_operand" "r")))] |
| 1097 | + (neg:SI (match_operand:SI 0 "s_register_operand" "l,r")) |
| 1098 | + (match_operand:SI 1 "s_register_operand" "l,r")))] |
1095 | 1099 | "TARGET_32BIT"
|
1096 | 1100 | "cmn%?\\t%1, %0"
|
1097 | 1101 | [(set_attr "conds" "set")
|
1098 |
| - (set_attr "predicable" "yes")] |
| 1102 | + (set_attr "predicable" "yes") |
| 1103 | + (set_attr "arch" "t2,*") |
| 1104 | + (set_attr "length" "2,4") |
| 1105 | + (set_attr "predicable_short_it" "yes,no")] |
1099 | 1106 | )
|
1100 | 1107 |
|
1101 | 1108 | ;; This is the canonicalization of addsi3_compare0_for_combiner when the
|
|
1192 | 1199 |
|
1193 | 1200 | (define_insn "*compare_addsi2_op0"
|
1194 | 1201 | [(set (reg:CC_C CC_REGNUM)
|
1195 |
| - (compare:CC_C |
1196 |
| - (plus:SI (match_operand:SI 0 "s_register_operand" "r,r,r") |
1197 |
| - (match_operand:SI 1 "arm_add_operand" "I,L,r")) |
1198 |
| - (match_dup 0)))] |
| 1202 | + (compare:CC_C |
| 1203 | + (plus:SI (match_operand:SI 0 "s_register_operand" "l,l,r,r,r") |
| 1204 | + (match_operand:SI 1 "arm_add_operand" "Pv,l,I,L,r")) |
| 1205 | + (match_dup 0)))] |
1199 | 1206 | "TARGET_32BIT"
|
1200 | 1207 | "@
|
| 1208 | + cmp%?\\t%0, #%n1 |
| 1209 | + cmn%?\\t%0, %1 |
1201 | 1210 | cmn%?\\t%0, %1
|
1202 | 1211 | cmp%?\\t%0, #%n1
|
1203 | 1212 | cmn%?\\t%0, %1"
|
1204 | 1213 | [(set_attr "conds" "set")
|
1205 | 1214 | (set_attr "predicable" "yes")
|
1206 |
| - (set_attr "type" "arlo_imm,arlo_imm,*")] |
| 1215 | + (set_attr "arch" "t2,t2,*,*,*") |
| 1216 | + (set_attr "predicable_short_it" "yes,yes,no,no,no") |
| 1217 | + (set_attr "length" "2,2,4,4,4") |
| 1218 | + (set_attr "type" "arlo_imm,*,arlo_imm,arlo_imm,*")] |
1207 | 1219 | )
|
1208 | 1220 |
|
1209 | 1221 | (define_insn "*compare_addsi2_op1"
|
1210 | 1222 | [(set (reg:CC_C CC_REGNUM)
|
1211 |
| - (compare:CC_C |
1212 |
| - (plus:SI (match_operand:SI 0 "s_register_operand" "r,r,r") |
1213 |
| - (match_operand:SI 1 "arm_add_operand" "I,L,r")) |
1214 |
| - (match_dup 1)))] |
| 1223 | + (compare:CC_C |
| 1224 | + (plus:SI (match_operand:SI 0 "s_register_operand" "l,l,r,r,r") |
| 1225 | + (match_operand:SI 1 "arm_add_operand" "Pv,l,I,L,r")) |
| 1226 | + (match_dup 1)))] |
1215 | 1227 | "TARGET_32BIT"
|
1216 | 1228 | "@
|
| 1229 | + cmp%?\\t%0, #%n1 |
| 1230 | + cmn%?\\t%0, %1 |
1217 | 1231 | cmn%?\\t%0, %1
|
1218 | 1232 | cmp%?\\t%0, #%n1
|
1219 | 1233 | cmn%?\\t%0, %1"
|
1220 | 1234 | [(set_attr "conds" "set")
|
1221 | 1235 | (set_attr "predicable" "yes")
|
1222 |
| - (set_attr "type" "arlo_imm,arlo_imm,*")] |
1223 |
| -) |
| 1236 | + (set_attr "arch" "t2,t2,*,*,*") |
| 1237 | + (set_attr "predicable_short_it" "yes,yes,no,no,no") |
| 1238 | + (set_attr "length" "2,2,4,4,4") |
| 1239 | + (set_attr "type" |
| 1240 | + "arlo_imm,*,arlo_imm,arlo_imm,*")] |
| 1241 | + ) |
1224 | 1242 |
|
1225 | 1243 | (define_insn "*addsi3_carryin_<optab>"
|
1226 |
| - [(set (match_operand:SI 0 "s_register_operand" "=r,r") |
1227 |
| - (plus:SI (plus:SI (match_operand:SI 1 "s_register_operand" "%r,r") |
1228 |
| - (match_operand:SI 2 "arm_not_operand" "rI,K")) |
1229 |
| - (LTUGEU:SI (reg:<cnb> CC_REGNUM) (const_int 0))))] |
| 1244 | + [(set (match_operand:SI 0 "s_register_operand" "=l,r,r") |
| 1245 | + (plus:SI (plus:SI (match_operand:SI 1 "s_register_operand" "%l,r,r") |
| 1246 | + (match_operand:SI 2 "arm_not_operand" "0,rI,K")) |
| 1247 | + (LTUGEU:SI (reg:<cnb> CC_REGNUM) (const_int 0))))] |
1230 | 1248 | "TARGET_32BIT"
|
1231 | 1249 | "@
|
| 1250 | + adc%?\\t%0, %1 |
1232 | 1251 | adc%?\\t%0, %1, %2
|
1233 | 1252 | sbc%?\\t%0, %1, #%B2"
|
1234 | 1253 | [(set_attr "conds" "use")
|
1235 |
| - (set_attr "predicable" "yes")] |
| 1254 | + (set_attr "predicable" "yes") |
| 1255 | + (set_attr "arch" "t2,*,*") |
| 1256 | + (set_attr "length" "4") |
| 1257 | + (set_attr "predicable_short_it" "yes,no,no")] |
1236 | 1258 | )
|
1237 | 1259 |
|
1238 | 1260 | (define_insn "*addsi3_carryin_alt2_<optab>"
|
1239 |
| - [(set (match_operand:SI 0 "s_register_operand" "=r,r") |
1240 |
| - (plus:SI (plus:SI (LTUGEU:SI (reg:<cnb> CC_REGNUM) (const_int 0)) |
1241 |
| - (match_operand:SI 1 "s_register_operand" "%r,r")) |
1242 |
| - (match_operand:SI 2 "arm_rhs_operand" "rI,K")))] |
| 1261 | + [(set (match_operand:SI 0 "s_register_operand" "=l,r,r") |
| 1262 | + (plus:SI (plus:SI (LTUGEU:SI (reg:<cnb> CC_REGNUM) (const_int 0)) |
| 1263 | + (match_operand:SI 1 "s_register_operand" "%l,r,r")) |
| 1264 | + (match_operand:SI 2 "arm_rhs_operand" "l,rI,K")))] |
1243 | 1265 | "TARGET_32BIT"
|
1244 | 1266 | "@
|
| 1267 | + adc%?\\t%0, %1 |
1245 | 1268 | adc%?\\t%0, %1, %2
|
1246 | 1269 | sbc%?\\t%0, %1, #%B2"
|
1247 | 1270 | [(set_attr "conds" "use")
|
1248 |
| - (set_attr "predicable" "yes")] |
| 1271 | + (set_attr "predicable" "yes") |
| 1272 | + (set_attr "arch" "t2,*,*") |
| 1273 | + (set_attr "length" "4") |
| 1274 | + (set_attr "predicable_short_it" "yes,no,no")] |
1249 | 1275 | )
|
1250 | 1276 |
|
1251 | 1277 | (define_insn "*addsi3_carryin_shift_<optab>"
|
|
1260 | 1286 | "adc%?\\t%0, %1, %3%S2"
|
1261 | 1287 | [(set_attr "conds" "use")
|
1262 | 1288 | (set_attr "predicable" "yes")
|
| 1289 | + (set_attr "predicable_short_it" "no") |
1263 | 1290 | (set (attr "type") (if_then_else (match_operand 4 "const_int_operand" "")
|
1264 | 1291 | (const_string "arlo_shift")
|
1265 | 1292 | (const_string "arlo_shift_reg")))]
|
|
1287 | 1314 | rsc%?\\t%0, %2, %1"
|
1288 | 1315 | [(set_attr "conds" "use")
|
1289 | 1316 | (set_attr "arch" "*,a")
|
1290 |
| - (set_attr "predicable" "yes")] |
| 1317 | + (set_attr "predicable" "yes") |
| 1318 | + (set_attr "predicable_short_it" "no")] |
1291 | 1319 | )
|
1292 | 1320 |
|
1293 | 1321 | (define_insn "*subsi3_carryin_const"
|
|
1604 | 1632 |
|
1605 | 1633 | ; ??? Check Thumb-2 split length
|
1606 | 1634 | (define_insn_and_split "*arm_subsi3_insn"
|
1607 |
| - [(set (match_operand:SI 0 "s_register_operand" "=r,r,r,rk,r") |
1608 |
| - (minus:SI (match_operand:SI 1 "reg_or_int_operand" "rI,r,r,k,?n") |
1609 |
| - (match_operand:SI 2 "reg_or_int_operand" "r,I,r,r, r")))] |
| 1635 | + [(set (match_operand:SI 0 "s_register_operand" "=l,l ,l ,l ,r ,r,r,rk,r") |
| 1636 | + (minus:SI (match_operand:SI 1 "reg_or_int_operand" "l ,0 ,l ,Pz,rI,r,r,k ,?n") |
| 1637 | + (match_operand:SI 2 "reg_or_int_operand" "l ,Py,Pd,l ,r ,I,r,r ,r")))] |
1610 | 1638 | "TARGET_32BIT"
|
1611 | 1639 | "@
|
| 1640 | + sub%?\\t%0, %1, %2 |
| 1641 | + sub%?\\t%0, %2 |
| 1642 | + sub%?\\t%0, %1, %2 |
| 1643 | + rsb%?\\t%0, %2, %1 |
1612 | 1644 | rsb%?\\t%0, %2, %1
|
1613 | 1645 | sub%?\\t%0, %1, %2
|
1614 | 1646 | sub%?\\t%0, %1, %2
|
|
1622 | 1654 | INTVAL (operands[1]), operands[0], operands[2], 0);
|
1623 | 1655 | DONE;
|
1624 | 1656 | "
|
1625 |
| - [(set_attr "length" "4,4,4,4,16") |
| 1657 | + [(set_attr "length" "4,4,4,4,4,4,4,4,16") |
| 1658 | + (set_attr "arch" "t2,t2,t2,t2,*,*,*,*,*") |
1626 | 1659 | (set_attr "predicable" "yes")
|
1627 |
| - (set_attr "type" "*,arlo_imm,*,*,*")] |
| 1660 | + (set_attr "predicable_short_it" "yes,yes,yes,yes,no,no,no,no,no") |
| 1661 | + (set_attr "type" "*,*,*,*,arlo_imm,arlo_imm,*,*,arlo_imm")] |
1628 | 1662 | )
|
1629 | 1663 |
|
1630 | 1664 | (define_peephole2
|
|
3943 | 3977 | (match_operand:SI 3 "arm_rhs_operand" "rI,rI")])
|
3944 | 3978 | (match_operand:SI 1 "s_register_operand" "0,?r")]))
|
3945 | 3979 | (clobber (reg:CC CC_REGNUM))]
|
3946 |
| - "TARGET_32BIT && !arm_eliminable_register (operands[1])" |
| 3980 | + "TARGET_32BIT && !arm_eliminable_register (operands[1]) && !arm_restrict_it" |
3947 | 3981 | "*
|
3948 | 3982 | {
|
3949 | 3983 | enum rtx_code code = GET_CODE (operands[4]);
|
|
3980 | 4014 | ; Reject the frame pointer in operand[1], since reloading this after
|
3981 | 4015 | ; it has been eliminated can cause carnage.
|
3982 | 4016 | (define_insn_and_split "*minmax_arithsi_non_canon"
|
3983 |
| - [(set (match_operand:SI 0 "s_register_operand" "=r,r") |
| 4017 | + [(set (match_operand:SI 0 "s_register_operand" "=Ts,Ts") |
3984 | 4018 | (minus:SI
|
3985 |
| - (match_operand:SI 1 "s_register_operand" "0,?r") |
| 4019 | + (match_operand:SI 1 "s_register_operand" "0,?Ts") |
3986 | 4020 | (match_operator:SI 4 "minmax_operator"
|
3987 |
| - [(match_operand:SI 2 "s_register_operand" "r,r") |
3988 |
| - (match_operand:SI 3 "arm_rhs_operand" "rI,rI")]))) |
| 4021 | + [(match_operand:SI 2 "s_register_operand" "Ts,Ts") |
| 4022 | + (match_operand:SI 3 "arm_rhs_operand" "TsI,TsI")]))) |
3989 | 4023 | (clobber (reg:CC CC_REGNUM))]
|
3990 |
| - "TARGET_32BIT && !arm_eliminable_register (operands[1])" |
| 4024 | + "TARGET_32BIT && !arm_eliminable_register (operands[1]) |
| 4025 | + && !(arm_restrict_it && CONST_INT_P (operands[3]))" |
3991 | 4026 | "#"
|
3992 | 4027 | "TARGET_32BIT && !arm_eliminable_register (operands[1]) && reload_completed"
|
3993 | 4028 | [(set (reg:CC CC_REGNUM)
|
|
4046 | 4081 | else
|
4047 | 4082 | return "usat%?\t%0, %1, %3";
|
4048 | 4083 | }
|
4049 |
| - [(set_attr "predicable" "yes")] |
| 4084 | + [(set_attr "predicable" "yes") |
| 4085 | + (set_attr "predicable_short_it" "no")] |
4050 | 4086 | )
|
4051 | 4087 |
|
4052 | 4088 | (define_insn "*satsi_<SAT:code>_shift"
|
|
4072 | 4108 | return "usat%?\t%0, %1, %4%S3";
|
4073 | 4109 | }
|
4074 | 4110 | [(set_attr "predicable" "yes")
|
| 4111 | + (set_attr "predicable_short_it" "no") |
4075 | 4112 | (set_attr "shift" "3")
|
4076 | 4113 | (set_attr "type" "arlo_shift")])
|
4077 | 4114 |
|
|
4429 | 4466 | )
|
4430 | 4467 |
|
4431 | 4468 | (define_insn "*arm_shiftsi3"
|
4432 |
| - [(set (match_operand:SI 0 "s_register_operand" "=r,r") |
| 4469 | + [(set (match_operand:SI 0 "s_register_operand" "=l,r,r") |
4433 | 4470 | (match_operator:SI 3 "shift_operator"
|
4434 |
| - [(match_operand:SI 1 "s_register_operand" "r,r") |
4435 |
| - (match_operand:SI 2 "reg_or_int_operand" "M,r")]))] |
| 4471 | + [(match_operand:SI 1 "s_register_operand" "0,r,r") |
| 4472 | + (match_operand:SI 2 "reg_or_int_operand" "l,M,r")]))] |
4436 | 4473 | "TARGET_32BIT"
|
4437 | 4474 | "* return arm_output_shift(operands, 0);"
|
4438 | 4475 | [(set_attr "predicable" "yes")
|
| 4476 | + (set_attr "arch" "t2,*,*") |
| 4477 | + (set_attr "predicable_short_it" "yes,no,no") |
| 4478 | + (set_attr "length" "4") |
4439 | 4479 | (set_attr "shift" "1")
|
4440 |
| - (set_attr "type" "arlo_shift,arlo_shift_reg")] |
| 4480 | + (set_attr "type" "arlo_shift_reg,arlo_shift,arlo_shift_reg")] |
4441 | 4481 | )
|
4442 | 4482 |
|
4443 | 4483 | (define_insn "*shiftsi3_compare"
|
|
7423 | 7463 | (define_insn "*arm32_movhf"
|
7424 | 7464 | [(set (match_operand:HF 0 "nonimmediate_operand" "=r,m,r,r")
|
7425 | 7465 | (match_operand:HF 1 "general_operand" " m,r,r,F"))]
|
7426 |
| - "TARGET_32BIT && !(TARGET_HARD_FLOAT && TARGET_FP16) |
| 7466 | + "TARGET_32BIT && !(TARGET_HARD_FLOAT && TARGET_FP16) && !arm_restrict_it |
7427 | 7467 | && ( s_register_operand (operands[0], HFmode)
|
7428 | 7468 | || s_register_operand (operands[1], HFmode))"
|
7429 | 7469 | "*
|
|
7548 | 7588 | ldr%?\\t%0, %1\\t%@ float
|
7549 | 7589 | str%?\\t%1, %0\\t%@ float"
|
7550 | 7590 | [(set_attr "predicable" "yes")
|
| 7591 | + (set_attr "predicable_short_it" "no") |
7551 | 7592 | (set_attr "type" "mov_reg,load1,store1")
|
7552 | 7593 | (set_attr "arm_pool_range" "*,4096,*")
|
7553 | 7594 | (set_attr "thumb2_pool_range" "*,4094,*")
|
|
8567 | 8608 |
|
8568 | 8609 | (define_insn_and_split "*arm_cmpdi_unsigned"
|
8569 | 8610 | [(set (reg:CC_CZ CC_REGNUM)
|
8570 |
| - (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r") |
8571 |
| - (match_operand:DI 1 "arm_di_operand" "rDi")))] |
| 8611 | + (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "l,r,r") |
| 8612 | + (match_operand:DI 1 "arm_di_operand" "Py,r,rDi")))] |
| 8613 | + |
8572 | 8614 | "TARGET_32BIT"
|
8573 | 8615 | "#" ; "cmp\\t%R0, %R1\;it eq\;cmpeq\\t%Q0, %Q1"
|
8574 | 8616 | "&& reload_completed"
|
|
8587 | 8629 | operands[1] = gen_lowpart (SImode, operands[1]);
|
8588 | 8630 | }
|
8589 | 8631 | [(set_attr "conds" "set")
|
8590 |
| - (set_attr "length" "8")] |
| 8632 | + (set_attr "enabled_for_depr_it" "yes,yes,no") |
| 8633 | + (set_attr "arch" "t2,t2,*") |
| 8634 | + (set_attr "length" "6,6,8")] |
8591 | 8635 | )
|
8592 | 8636 |
|
8593 | 8637 | (define_insn "*arm_cmpdi_zero"
|
|
12621 | 12665 | "arm_arch_thumb2"
|
12622 | 12666 | "movt%?\t%0, %L1"
|
12623 | 12667 | [(set_attr "predicable" "yes")
|
12624 |
| - (set_attr "length" "4")] |
| 12668 | + (set_attr "predicable_short_it" "no") |
| 12669 | + (set_attr "length" "4")] |
12625 | 12670 | )
|
12626 | 12671 |
|
12627 | 12672 | (define_insn "*arm_rev"
|
|
0 commit comments