===================================================================
@@ -16010,8 +16010,8 @@
UInt rN = INSN0(3,0);
UInt rD = INSN1(11,8);
Bool valid = !isBadRegT(rN) && !isBadRegT(rD);
- /* but allow "sub.w sp, sp, #constT" */
- if (!valid && !isRSB && rN == 13 && rD == 13)
+ /* but allow "sub.w reg, sp, #constT" */
+ if (!valid && !isRSB && rN == 13 && rD != 15)
valid = True;
if (valid) {
IRTemp argL = newTemp(Ity_I32);
@@ -16163,9 +16163,9 @@
&& rN == 13 && imm5 == 0 && how == 0) {
valid = True;
}
- /* also allow "sub.w sp, sp, reg w/ no shift */
+ /* also allow "sub.w reg, sp, reg w/ no shift */
if (!valid && INSN0(8,5) == BITS4(1,1,0,1) // add
- && rD == 13 && rN == 13 && imm5 == 0 && how == 0) {
+ && rD != 15 && rN == 13 && imm5 == 0 && how == 0) {
valid = True;
}
if (valid) {