• Home
  • Raw
  • Download

Lines Matching refs:rN

2396 IRExpr* mk_EA_reg_plusminus_imm12 ( UInt rN, UInt bU, UInt imm12,  in mk_EA_reg_plusminus_imm12()  argument
2399 vassert(rN < 16); in mk_EA_reg_plusminus_imm12()
2403 DIS(buf, "[r%u, #%c%u]", rN, opChar, imm12); in mk_EA_reg_plusminus_imm12()
2406 getIRegA(rN), in mk_EA_reg_plusminus_imm12()
2415 IRExpr* mk_EA_reg_plusminus_shifted_reg ( UInt rN, UInt bU, UInt rM, in mk_EA_reg_plusminus_shifted_reg() argument
2419 vassert(rN < 16); in mk_EA_reg_plusminus_shifted_reg()
2430 DIS(buf, "[r%u, %c r%u LSL #%u]", rN, opChar, rM, imm5); in mk_EA_reg_plusminus_shifted_reg()
2440 rN, opChar, rM, imm5 == 0 ? 32 : imm5); in mk_EA_reg_plusminus_shifted_reg()
2452 rN, opChar, rM, imm5 == 0 ? 32 : imm5); in mk_EA_reg_plusminus_shifted_reg()
2463 DIS(buf, "[r%u, %cr%u, RRX]", rN, opChar, rM); in mk_EA_reg_plusminus_shifted_reg()
2471 DIS(buf, "[r%u, %cr%u, ROR #%u]", rN, opChar, rM, imm5); in mk_EA_reg_plusminus_shifted_reg()
2479 getIRegA(rN), index); in mk_EA_reg_plusminus_shifted_reg()
2485 IRExpr* mk_EA_reg_plusminus_imm8 ( UInt rN, UInt bU, UInt imm8, in mk_EA_reg_plusminus_imm8() argument
2488 vassert(rN < 16); in mk_EA_reg_plusminus_imm8()
2492 DIS(buf, "[r%u, #%c%u]", rN, opChar, imm8); in mk_EA_reg_plusminus_imm8()
2495 getIRegA(rN), in mk_EA_reg_plusminus_imm8()
2502 IRExpr* mk_EA_reg_plusminus_reg ( UInt rN, UInt bU, UInt rM, in mk_EA_reg_plusminus_reg() argument
2505 vassert(rN < 16); in mk_EA_reg_plusminus_reg()
2510 DIS(buf, "[r%u, %c r%u]", rN, opChar, rM); in mk_EA_reg_plusminus_reg()
2512 getIRegA(rN), index); in mk_EA_reg_plusminus_reg()
8393 UInt rN = INSN(19,16); in dis_neon_load_or_store() local
8411 assign(initialRn, isT ? getIRegT(rN) : getIRegA(rN)); in dis_neon_load_or_store()
8455 DIP("}, [r%u]", rN); in dis_neon_load_or_store()
8552 DIP("}, [r%u]", rN); in dis_neon_load_or_store()
8566 putIRegT(rN, e, IRTemp_INVALID); in dis_neon_load_or_store()
8568 putIRegA(rN, e, IRTemp_INVALID, Ijk_Boring); in dis_neon_load_or_store()
8574 putIRegT(rN, e, IRTemp_INVALID); in dis_neon_load_or_store()
8576 putIRegA(rN, e, IRTemp_INVALID, Ijk_Boring); in dis_neon_load_or_store()
8840 putIRegT(rN, e, IRTemp_INVALID); in dis_neon_load_or_store()
8842 putIRegA(rN, e, IRTemp_INVALID, Ijk_Boring); in dis_neon_load_or_store()
8859 DIP("}, [r%u]", rN); in dis_neon_load_or_store()
10983 UInt rD = 99, rN = 99, rM = 99, rA = 99; in decode_V6MEDIA_instruction() local
10988 rN = INSNT0(3,0); in decode_V6MEDIA_instruction()
10992 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM) && rA != 13) in decode_V6MEDIA_instruction()
11001 rN = INSNA(3,0); in decode_V6MEDIA_instruction()
11002 if (rD != 15 && rN != 15 && rM != 15 /* but rA can be 15 */) in decode_V6MEDIA_instruction()
11009 IRExpr* rNe = isT ? getIRegT(rN) : getIRegA(rN); in decode_V6MEDIA_instruction()
11023 nCC(conq), rD, rN, rM ); in decode_V6MEDIA_instruction()
11026 nCC(conq), rD, rN, rM, rA ); in decode_V6MEDIA_instruction()
12398 UInt rD = 99, rN = 99, rM = 99, rA = 99; in decode_V6MEDIA_instruction() local
12410 rN = INSNT0(3,0); in decode_V6MEDIA_instruction()
12412 && !isBadRegT(rN) && !isBadRegT(rM) && !isBadRegT(rA)) in decode_V6MEDIA_instruction()
12423 rN = INSNA(3,0); in decode_V6MEDIA_instruction()
12424 if (rD != 15 && rM != 15 && rN != 15) in decode_V6MEDIA_instruction()
12433 assign( irt_rN, isT ? getIRegT(rN) : getIRegA(rN) ); in decode_V6MEDIA_instruction()
12447 round ? "r" : "", nCC(conq), rD, rN, rM, rA); in decode_V6MEDIA_instruction()
12455 UInt rN = 99, rDlo = 99, rDhi = 99, rM = 99; in decode_V6MEDIA_instruction() local
12462 rN = INSNT0(3,0); in decode_V6MEDIA_instruction()
12467 if (!isBadRegT(rDlo) && !isBadRegT(rDhi) && !isBadRegT(rN) in decode_V6MEDIA_instruction()
12474 rN = INSNA(3,0); in decode_V6MEDIA_instruction()
12480 && rN != 15 && rM != 15 && rDlo != rDhi) in decode_V6MEDIA_instruction()
12497 assign( irt_rN, isT ? getIRegT(rN) : getIRegA(rN)); in decode_V6MEDIA_instruction()
12536 m_swap ? 'x' : ' ', nCC(conq), rDlo, rDhi, rN, rM); in decode_V6MEDIA_instruction()
12544 UInt rN = 99, rDlo = 99, rDhi = 99, rM = 99; in decode_V6MEDIA_instruction() local
12551 rN = INSNT0(3,0); in decode_V6MEDIA_instruction()
12556 if (!isBadRegT(rDlo) && !isBadRegT(rDhi) && !isBadRegT(rN) && in decode_V6MEDIA_instruction()
12563 rN = INSNA(3,0); in decode_V6MEDIA_instruction()
12569 rN != 15 && rM != 15 && rDlo != rDhi) in decode_V6MEDIA_instruction()
12585 assign( irt_rN, isT ? getIRegT(rN) : getIRegA(rN) ); in decode_V6MEDIA_instruction()
12624 m_swap ? 'x' : ' ', nCC(conq), rDlo, rDhi, rN, rM); in decode_V6MEDIA_instruction()
14054 UInt rN, /* base reg */ in mk_ldm_stm() argument
14074 assign(oldRnT, arm ? getIRegA(rN) : getIRegT(rN)); in mk_ldm_stm()
14104 putIRegA( rN, e, IRTemp_INVALID, Ijk_Boring ); in mk_ldm_stm()
14106 putIRegT( rN, e, IRTemp_INVALID ); in mk_ldm_stm()
14125 vassert(r != rN); in mk_ldm_stm()
14138 if (bW == 0 && (regList & (1<<rN)) != 0) { in mk_ldm_stm()
14143 vex_printf("\nREG_LIST_PRE: (rN=%u)\n", rN); in mk_ldm_stm()
14151 if (xReg[i] == rN) in mk_ldm_stm()
14194 if (rN == 13 && bL == 1 && bINC && !bBEFORE && bW == 1) { in mk_ldm_stm()
14218 r == rN ? mkexpr(oldRnT) in mk_ldm_stm()
14228 putIRegA( rN, e, IRTemp_INVALID, Ijk_Boring ); in mk_ldm_stm()
14230 putIRegT( rN, e, IRTemp_INVALID ); in mk_ldm_stm()
14322 UInt rN = INSN(19,16); in decode_CP10_CP11_instruction() local
14340 if (rN == 15 && (summary == 2 || summary == 3 || isT)) in decode_CP10_CP11_instruction()
14365 assign(rnT, align4if(isT ? getIRegT(rN) : getIRegA(rN), in decode_CP10_CP11_instruction()
14366 rN == 15)); in decode_CP10_CP11_instruction()
14386 putIRegT(rN, mkexpr(rnTnew), IRTemp_INVALID); in decode_CP10_CP11_instruction()
14388 putIRegA(rN, mkexpr(rnTnew), IRTemp_INVALID, Ijk_Boring); in decode_CP10_CP11_instruction()
14406 putIRegT(rN, mkexpr(rnTnew), IRTemp_INVALID); in decode_CP10_CP11_instruction()
14408 putIRegA(rN, mkexpr(rnTnew), IRTemp_INVALID, Ijk_Boring); in decode_CP10_CP11_instruction()
14414 nm, nCC(conq), rN, dD, dD + nRegs - 1); in decode_CP10_CP11_instruction()
14417 nm, nCC(conq), rN, dD, dD + nRegs - 1); in decode_CP10_CP11_instruction()
14420 nm, nCC(conq), rN, dD, dD + nRegs - 1); in decode_CP10_CP11_instruction()
14459 UInt rN = INSN(19,16); in decode_CP10_CP11_instruction() local
14477 if (rN == 15 && (summary == 2 || summary == 3 || isT)) in decode_CP10_CP11_instruction()
14502 assign(rnT, align4if(isT ? getIRegT(rN) : getIRegA(rN), in decode_CP10_CP11_instruction()
14503 rN == 15)); in decode_CP10_CP11_instruction()
14523 putIRegT(rN, mkexpr(rnTnew), IRTemp_INVALID); in decode_CP10_CP11_instruction()
14525 putIRegA(rN, mkexpr(rnTnew), IRTemp_INVALID, Ijk_Boring); in decode_CP10_CP11_instruction()
14543 putIRegT(rN, mkexpr(rnTnew), IRTemp_INVALID); in decode_CP10_CP11_instruction()
14545 putIRegA(rN, mkexpr(rnTnew), IRTemp_INVALID, Ijk_Boring); in decode_CP10_CP11_instruction()
14551 nm, nCC(conq), rN, dD, dD + nRegs - 1); in decode_CP10_CP11_instruction()
14554 nm, nCC(conq), rN, dD, dD + nRegs - 1); in decode_CP10_CP11_instruction()
14557 nm, nCC(conq), rN, dD, dD + nRegs - 1); in decode_CP10_CP11_instruction()
14618 UInt rN = INSN(19,16); /* hi32 */ in decode_CP10_CP11_instruction() local
14619 if (rD == 15 || rN == 15 || (isT && (rD == 13 || rN == 13))) { in decode_CP10_CP11_instruction()
14625 isT ? getIRegT(rN) : getIRegA(rN), in decode_CP10_CP11_instruction()
14628 DIP("vmov%s d%u, r%u, r%u\n", nCC(conq), dM, rD, rN); in decode_CP10_CP11_instruction()
14638 UInt rN = INSN(19,16); /* hi32 */ in decode_CP10_CP11_instruction() local
14639 if (rD == 15 || rN == 15 || (isT && (rD == 13 || rN == 13)) in decode_CP10_CP11_instruction()
14640 || rD == rN) { in decode_CP10_CP11_instruction()
14648 putIRegT(rN, hi32, condT); in decode_CP10_CP11_instruction()
14651 putIRegA(rN, hi32, condT, Ijk_Boring); in decode_CP10_CP11_instruction()
14654 DIP("vmov%s r%u, r%u, d%u\n", nCC(conq), rD, rN, dM); in decode_CP10_CP11_instruction()
14663 UInt rN = INSN(15,12); in decode_CP10_CP11_instruction() local
14665 if (rM == 15 || rN == 15 || (isT && (rM == 13 || rN == 13)) in decode_CP10_CP11_instruction()
14670 unop(Iop_ReinterpI32asF32, isT ? getIRegT(rN) : getIRegA(rN)), in decode_CP10_CP11_instruction()
14676 nCC(conq), sD, sD + 1, rN, rM); in decode_CP10_CP11_instruction()
14684 UInt rN = INSN(15,12); in decode_CP10_CP11_instruction() local
14686 if (rM == 15 || rN == 15 || (isT && (rM == 13 || rN == 13)) in decode_CP10_CP11_instruction()
14687 || sD == 31 || rN == rM) { in decode_CP10_CP11_instruction()
14693 putIRegT(rN, res0, condT); in decode_CP10_CP11_instruction()
14696 putIRegA(rN, res0, condT, Ijk_Boring); in decode_CP10_CP11_instruction()
14700 nCC(conq), rN, rM, sD, sD + 1); in decode_CP10_CP11_instruction()
14754 UInt rN = (INSN(7,7) << 4) | INSN(19,16); in decode_CP10_CP11_instruction() local
14766 getDRegI64(rN), in decode_CP10_CP11_instruction()
14773 rT, rN, index); in decode_CP10_CP11_instruction()
14780 getDRegI64(rN), in decode_CP10_CP11_instruction()
14787 rT, rN, index); in decode_CP10_CP11_instruction()
14792 IRExpr* e = binop(Iop_GetElem32x2, getDRegI64(rN), mkU8(index)); in decode_CP10_CP11_instruction()
14797 DIP("vmov%s.32 r%u, d%u[%u]\n", nCC(conq), rT, rN, index); in decode_CP10_CP11_instruction()
14895 UInt rN = INSN(19,16); in decode_CP10_CP11_instruction() local
14909 align4if(isT ? getIRegT(rN) : getIRegA(rN), in decode_CP10_CP11_instruction()
14910 rN == 15), in decode_CP10_CP11_instruction()
14918 bL ? "ld" : "st", nCC(conq), dD, rN, in decode_CP10_CP11_instruction()
15251 UInt rN = INSN(19,16); in decode_CP10_CP11_instruction() local
15269 if (rN == 15 && (summary == 2 || summary == 3 || isT)) in decode_CP10_CP11_instruction()
15294 assign(rnT, align4if(isT ? getIRegT(rN) : getIRegA(rN), in decode_CP10_CP11_instruction()
15295 rN == 15)); in decode_CP10_CP11_instruction()
15315 putIRegT(rN, mkexpr(rnTnew), IRTemp_INVALID); in decode_CP10_CP11_instruction()
15317 putIRegA(rN, mkexpr(rnTnew), IRTemp_INVALID, Ijk_Boring); in decode_CP10_CP11_instruction()
15335 putIRegT(rN, mkexpr(rnTnew), IRTemp_INVALID); in decode_CP10_CP11_instruction()
15337 putIRegA(rN, mkexpr(rnTnew), IRTemp_INVALID, Ijk_Boring); in decode_CP10_CP11_instruction()
15343 nm, nCC(conq), rN, fD, fD + nRegs - 1); in decode_CP10_CP11_instruction()
15346 nm, nCC(conq), rN, fD, fD + nRegs - 1); in decode_CP10_CP11_instruction()
15349 nm, nCC(conq), rN, fD, fD + nRegs - 1); in decode_CP10_CP11_instruction()
15400 UInt rN = INSN(19,16); in decode_CP10_CP11_instruction() local
15414 align4if(isT ? getIRegT(rN) : getIRegA(rN), in decode_CP10_CP11_instruction()
15415 rN == 15), in decode_CP10_CP11_instruction()
15423 bL ? "ld" : "st", nCC(conq), fD, rN, in decode_CP10_CP11_instruction()
15939 UInt rN = INSN(19,16); in decode_NV_instruction_ARMv7_and_below() local
15943 DIP("pld%c [r%u, #%c%u]\n", bR ? ' ' : 'w', rN, bU ? '+' : '-', imm12); in decode_NV_instruction_ARMv7_and_below()
15950 UInt rN = INSN(19,16); in decode_NV_instruction_ARMv7_and_below() local
15956 if (rM != 15 && (rN != 15 || bR)) { in decode_NV_instruction_ARMv7_and_below()
15957 IRExpr* eaE = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM, in decode_NV_instruction_ARMv7_and_below()
15974 UInt rN = INSN(19,16); in decode_NV_instruction_ARMv7_and_below() local
15977 DIP("pli [r%u, #%c%u]\n", rN, bU ? '+' : '-', imm12); in decode_NV_instruction_ARMv7_and_below()
16241 UInt rN = (insn >> 16) & 0xF; /* 19:16 */ in disInstr_ARM_WRK() local
16280 assign(rNt, getIRegA(rN)); in disInstr_ARM_WRK()
16342 name, nCC(INSN_COND), bitS ? "s" : "", rD, rN, dis_buf ); in disInstr_ARM_WRK()
16351 if (rN != 0) in disInstr_ARM_WRK()
16396 assign(rNt, getIRegA(rN)); in disInstr_ARM_WRK()
16409 nCC(INSN_COND), rN, dis_buf ); in disInstr_ARM_WRK()
16422 assign(rNt, getIRegA(rN)); in disInstr_ARM_WRK()
16440 nCC(INSN_COND), rN, dis_buf ); in disInstr_ARM_WRK()
16454 assign(rNt, getIRegA(rN)); in disInstr_ARM_WRK()
16516 name, nCC(INSN_COND), bitS ? "s" : "", rD, rN, dis_buf ); in disInstr_ARM_WRK()
16573 { UInt rN = (insn >> 16) & 0xF; /* 19:16 */ in disInstr_ARM_WRK() local
16593 if (rN == 15) goto after_load_store_ubyte_or_word; in disInstr_ARM_WRK()
16594 if (bL == 1 && rN == rD) goto after_load_store_ubyte_or_word; in disInstr_ARM_WRK()
16598 if (rN == 15) goto after_load_store_ubyte_or_word; in disInstr_ARM_WRK()
16599 if (rN == rM) goto after_load_store_ubyte_or_word; in disInstr_ARM_WRK()
16600 if (bL == 1 && rN == rD) goto after_load_store_ubyte_or_word; in disInstr_ARM_WRK()
16611 eaE = mk_EA_reg_plusminus_imm12( rN, bU, imm12, dis_buf ); in disInstr_ARM_WRK()
16614 eaE = mk_EA_reg_plusminus_shifted_reg( rN, bU, rM, sh2, imm5, in disInstr_ARM_WRK()
16624 assign(rnT, getIRegA(rN)); in disInstr_ARM_WRK()
16651 putIRegA( rN, mkexpr(eaT), condT, Ijk_Boring ); in disInstr_ARM_WRK()
16676 if (rN == 13 && summary == (3 | 16) && bB == 0) { in disInstr_ARM_WRK()
16707 vassert(rD != rN); /* since we just wrote rD */ in disInstr_ARM_WRK()
16708 putIRegA( rN, mkexpr(eaT), condT, Ijk_Boring ); in disInstr_ARM_WRK()
16801 { UInt rN = (insn >> 16) & 0xF; /* 19:16 */ in disInstr_ARM_WRK() local
16832 if (rN == 15) goto after_load_store_sbyte_or_hword; in disInstr_ARM_WRK()
16833 if (bL == 1 && rN == rD) goto after_load_store_sbyte_or_hword; in disInstr_ARM_WRK()
16837 if (rN == 15) goto after_load_store_sbyte_or_hword; in disInstr_ARM_WRK()
16838 if (rN == rM) goto after_load_store_sbyte_or_hword; in disInstr_ARM_WRK()
16839 if (bL == 1 && rN == rD) goto after_load_store_sbyte_or_hword; in disInstr_ARM_WRK()
16862 eaE = mk_EA_reg_plusminus_imm8( rN, bU, imm8, dis_buf ); in disInstr_ARM_WRK()
16865 eaE = mk_EA_reg_plusminus_reg( rN, bU, rM, dis_buf ); in disInstr_ARM_WRK()
16874 assign(rnT, getIRegA(rN)); in disInstr_ARM_WRK()
16929 vassert(rD != rN); /* since we just wrote rD */ in disInstr_ARM_WRK()
16930 putIRegA( rN, mkexpr(eaT), condT, Ijk_Boring ); in disInstr_ARM_WRK()
16982 UInt rN = (insn >> 16) & 0xF; in disInstr_ARM_WRK() local
16990 if (rN == 15) goto after_load_store_multiple; in disInstr_ARM_WRK()
16997 if (bW == 1 && bL == 1 && ((1 << rN) & regList) > 0) in disInstr_ARM_WRK()
17009 mk_ldm_stm( True/*arm*/, rN, bINC, bBEFORE, bW, bL, regList ); in disInstr_ARM_WRK()
17014 rN, bW ? "!" : "", regList); in disInstr_ARM_WRK()
17219 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
17220 if (rD == 15 || rM == 15 || rN == 15) { in disInstr_ARM_WRK()
17226 assign(argL, getIRegA(rN)); in disInstr_ARM_WRK()
17230 DIP("sdiv r%u, r%u, r%u\n", rD, rN, rM); in disInstr_ARM_WRK()
17241 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
17242 if (rD == 15 || rM == 15 || rN == 15) { in disInstr_ARM_WRK()
17248 assign(argL, getIRegA(rN)); in disInstr_ARM_WRK()
17252 DIP("udiv r%u, r%u, r%u\n", rD, rN, rM); in disInstr_ARM_WRK()
17263 UInt rN = INSN(15,12); in disInstr_ARM_WRK() local
17271 if (rD == 15 || rM == 15 || rS == 15 || rN == 15) { in disInstr_ARM_WRK()
17282 assign( argP, getIRegA(rN)); in disInstr_ARM_WRK()
17304 nCC(INSN_COND), rD, rM, rS, rN); in disInstr_ARM_WRK()
17417 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
17418 if (rDlo == 15 || rDhi == 15 || rN == 15 || rM == 15 || rDhi == rDlo) { in disInstr_ARM_WRK()
17428 assign( argN, getIRegA(rN) ); in disInstr_ARM_WRK()
17444 nCC(INSN_COND), rDlo, rDhi, rN, rM); in disInstr_ARM_WRK()
17476 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
17479 if (rN != 15 && (write_nzcvq || write_ge)) { in disInstr_ARM_WRK()
17481 assign(rNt, getIRegA(rN)); in disInstr_ARM_WRK()
17484 write_nzcvq ? "f" : "", write_ge ? "g" : "", rN); in disInstr_ARM_WRK()
17526 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17535 if (rD == 15 || rN == 15 || rM == 15 || rN == rM || rN == rD) { in disInstr_ARM_WRK()
17544 assign(tRn, getIRegA(rN)); in disInstr_ARM_WRK()
17568 isB ? "b" : "", nCC(INSN_COND), rD, rM, rN); in disInstr_ARM_WRK()
17583 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17596 if (rT == 15 || rN == 15) in disInstr_ARM_WRK()
17600 if ((rT & 1) == 1 || rT == 14 || rN == 15) in disInstr_ARM_WRK()
17613 stmt( IRStmt_LLSC(Iend_LE, res, getIRegA(rN), in disInstr_ARM_WRK()
17622 nm, nCC(INSN_COND), rT+0, rT+1, rN); in disInstr_ARM_WRK()
17627 DIP("ldrex%s%s r%u, [r%u]\n", nm, nCC(INSN_COND), rT, rN); in disInstr_ARM_WRK()
17637 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17651 if (rD == 15 || rN == 15 || rT == 15 in disInstr_ARM_WRK()
17652 || rD == rN || rD == rT) in disInstr_ARM_WRK()
17656 if (rD == 15 || (rT & 1) == 1 || rT == 14 || rN == 15 in disInstr_ARM_WRK()
17657 || rD == rN || rD == rT || rD == rT+1) in disInstr_ARM_WRK()
17678 stmt( IRStmt_LLSC(Iend_LE, resSC1, getIRegA(rN), mkexpr(data)) ); in disInstr_ARM_WRK()
17690 nm, nCC(INSN_COND), rD, rT, rT+1, rN); in disInstr_ARM_WRK()
17693 nm, nCC(INSN_COND), rD, rT, rN); in disInstr_ARM_WRK()
17799 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
17813 assign(src, rN == 15 ? mkU32(0) : getIRegA(rN)); in disInstr_ARM_WRK()
17827 if (rN == 15) { in disInstr_ARM_WRK()
17832 nCC(INSN_COND), rD, rN, lsb, msb-lsb+1); in disInstr_ARM_WRK()
17843 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
17848 if (rD == 15 || rN == 15 || msb >= 32) { in disInstr_ARM_WRK()
17858 assign(src, getIRegA(rN)); in disInstr_ARM_WRK()
17870 nCC(INSN_COND), rD, rN, lsb, wm1 + 1); in disInstr_ARM_WRK()
17925 { UInt rN = (insn >> 16) & 0xF; /* 19:16 */ in disInstr_ARM_WRK() local
17950 if (rN == 15) goto after_load_store_doubleword; in disInstr_ARM_WRK()
17951 if (bS == 0 && (rN == rD || rN == rD+1)) in disInstr_ARM_WRK()
17956 if (rN == 15) goto after_load_store_doubleword; in disInstr_ARM_WRK()
17957 if (rN == rM) goto after_load_store_doubleword; in disInstr_ARM_WRK()
17958 if (bS == 0 && (rN == rD || rN == rD+1)) in disInstr_ARM_WRK()
17981 eaE = mk_EA_reg_plusminus_imm8( rN, bU, imm8, dis_buf ); in disInstr_ARM_WRK()
17984 eaE = mk_EA_reg_plusminus_reg( rN, bU, rM, dis_buf ); in disInstr_ARM_WRK()
17993 assign(rnT, getIRegA(rN)); in disInstr_ARM_WRK()
18016 && rN == 13 && rN != rD && rN != rD+1 in disInstr_ARM_WRK()
18019 putIRegA( rN, mkexpr(eaT), condT, Ijk_Boring ); in disInstr_ARM_WRK()
18056 vassert(rN != 15); /* from checks above */ in disInstr_ARM_WRK()
18058 vassert(rD+0 != rN); /* since we just wrote rD+0 */ in disInstr_ARM_WRK()
18059 vassert(rD+1 != rN); /* since we just wrote rD+1 */ in disInstr_ARM_WRK()
18062 putIRegA( rN, mkexpr(eaT), condT, Ijk_Boring ); in disInstr_ARM_WRK()
18087 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18092 if (rN == 15/*it's {S,U}XTB*/ || rD == 15 || rM == 15) { in disInstr_ARM_WRK()
18099 assign(srcL, getIRegA(rN)); in disInstr_ARM_WRK()
18107 isU ? 'u' : 's', nCC(INSN_COND), rD, rN, rM, rot); in disInstr_ARM_WRK()
18117 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18122 if (rN == 15/*it's {S,U}XTH*/ || rD == 15 || rM == 15) { in disInstr_ARM_WRK()
18129 assign(srcL, getIRegA(rN)); in disInstr_ARM_WRK()
18138 isU ? 'u' : 's', nCC(INSN_COND), rD, rN, rM, rot); in disInstr_ARM_WRK()
18213 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
18214 if (rD != 15 && rM != 15 && rN != 15) { in disInstr_ARM_WRK()
18218 binop(Iop_MullS32, getIRegA(rN), getIRegA(rM)), in disInstr_ARM_WRK()
18222 nCC(INSN_COND), bitR ? "r" : "", rD, rN, rM); in disInstr_ARM_WRK()
18235 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
18236 if (rD != 15 && rM != 15 && rN != 15) { in disInstr_ARM_WRK()
18242 binop(Iop_MullS32, getIRegA(rN), getIRegA(rM))), in disInstr_ARM_WRK()
18246 nCC(INSN_COND), bitR ? "r" : "", rD, rN, rM, rA); in disInstr_ARM_WRK()
18257 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18261 if (rT == 15 || rN == 15 || rN == rT) valid = False; in disInstr_ARM_WRK()
18265 ILGop_Ident32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
18268 getIRegA(rN), mkU32(imm12)); in disInstr_ARM_WRK()
18269 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
18271 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm12); in disInstr_ARM_WRK()
18283 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18289 if (rT == 15 || rN == 15 || rN == rT || rM == 15 in disInstr_ARM_WRK()
18295 ILGop_Ident32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
18298 IRExpr* erN = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM, in disInstr_ARM_WRK()
18300 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
18312 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18316 if (rT == 15 || rN == 15 || rN == rT) valid = False; in disInstr_ARM_WRK()
18320 ILGop_8Uto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
18323 getIRegA(rN), mkU32(imm12)); in disInstr_ARM_WRK()
18324 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
18326 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm12); in disInstr_ARM_WRK()
18338 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18344 if (rT == 15 || rN == 15 || rN == rT || rM == 15 in disInstr_ARM_WRK()
18350 ILGop_8Uto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
18353 IRExpr* erN = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM, in disInstr_ARM_WRK()
18355 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
18368 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18374 if (rT == 15 || rN == 15 || rN == rT) in disInstr_ARM_WRK()
18379 ILGop_16Uto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
18382 getIRegA(rN), mkU32(imm8)); in disInstr_ARM_WRK()
18383 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
18385 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm8); in disInstr_ARM_WRK()
18397 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18401 if (rT == 15 || rN == 15 || rN == rT || rM == 15) in disInstr_ARM_WRK()
18406 ILGop_16Uto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
18409 getIRegA(rN), getIRegA(rM)); in disInstr_ARM_WRK()
18410 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
18412 nCC(INSN_COND), rT, rN, bU ? '+' : '-', rM); in disInstr_ARM_WRK()
18424 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18430 if (rN == 15 || rT == 15 || rN == rT) in disInstr_ARM_WRK()
18435 ILGop_16Sto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
18438 getIRegA(rN), mkU32(imm8)); in disInstr_ARM_WRK()
18439 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
18441 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm8); in disInstr_ARM_WRK()
18453 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18457 if (rN == 15 || rT == 15 || rN == rT || rM == 15) in disInstr_ARM_WRK()
18462 ILGop_16Sto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
18465 getIRegA(rN), getIRegA(rM)); in disInstr_ARM_WRK()
18466 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
18468 nCC(INSN_COND), rT, rN, bU ? '+' : '-', rM); in disInstr_ARM_WRK()
18480 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18486 if (rT == 15 || rN == 15 || rN == rT) in disInstr_ARM_WRK()
18491 ILGop_8Sto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
18494 getIRegA(rN), mkU32(imm8)); in disInstr_ARM_WRK()
18495 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
18497 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm8); in disInstr_ARM_WRK()
18509 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18513 if (rT == 15 || rN == 15 || rN == rT || rM == 15) in disInstr_ARM_WRK()
18518 ILGop_8Sto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
18521 getIRegA(rN), getIRegA(rM)); in disInstr_ARM_WRK()
18522 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
18524 nCC(INSN_COND), rT, rN, bU ? '+' : '-', rM); in disInstr_ARM_WRK()
18535 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18539 if (rT == 15 || rN == 15 || rN == rT) valid = False; in disInstr_ARM_WRK()
18541 IRExpr* address = getIRegA(rN); in disInstr_ARM_WRK()
18545 getIRegA(rN), mkU32(imm12)); in disInstr_ARM_WRK()
18546 putIRegA(rN, newRn, condT, Ijk_Boring); in disInstr_ARM_WRK()
18548 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm12); in disInstr_ARM_WRK()
18560 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18566 if (rT == 15 || rN == 15 || rN == rT || rM == 15) valid = False; in disInstr_ARM_WRK()
18568 IRExpr* address = getIRegA(rN); in disInstr_ARM_WRK()
18572 IRExpr* erN = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM, in disInstr_ARM_WRK()
18574 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
18587 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18593 if (rT == 15 || rN == 15 || rN == rT) valid = False; in disInstr_ARM_WRK()
18595 IRExpr* address = getIRegA(rN); in disInstr_ARM_WRK()
18599 getIRegA(rN), mkU32(imm8)); in disInstr_ARM_WRK()
18600 putIRegA(rN, newRn, condT, Ijk_Boring); in disInstr_ARM_WRK()
18602 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm8); in disInstr_ARM_WRK()
18614 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18618 if (rT == 15 || rN == 15 || rN == rT || rM == 15) valid = False; in disInstr_ARM_WRK()
18620 IRExpr* address = getIRegA(rN); in disInstr_ARM_WRK()
18624 getIRegA(rN), getIRegA(rM)); in disInstr_ARM_WRK()
18625 putIRegA(rN, newRn, condT, Ijk_Boring); in disInstr_ARM_WRK()
18627 nCC(INSN_COND), rT, rN, bU ? '+' : '-', rM); in disInstr_ARM_WRK()
18638 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18642 if (rN == 15 || rN == rT) valid = False; in disInstr_ARM_WRK()
18644 IRExpr* address = getIRegA(rN); in disInstr_ARM_WRK()
18647 getIRegA(rN), mkU32(imm12)); in disInstr_ARM_WRK()
18648 putIRegA(rN, newRn, condT, Ijk_Boring); in disInstr_ARM_WRK()
18650 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm12); in disInstr_ARM_WRK()
18662 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
18668 if (rN == 15 || rN == rT || rM == 15) valid = False; in disInstr_ARM_WRK()
18672 storeGuardedLE( getIRegA(rN), getIRegA(rT), condT); in disInstr_ARM_WRK()
18674 IRExpr* erN = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM, in disInstr_ARM_WRK()
18676 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
19413 UInt rN = INSN0(2,0); in disInstr_THUMB_WRK() local
19417 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
19422 DIP("%s r%u, r%u\n", isCMN ? "cmn" : "cmp", rN, rM); in disInstr_THUMB_WRK()
19428 UInt rN = INSN0(2,0); in disInstr_THUMB_WRK() local
19435 assign( res, binop(Iop_And32, getIRegT(rN), getIRegT(rM)) ); in disInstr_THUMB_WRK()
19438 DIP("tst r%u, r%u\n", rN, rM); in disInstr_THUMB_WRK()
19874 UInt rN = (h1 << 3) | INSN0(2,0); in disInstr_THUMB_WRK() local
19878 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
19882 DIP("cmphi r%u, r%u\n", rN, rM); in disInstr_THUMB_WRK()
19950 UInt rN = INSN0(2,0); in disInstr_THUMB_WRK() local
19957 getIRegT(rN), mkU32(0)) ); in disInstr_THUMB_WRK()
19968 DIP("cb%s r%u, 0x%x\n", bOP ? "nz" : "z", rN, dst - 1); in disInstr_THUMB_WRK()
20131 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
20136 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
20143 DIP("%s r%u, r%u, #%u\n", isSub ? "subs" : "adds", rD, rN, uimm3); in disInstr_THUMB_WRK()
20152 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
20157 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
20164 DIP("%s r%u, r%u, r%u\n", isSub ? "subs" : "adds", rD, rN, rM); in disInstr_THUMB_WRK()
20174 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
20178 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), getIRegT(rM)); in disInstr_THUMB_WRK()
20189 DIP("%s r%u, [r%u, r%u]\n", isLD ? "ldr" : "str", rD, rN, rM); in disInstr_THUMB_WRK()
20199 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
20203 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), getIRegT(rM)); in disInstr_THUMB_WRK()
20214 DIP("%sh r%u, [r%u, r%u]\n", isLD ? "ldr" : "str", rD, rN, rM); in disInstr_THUMB_WRK()
20222 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
20225 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), getIRegT(rM)); in disInstr_THUMB_WRK()
20232 DIP("ldrsh r%u, [r%u, r%u]\n", rD, rN, rM); in disInstr_THUMB_WRK()
20240 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
20243 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), getIRegT(rM)); in disInstr_THUMB_WRK()
20250 DIP("ldrsb r%u, [r%u, r%u]\n", rD, rN, rM); in disInstr_THUMB_WRK()
20260 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
20264 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), getIRegT(rM)); in disInstr_THUMB_WRK()
20275 DIP("%sb r%u, [r%u, r%u]\n", isLD ? "ldr" : "str", rD, rN, rM); in disInstr_THUMB_WRK()
20294 UInt rN = INSN0(10,8); in disInstr_THUMB_WRK() local
20298 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
20300 putIRegT( rN, binop(isSub ? Iop_Sub32 : Iop_Add32, in disInstr_THUMB_WRK()
20304 DIP("%s r%u, #%u\n", isSub ? "subs" : "adds", rN, uimm8); in disInstr_THUMB_WRK()
20334 UInt rN = INSN0(10,8); in disInstr_THUMB_WRK() local
20338 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
20342 DIP("cmp r%u, #%u\n", rN, uimm8); in disInstr_THUMB_WRK()
20389 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
20393 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm5 * 4)); in disInstr_THUMB_WRK()
20404 DIP("%s r%u, [r%u, #%u]\n", isLD ? "ldr" : "str", rD, rN, imm5 * 4); in disInstr_THUMB_WRK()
20414 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
20418 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm5 * 2)); in disInstr_THUMB_WRK()
20429 DIP("%sh r%u, [r%u, #%u]\n", isLD ? "ldr" : "str", rD, rN, imm5 * 2); in disInstr_THUMB_WRK()
20439 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
20443 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm5)); in disInstr_THUMB_WRK()
20454 DIP("%sb r%u, [r%u, #%u]\n", isLD ? "ldr" : "str", rD, rN, imm5); in disInstr_THUMB_WRK()
20485 UInt rN = INSN0(10,8); in disInstr_THUMB_WRK() local
20496 assign(oldRn, getIRegT(rN)); in disInstr_THUMB_WRK()
20511 if (0 == (list & (1 << rN))) { in disInstr_THUMB_WRK()
20512 putIRegT(rN, in disInstr_THUMB_WRK()
20522 DIP("ldmia r%u!, {0x%04x}\n", rN, list); in disInstr_THUMB_WRK()
20531 UInt rN = INSN0(10,8); in disInstr_THUMB_WRK() local
20536 if (valid && 0 != (list & (1 << rN))) { in disInstr_THUMB_WRK()
20537 for (i = 0; i < rN; i++) { in disInstr_THUMB_WRK()
20550 assign(oldRn, getIRegT(rN)); in disInstr_THUMB_WRK()
20560 putIRegT(rN, in disInstr_THUMB_WRK()
20568 DIP("stmia r%u!, {0x%04x}\n", rN, list); in disInstr_THUMB_WRK()
20796 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20818 if (rN == 15) valid = False; in disInstr_THUMB_WRK()
20821 if (bW == 1 && (regList & (1<<rN))) valid = False; in disInstr_THUMB_WRK()
20825 if (rN == 15) valid = False; in disInstr_THUMB_WRK()
20827 if (bW == 1 && (regList & (1<<rN))) valid = False; in disInstr_THUMB_WRK()
20843 mk_ldm_stm(False/*!arm*/, rN, bINC, bBEFORE, bW, bL, regList); in disInstr_THUMB_WRK()
20855 rN, bW ? "!" : "", regList); in disInstr_THUMB_WRK()
20866 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20868 Bool valid = !isBadRegT(rN) && !isBadRegT(rD); in disInstr_THUMB_WRK()
20870 if (!valid && rD <= 14 && rN == 13) in disInstr_THUMB_WRK()
20877 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
20884 bS == 1 ? "s" : "", rD, rN, imm32); in disInstr_THUMB_WRK()
20893 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20895 Bool valid = !isBadRegT(rN) && !isBadRegT(rD); in disInstr_THUMB_WRK()
20897 if (!valid && rD <= 14 && rN == 13) in disInstr_THUMB_WRK()
20904 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
20908 DIP("addw r%u, r%u, #%u\n", rD, rN, imm12); in disInstr_THUMB_WRK()
20920 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20921 if (rN != 15) { in disInstr_THUMB_WRK()
20926 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
20930 DIP("%s.w r%u, #%u\n", isCMN ? "cmn" : "cmp", rN, imm32); in disInstr_THUMB_WRK()
20942 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20943 if (!isBadRegT(rN)) { // yes, really, it's inconsistent with CMP.W in disInstr_THUMB_WRK()
20952 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
20961 DIP("%s.w r%u, #%u\n", isTST ? "tst" : "teq", rN, imm32); in disInstr_THUMB_WRK()
20974 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20976 Bool valid = !isBadRegT(rN) && !isBadRegT(rD); in disInstr_THUMB_WRK()
20979 if (!valid && !isRSB && rN == 13 && rD != 15) in disInstr_THUMB_WRK()
20986 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
20999 isRSB ? "rsb" : "sub", bS == 1 ? "s" : "", rD, rN, imm32); in disInstr_THUMB_WRK()
21008 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21010 Bool valid = !isBadRegT(rN) && !isBadRegT(rD); in disInstr_THUMB_WRK()
21012 if (!valid && rD == 13 && rN == 13) in disInstr_THUMB_WRK()
21019 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
21023 DIP("subw r%u, r%u, #%u\n", rD, rN, imm12); in disInstr_THUMB_WRK()
21037 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21039 if (!isBadRegT(rN) && !isBadRegT(rD)) { in disInstr_THUMB_WRK()
21045 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
21076 nm, bS == 1 ? "s" : "", rD, rN, imm32); in disInstr_THUMB_WRK()
21093 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21095 if (!isBadRegT(rN) && !isBadRegT(rD)) { in disInstr_THUMB_WRK()
21114 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
21129 nm, bS == 1 ? "s" : "", rD, rN, imm32); in disInstr_THUMB_WRK()
21142 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21149 Bool valid = !isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM); in disInstr_THUMB_WRK()
21153 && rD != 15 && rN == 13 && imm5 <= 31 && how == 0) { in disInstr_THUMB_WRK()
21159 && rD != 15 && rN == 13 && imm5 <= 5 && how == 0) { in disInstr_THUMB_WRK()
21175 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
21208 nm, bS ? "s" : "", rD, rN, dis_buf); in disInstr_THUMB_WRK()
21221 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21224 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
21230 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
21273 nm, bS ? "s" : "", rD, rN, dis_buf); in disInstr_THUMB_WRK()
21290 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21293 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
21312 assign(rNt, getIRegT(rN)); in disInstr_THUMB_WRK()
21342 nm, bS ? "s" : "", rD, rN, dis_buf); in disInstr_THUMB_WRK()
21355 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21359 Bool valid = !isBadRegT(rN) && !isBadRegT(rM) && !isBadRegT(rD); in disInstr_THUMB_WRK()
21368 assign(rNt, getIRegT(rN)); in disInstr_THUMB_WRK()
21372 rNt, how, rMt, rN, rM in disInstr_THUMB_WRK()
21382 nm, bS ? "s" : "", rD, rN, rM); in disInstr_THUMB_WRK()
21392 UInt rN = INSN1(3,0); in disInstr_THUMB_WRK() local
21396 ? (!isBadRegT(rD) && !isBadRegT(rN)) in disInstr_THUMB_WRK()
21397 : (rD != 15 && rN != 15 && (rD != 13 || rN != 13)); in disInstr_THUMB_WRK()
21403 assign(rNt, getIRegT(rN)); in disInstr_THUMB_WRK()
21408 dis_buf, &oldRn, bS ? &oldC : NULL, rNt, how, imm5, rN in disInstr_THUMB_WRK()
21434 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21436 if (!isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
21443 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
21463 DIP("%s.w r%u, %s\n", isTST ? "tst" : "teq", rN, dis_buf); in disInstr_THUMB_WRK()
21475 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21477 if (!isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
21483 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
21496 DIP("%s.w r%u, %s\n", isCMN ? "cmn" : "cmp", rN, dis_buf); in disInstr_THUMB_WRK()
21603 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21616 if (rN == 15) in disInstr_THUMB_WRK()
21618 if (bW == 1 && rN == rT) in disInstr_THUMB_WRK()
21645 assign(preAddr, getIRegT(rN)); in disInstr_THUMB_WRK()
21671 vassert(rN != rT); // assured by validity check above in disInstr_THUMB_WRK()
21672 putIRegT(rN, mkexpr(postAddr), condT); in disInstr_THUMB_WRK()
21726 vassert(rN != rT); // assured by validity check above in disInstr_THUMB_WRK()
21727 putIRegT(rN, mkexpr(postAddr), condT); in disInstr_THUMB_WRK()
21732 vassert(rN != 15); // assured by validity check above in disInstr_THUMB_WRK()
21743 nm, rT, rN, bU ? '+' : '-', imm8); in disInstr_THUMB_WRK()
21747 nm, rT, rN, bU ? '+' : '-', imm8); in disInstr_THUMB_WRK()
21752 nm, rT, rN, bU ? '+' : '-', imm8); in disInstr_THUMB_WRK()
21795 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21804 if (rN == 15 || isBadRegT(rT) || isBadRegT(rM)) in disInstr_THUMB_WRK()
21808 if (rN == 15 || isBadRegT(rM)) in disInstr_THUMB_WRK()
21834 getIRegT(rN), in disInstr_THUMB_WRK()
21895 vassert(rN != 15); // assured by validity check above in disInstr_THUMB_WRK()
21905 nm, rT, rN, rM, imm2); in disInstr_THUMB_WRK()
21944 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21949 if (rN != 15 && bU == 0) { in disInstr_THUMB_WRK()
21956 if (rN == 15 || rT == 15) in disInstr_THUMB_WRK()
21986 if (rN == 15) { in disInstr_THUMB_WRK()
21990 assign(rNt, getIRegT(rN)); in disInstr_THUMB_WRK()
22056 DIP("%s.w r%u, [r%u, +#%u]\n", nm, rT, rN, imm12); in disInstr_THUMB_WRK()
22073 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22080 if (bW == 1 && (rN == rT || rN == rT2)) valid = False; in disInstr_THUMB_WRK()
22085 if (rN == 15 && (bL == 0/*store*/ in disInstr_THUMB_WRK()
22090 assign(preAddr, 15 == rN in disInstr_THUMB_WRK()
22092 : getIRegT(rN)); in disInstr_THUMB_WRK()
22109 && rN == 13 && rN != rT && rN != rT2 in disInstr_THUMB_WRK()
22112 putIRegT(rN, mkexpr(postAddr), condT); in disInstr_THUMB_WRK()
22145 putIRegT(rN, mkexpr(postAddr), condT); in disInstr_THUMB_WRK()
22152 nm, rT, rT2, rN, bU ? '+' : '-', imm8 << 2); in disInstr_THUMB_WRK()
22156 nm, rT, rT2, rN, bU ? '+' : '-', imm8 << 2); in disInstr_THUMB_WRK()
22161 nm, rT, rT2, rN, bU ? '+' : '-', imm8 << 2); in disInstr_THUMB_WRK()
22254 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22257 if (bH/*ATC*/ || (rN != 13 && !isBadRegT(rM))) { in disInstr_THUMB_WRK()
22266 getIRegT(rN), in disInstr_THUMB_WRK()
22289 bH ? 'h' : 'b', rN, rM, bH ? ", LSL #1" : ""); in disInstr_THUMB_WRK()
22302 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22307 if (!isBadRegT(rD) && !isBadRegT(rN) && msb <= 31) { in disInstr_THUMB_WRK()
22316 assign(src, getIRegT(rN)); in disInstr_THUMB_WRK()
22327 isU ? "ubfx" : "sbfx", rD, rN, lsb, wm1 + 1); in disInstr_THUMB_WRK()
22416 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22419 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
22421 assign(res, binop(Iop_Mul32, getIRegT(rN), getIRegT(rM))); in disInstr_THUMB_WRK()
22423 DIP("mul.w r%u, r%u, r%u\n", rD, rN, rM); in disInstr_THUMB_WRK()
22431 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22434 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
22438 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
22442 DIP("sdiv.w r%u, r%u, r%u\n", rD, rN, rM); in disInstr_THUMB_WRK()
22450 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22453 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
22457 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
22461 DIP("udiv.w r%u, r%u, r%u\n", rD, rN, rM); in disInstr_THUMB_WRK()
22470 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22475 && !isBadRegT(rN) && !isBadRegT(rM) && rDlo != rDhi) { in disInstr_THUMB_WRK()
22478 getIRegT(rN), getIRegT(rM))); in disInstr_THUMB_WRK()
22482 isU ? 'u' : 's', rDlo, rDhi, rN, rM); in disInstr_THUMB_WRK()
22491 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22495 if (!isBadRegT(rD) && !isBadRegT(rN) in disInstr_THUMB_WRK()
22502 binop(Iop_Mul32, getIRegT(rN), getIRegT(rM)))); in disInstr_THUMB_WRK()
22505 isMLA ? "mla" : "mls", rD, rN, rM, rA); in disInstr_THUMB_WRK()
22532 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22536 if (!isBadRegT(rDlo) && !isBadRegT(rDhi) && !isBadRegT(rN) in disInstr_THUMB_WRK()
22547 assign( argR, getIRegT(rN)); in disInstr_THUMB_WRK()
22557 isS ? 's' : 'u', rDlo, rDhi, rN, rM); in disInstr_THUMB_WRK()
22564 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22568 if (!isBadRegT(rDlo) && !isBadRegT(rDhi) && !isBadRegT(rN) in disInstr_THUMB_WRK()
22577 assign( argN, getIRegT(rN) ); in disInstr_THUMB_WRK()
22591 DIP("umaal r%u, r%u, r%u, r%u\n", rDlo, rDhi, rN, rM); in disInstr_THUMB_WRK()
22604 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22605 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
22609 binop(Iop_MullS32, getIRegT(rN), getIRegT(rM)), in disInstr_THUMB_WRK()
22613 bitR ? "r" : "", rD, rN, rM); in disInstr_THUMB_WRK()
22626 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22627 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM) && (rA != 13)) { in disInstr_THUMB_WRK()
22633 binop(Iop_MullS32, getIRegT(rN), getIRegT(rM))), in disInstr_THUMB_WRK()
22637 bitR ? "r" : "", rD, rN, rM, rA); in disInstr_THUMB_WRK()
22663 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22666 if (isBadRegT(rD) || rN == 13 || msb < lsb) { in disInstr_THUMB_WRK()
22677 assign(src, rN == 15 ? mkU32(0) : getIRegT(rN)); in disInstr_THUMB_WRK()
22691 if (rN == 15) { in disInstr_THUMB_WRK()
22696 rD, rN, lsb, msb-lsb+1); in disInstr_THUMB_WRK()
22709 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22713 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
22718 assign(srcL, getIRegT(rN)); in disInstr_THUMB_WRK()
22726 isU ? 'u' : 's', rD, rN, rM, rot); in disInstr_THUMB_WRK()
22738 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22742 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
22747 assign(srcL, getIRegT(rN)); in disInstr_THUMB_WRK()
22755 isU ? 'u' : 's', rD, rN, rM, rot); in disInstr_THUMB_WRK()
22856 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22859 if (!isBadRegT(rN) && (write_nzcvq || write_ge)) { in disInstr_THUMB_WRK()
22861 assign(rNt, getIRegT(rN)); in disInstr_THUMB_WRK()
22864 write_nzcvq ? "f" : "", write_ge ? "g" : "", rN); in disInstr_THUMB_WRK()
22883 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22886 if (!isBadRegT(rT) && rN != 15) { in disInstr_THUMB_WRK()
22894 binop(Iop_Add32, getIRegT(rN), mkU32(imm8 * 4)), in disInstr_THUMB_WRK()
22897 DIP("ldrex r%u, [r%u, #+%u]\n", rT, rN, imm8 * 4); in disInstr_THUMB_WRK()
22905 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22908 if (!isBadRegT(rT) && rN != 15) { in disInstr_THUMB_WRK()
22914 stmt( IRStmt_LLSC(Iend_LE, res, getIRegT(rN), in disInstr_THUMB_WRK()
22918 DIP("ldrex%c r%u, [r%u]\n", isH ? 'h' : 'b', rT, rN); in disInstr_THUMB_WRK()
22925 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22928 if (!isBadRegT(rT) && !isBadRegT(rT2) && rT != rT2 && rN != 15) { in disInstr_THUMB_WRK()
22935 stmt( IRStmt_LLSC(Iend_LE, res, getIRegT(rN), in disInstr_THUMB_WRK()
22940 DIP("ldrexd r%u, r%u, [r%u]\n", rT, rT2, rN); in disInstr_THUMB_WRK()
22947 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22951 if (!isBadRegT(rD) && !isBadRegT(rT) && rN != 15 in disInstr_THUMB_WRK()
22952 && rD != rN && rD != rT) { in disInstr_THUMB_WRK()
22961 binop(Iop_Add32, getIRegT(rN), mkU32(imm8 * 4)), in disInstr_THUMB_WRK()
22969 DIP("strex r%u, r%u, [r%u, #+%u]\n", rD, rT, rN, imm8 * 4); in disInstr_THUMB_WRK()
22977 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
22981 if (!isBadRegT(rD) && !isBadRegT(rT) && rN != 15 in disInstr_THUMB_WRK()
22982 && rD != rN && rD != rT) { in disInstr_THUMB_WRK()
22989 stmt( IRStmt_LLSC(Iend_LE, resSC1, getIRegT(rN), in disInstr_THUMB_WRK()
22998 DIP("strex%c r%u, r%u, [r%u]\n", isH ? 'h' : 'b', rD, rT, rN); in disInstr_THUMB_WRK()
23005 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
23010 && rN != 15 && rD != rN && rD != rT && rD != rT2) { in disInstr_THUMB_WRK()
23021 stmt( IRStmt_LLSC(Iend_LE, resSC1, getIRegT(rN), mkexpr(data))); in disInstr_THUMB_WRK()
23028 DIP("strexd r%u, r%u, r%u, [r%u]\n", rD, rT, rT2, rN); in disInstr_THUMB_WRK()
23076 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
23079 DIP("pld%s [r%u, #%u]\n", bW ? "w" : "", rN, imm12); in disInstr_THUMB_WRK()
23086 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
23089 DIP("pld%s [r%u, #-%u]\n", bW ? "w" : "", rN, imm8); in disInstr_THUMB_WRK()
23096 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
23101 DIP("pld%s [r%u, r%u, lsl %u]\n", bW ? "w" : "", rN, rM, imm2); in disInstr_THUMB_WRK()
23163 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
23166 if (rN == 15 || isBadRegT(rT)) valid = False; in disInstr_THUMB_WRK()
23169 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
23174 DIP("ldrt r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
23186 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
23189 if (rN == 15 || isBadRegT(rT)) valid = False; in disInstr_THUMB_WRK()
23192 IRExpr* address = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
23195 DIP("strt r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
23207 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
23210 if (rN == 15 || isBadRegT(rT)) valid = False; in disInstr_THUMB_WRK()
23213 IRExpr* address = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
23217 DIP("strbt r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
23228 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
23230 if (rN == 15) { in disInstr_THUMB_WRK()
23241 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
23246 DIP("ldrht r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
23257 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
23259 if (rN == 15) { in disInstr_THUMB_WRK()
23270 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
23275 DIP("ldrsht r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
23287 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
23290 if (rN == 15 || isBadRegT(rT)) valid = False; in disInstr_THUMB_WRK()
23293 IRExpr* address = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
23297 DIP("strht r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
23308 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
23312 if (rN == 15 /* insn is LDRB (literal) */) valid = False; in disInstr_THUMB_WRK()
23316 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
23321 DIP("ldrbt r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
23332 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
23336 if (rN == 15 /* insn is LDRSB (literal) */) valid = False; in disInstr_THUMB_WRK()
23340 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
23345 DIP("ldrsbt r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
23356 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
23358 if (rN != 15) { in disInstr_THUMB_WRK()
23359 DIP("pli [r%u, #%u]\n", rN, imm12); in disInstr_THUMB_WRK()
23370 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
23372 if (rN != 15) { in disInstr_THUMB_WRK()
23373 DIP("pli [r%u, #-%u]\n", rN, imm8); in disInstr_THUMB_WRK()