Lines Matching refs:rN

2369 IRExpr* mk_EA_reg_plusminus_imm12 ( UInt rN, UInt bU, UInt imm12,  in mk_EA_reg_plusminus_imm12()  argument
2372 vassert(rN < 16); in mk_EA_reg_plusminus_imm12()
2376 DIS(buf, "[r%u, #%c%u]", rN, opChar, imm12); in mk_EA_reg_plusminus_imm12()
2379 getIRegA(rN), in mk_EA_reg_plusminus_imm12()
2388 IRExpr* mk_EA_reg_plusminus_shifted_reg ( UInt rN, UInt bU, UInt rM, in mk_EA_reg_plusminus_shifted_reg() argument
2392 vassert(rN < 16); in mk_EA_reg_plusminus_shifted_reg()
2403 DIS(buf, "[r%u, %c r%u LSL #%u]", rN, opChar, rM, imm5); in mk_EA_reg_plusminus_shifted_reg()
2413 rN, opChar, rM, imm5 == 0 ? 32 : imm5); in mk_EA_reg_plusminus_shifted_reg()
2425 rN, opChar, rM, imm5 == 0 ? 32 : imm5); in mk_EA_reg_plusminus_shifted_reg()
2436 DIS(buf, "[r%u, %cr%u, RRX]", rN, opChar, rM); in mk_EA_reg_plusminus_shifted_reg()
2444 DIS(buf, "[r%u, %cr%u, ROR #%u]", rN, opChar, rM, imm5); in mk_EA_reg_plusminus_shifted_reg()
2452 getIRegA(rN), index); in mk_EA_reg_plusminus_shifted_reg()
2458 IRExpr* mk_EA_reg_plusminus_imm8 ( UInt rN, UInt bU, UInt imm8, in mk_EA_reg_plusminus_imm8() argument
2461 vassert(rN < 16); in mk_EA_reg_plusminus_imm8()
2465 DIS(buf, "[r%u, #%c%u]", rN, opChar, imm8); in mk_EA_reg_plusminus_imm8()
2468 getIRegA(rN), in mk_EA_reg_plusminus_imm8()
2475 IRExpr* mk_EA_reg_plusminus_reg ( UInt rN, UInt bU, UInt rM, in mk_EA_reg_plusminus_reg() argument
2478 vassert(rN < 16); in mk_EA_reg_plusminus_reg()
2483 DIS(buf, "[r%u, %c r%u]", rN, opChar, rM); in mk_EA_reg_plusminus_reg()
2485 getIRegA(rN), index); in mk_EA_reg_plusminus_reg()
8334 UInt rN = INSN(19,16); in dis_neon_load_or_store() local
8352 assign(initialRn, isT ? getIRegT(rN) : getIRegA(rN)); in dis_neon_load_or_store()
8396 DIP("}, [r%u]", rN); in dis_neon_load_or_store()
8493 DIP("}, [r%u]", rN); in dis_neon_load_or_store()
8507 putIRegT(rN, e, IRTemp_INVALID); in dis_neon_load_or_store()
8509 putIRegA(rN, e, IRTemp_INVALID, Ijk_Boring); in dis_neon_load_or_store()
8515 putIRegT(rN, e, IRTemp_INVALID); in dis_neon_load_or_store()
8517 putIRegA(rN, e, IRTemp_INVALID, Ijk_Boring); in dis_neon_load_or_store()
8781 putIRegT(rN, e, IRTemp_INVALID); in dis_neon_load_or_store()
8783 putIRegA(rN, e, IRTemp_INVALID, Ijk_Boring); in dis_neon_load_or_store()
8800 DIP("}, [r%u]", rN); in dis_neon_load_or_store()
10921 UInt rD = 99, rN = 99, rM = 99, rA = 99; in decode_V6MEDIA_instruction() local
10926 rN = INSNT0(3,0); in decode_V6MEDIA_instruction()
10930 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM) && rA != 13) in decode_V6MEDIA_instruction()
10939 rN = INSNA(3,0); in decode_V6MEDIA_instruction()
10940 if (rD != 15 && rN != 15 && rM != 15 /* but rA can be 15 */) in decode_V6MEDIA_instruction()
10947 IRExpr* rNe = isT ? getIRegT(rN) : getIRegA(rN); in decode_V6MEDIA_instruction()
10961 nCC(conq), rD, rN, rM ); in decode_V6MEDIA_instruction()
10964 nCC(conq), rD, rN, rM, rA ); in decode_V6MEDIA_instruction()
12336 UInt rD = 99, rN = 99, rM = 99, rA = 99; in decode_V6MEDIA_instruction() local
12348 rN = INSNT0(3,0); in decode_V6MEDIA_instruction()
12350 && !isBadRegT(rN) && !isBadRegT(rM) && !isBadRegT(rA)) in decode_V6MEDIA_instruction()
12361 rN = INSNA(3,0); in decode_V6MEDIA_instruction()
12362 if (rD != 15 && rM != 15 && rN != 15) in decode_V6MEDIA_instruction()
12371 assign( irt_rN, isT ? getIRegT(rN) : getIRegA(rN) ); in decode_V6MEDIA_instruction()
12385 round ? "r" : "", nCC(conq), rD, rN, rM, rA); in decode_V6MEDIA_instruction()
12393 UInt rN = 99, rDlo = 99, rDhi = 99, rM = 99; in decode_V6MEDIA_instruction() local
12400 rN = INSNT0(3,0); in decode_V6MEDIA_instruction()
12405 if (!isBadRegT(rDlo) && !isBadRegT(rDhi) && !isBadRegT(rN) in decode_V6MEDIA_instruction()
12412 rN = INSNA(3,0); in decode_V6MEDIA_instruction()
12418 && rN != 15 && rM != 15 && rDlo != rDhi) in decode_V6MEDIA_instruction()
12435 assign( irt_rN, isT ? getIRegT(rN) : getIRegA(rN)); in decode_V6MEDIA_instruction()
12474 m_swap ? 'x' : ' ', nCC(conq), rDlo, rDhi, rN, rM); in decode_V6MEDIA_instruction()
12482 UInt rN = 99, rDlo = 99, rDhi = 99, rM = 99; in decode_V6MEDIA_instruction() local
12489 rN = INSNT0(3,0); in decode_V6MEDIA_instruction()
12494 if (!isBadRegT(rDlo) && !isBadRegT(rDhi) && !isBadRegT(rN) && in decode_V6MEDIA_instruction()
12501 rN = INSNA(3,0); in decode_V6MEDIA_instruction()
12507 rN != 15 && rM != 15 && rDlo != rDhi) in decode_V6MEDIA_instruction()
12523 assign( irt_rN, isT ? getIRegT(rN) : getIRegA(rN) ); in decode_V6MEDIA_instruction()
12562 m_swap ? 'x' : ' ', nCC(conq), rDlo, rDhi, rN, rM); in decode_V6MEDIA_instruction()
12588 UInt rN, /* base reg */ in mk_ldm_stm() argument
12608 assign(oldRnT, arm ? getIRegA(rN) : getIRegT(rN)); in mk_ldm_stm()
12638 putIRegA( rN, e, IRTemp_INVALID, Ijk_Boring ); in mk_ldm_stm()
12640 putIRegT( rN, e, IRTemp_INVALID ); in mk_ldm_stm()
12659 vassert(r != rN); in mk_ldm_stm()
12672 if (bW == 0 && (regList & (1<<rN)) != 0) { in mk_ldm_stm()
12677 vex_printf("\nREG_LIST_PRE: (rN=%d)\n", rN); in mk_ldm_stm()
12685 if (xReg[i] == rN) in mk_ldm_stm()
12728 if (rN == 13 && bL == 1 && bINC && !bBEFORE && bW == 1) { in mk_ldm_stm()
12752 r == rN ? mkexpr(oldRnT) in mk_ldm_stm()
12762 putIRegA( rN, e, IRTemp_INVALID, Ijk_Boring ); in mk_ldm_stm()
12764 putIRegT( rN, e, IRTemp_INVALID ); in mk_ldm_stm()
12856 UInt rN = INSN(19,16); in decode_CP10_CP11_instruction() local
12874 if (rN == 15 && (summary == 2 || summary == 3 || isT)) in decode_CP10_CP11_instruction()
12899 assign(rnT, align4if(isT ? getIRegT(rN) : getIRegA(rN), in decode_CP10_CP11_instruction()
12900 rN == 15)); in decode_CP10_CP11_instruction()
12920 putIRegT(rN, mkexpr(rnTnew), IRTemp_INVALID); in decode_CP10_CP11_instruction()
12922 putIRegA(rN, mkexpr(rnTnew), IRTemp_INVALID, Ijk_Boring); in decode_CP10_CP11_instruction()
12940 putIRegT(rN, mkexpr(rnTnew), IRTemp_INVALID); in decode_CP10_CP11_instruction()
12942 putIRegA(rN, mkexpr(rnTnew), IRTemp_INVALID, Ijk_Boring); in decode_CP10_CP11_instruction()
12948 nm, nCC(conq), rN, dD, dD + nRegs - 1); in decode_CP10_CP11_instruction()
12951 nm, nCC(conq), rN, dD, dD + nRegs - 1); in decode_CP10_CP11_instruction()
12954 nm, nCC(conq), rN, dD, dD + nRegs - 1); in decode_CP10_CP11_instruction()
12993 UInt rN = INSN(19,16); in decode_CP10_CP11_instruction() local
13011 if (rN == 15 && (summary == 2 || summary == 3 || isT)) in decode_CP10_CP11_instruction()
13036 assign(rnT, align4if(isT ? getIRegT(rN) : getIRegA(rN), in decode_CP10_CP11_instruction()
13037 rN == 15)); in decode_CP10_CP11_instruction()
13057 putIRegT(rN, mkexpr(rnTnew), IRTemp_INVALID); in decode_CP10_CP11_instruction()
13059 putIRegA(rN, mkexpr(rnTnew), IRTemp_INVALID, Ijk_Boring); in decode_CP10_CP11_instruction()
13077 putIRegT(rN, mkexpr(rnTnew), IRTemp_INVALID); in decode_CP10_CP11_instruction()
13079 putIRegA(rN, mkexpr(rnTnew), IRTemp_INVALID, Ijk_Boring); in decode_CP10_CP11_instruction()
13085 nm, nCC(conq), rN, dD, dD + nRegs - 1); in decode_CP10_CP11_instruction()
13088 nm, nCC(conq), rN, dD, dD + nRegs - 1); in decode_CP10_CP11_instruction()
13091 nm, nCC(conq), rN, dD, dD + nRegs - 1); in decode_CP10_CP11_instruction()
13152 UInt rN = INSN(19,16); /* hi32 */ in decode_CP10_CP11_instruction() local
13153 if (rD == 15 || rN == 15 || (isT && (rD == 13 || rN == 13))) { in decode_CP10_CP11_instruction()
13159 isT ? getIRegT(rN) : getIRegA(rN), in decode_CP10_CP11_instruction()
13162 DIP("vmov%s d%u, r%u, r%u\n", nCC(conq), dM, rD, rN); in decode_CP10_CP11_instruction()
13172 UInt rN = INSN(19,16); /* hi32 */ in decode_CP10_CP11_instruction() local
13173 if (rD == 15 || rN == 15 || (isT && (rD == 13 || rN == 13)) in decode_CP10_CP11_instruction()
13174 || rD == rN) { in decode_CP10_CP11_instruction()
13182 putIRegT(rN, hi32, condT); in decode_CP10_CP11_instruction()
13185 putIRegA(rN, hi32, condT, Ijk_Boring); in decode_CP10_CP11_instruction()
13188 DIP("vmov%s r%u, r%u, d%u\n", nCC(conq), rD, rN, dM); in decode_CP10_CP11_instruction()
13197 UInt rN = INSN(15,12); in decode_CP10_CP11_instruction() local
13199 if (rM == 15 || rN == 15 || (isT && (rM == 13 || rN == 13)) in decode_CP10_CP11_instruction()
13204 unop(Iop_ReinterpI32asF32, isT ? getIRegT(rN) : getIRegA(rN)), in decode_CP10_CP11_instruction()
13210 nCC(conq), sD, sD + 1, rN, rM); in decode_CP10_CP11_instruction()
13218 UInt rN = INSN(15,12); in decode_CP10_CP11_instruction() local
13220 if (rM == 15 || rN == 15 || (isT && (rM == 13 || rN == 13)) in decode_CP10_CP11_instruction()
13221 || sD == 31 || rN == rM) { in decode_CP10_CP11_instruction()
13227 putIRegT(rN, res0, condT); in decode_CP10_CP11_instruction()
13230 putIRegA(rN, res0, condT, Ijk_Boring); in decode_CP10_CP11_instruction()
13234 nCC(conq), rN, rM, sD, sD + 1); in decode_CP10_CP11_instruction()
13288 UInt rN = (INSN(7,7) << 4) | INSN(19,16); in decode_CP10_CP11_instruction() local
13300 getDRegI64(rN), in decode_CP10_CP11_instruction()
13307 rT, rN, index); in decode_CP10_CP11_instruction()
13314 getDRegI64(rN), in decode_CP10_CP11_instruction()
13321 rT, rN, index); in decode_CP10_CP11_instruction()
13326 IRExpr* e = binop(Iop_GetElem32x2, getDRegI64(rN), mkU8(index)); in decode_CP10_CP11_instruction()
13331 DIP("vmov%s.32 r%u, d%u[%u]\n", nCC(conq), rT, rN, index); in decode_CP10_CP11_instruction()
13429 UInt rN = INSN(19,16); in decode_CP10_CP11_instruction() local
13443 align4if(isT ? getIRegT(rN) : getIRegA(rN), in decode_CP10_CP11_instruction()
13444 rN == 15), in decode_CP10_CP11_instruction()
13452 bL ? "ld" : "st", nCC(conq), dD, rN, in decode_CP10_CP11_instruction()
13785 UInt rN = INSN(19,16); in decode_CP10_CP11_instruction() local
13803 if (rN == 15 && (summary == 2 || summary == 3 || isT)) in decode_CP10_CP11_instruction()
13828 assign(rnT, align4if(isT ? getIRegT(rN) : getIRegA(rN), in decode_CP10_CP11_instruction()
13829 rN == 15)); in decode_CP10_CP11_instruction()
13849 putIRegT(rN, mkexpr(rnTnew), IRTemp_INVALID); in decode_CP10_CP11_instruction()
13851 putIRegA(rN, mkexpr(rnTnew), IRTemp_INVALID, Ijk_Boring); in decode_CP10_CP11_instruction()
13869 putIRegT(rN, mkexpr(rnTnew), IRTemp_INVALID); in decode_CP10_CP11_instruction()
13871 putIRegA(rN, mkexpr(rnTnew), IRTemp_INVALID, Ijk_Boring); in decode_CP10_CP11_instruction()
13877 nm, nCC(conq), rN, fD, fD + nRegs - 1); in decode_CP10_CP11_instruction()
13880 nm, nCC(conq), rN, fD, fD + nRegs - 1); in decode_CP10_CP11_instruction()
13883 nm, nCC(conq), rN, fD, fD + nRegs - 1); in decode_CP10_CP11_instruction()
13934 UInt rN = INSN(19,16); in decode_CP10_CP11_instruction() local
13948 align4if(isT ? getIRegT(rN) : getIRegA(rN), in decode_CP10_CP11_instruction()
13949 rN == 15), in decode_CP10_CP11_instruction()
13957 bL ? "ld" : "st", nCC(conq), fD, rN, in decode_CP10_CP11_instruction()
14452 UInt rN = INSN(19,16); in decode_NV_instruction() local
14456 DIP("pld%c [r%u, #%c%u]\n", bR ? ' ' : 'w', rN, bU ? '+' : '-', imm12); in decode_NV_instruction()
14463 UInt rN = INSN(19,16); in decode_NV_instruction() local
14469 if (rM != 15 && (rN != 15 || bR)) { in decode_NV_instruction()
14470 IRExpr* eaE = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM, in decode_NV_instruction()
14487 UInt rN = INSN(19,16); in decode_NV_instruction() local
14490 DIP("pli [r%u, #%c%u]\n", rN, bU ? '+' : '-', imm12); in decode_NV_instruction()
14757 UInt rN = (insn >> 16) & 0xF; /* 19:16 */ in disInstr_ARM_WRK() local
14796 assign(rNt, getIRegA(rN)); in disInstr_ARM_WRK()
14858 name, nCC(INSN_COND), bitS ? "s" : "", rD, rN, dis_buf ); in disInstr_ARM_WRK()
14867 if (rN != 0) in disInstr_ARM_WRK()
14912 assign(rNt, getIRegA(rN)); in disInstr_ARM_WRK()
14925 nCC(INSN_COND), rN, dis_buf ); in disInstr_ARM_WRK()
14938 assign(rNt, getIRegA(rN)); in disInstr_ARM_WRK()
14956 nCC(INSN_COND), rN, dis_buf ); in disInstr_ARM_WRK()
14970 assign(rNt, getIRegA(rN)); in disInstr_ARM_WRK()
15032 name, nCC(INSN_COND), bitS ? "s" : "", rD, rN, dis_buf ); in disInstr_ARM_WRK()
15089 { UInt rN = (insn >> 16) & 0xF; /* 19:16 */ in disInstr_ARM_WRK() local
15109 if (rN == 15) goto after_load_store_ubyte_or_word; in disInstr_ARM_WRK()
15110 if (bL == 1 && rN == rD) goto after_load_store_ubyte_or_word; in disInstr_ARM_WRK()
15114 if (rN == 15) goto after_load_store_ubyte_or_word; in disInstr_ARM_WRK()
15115 if (rN == rM) goto after_load_store_ubyte_or_word; in disInstr_ARM_WRK()
15116 if (bL == 1 && rN == rD) goto after_load_store_ubyte_or_word; in disInstr_ARM_WRK()
15127 eaE = mk_EA_reg_plusminus_imm12( rN, bU, imm12, dis_buf ); in disInstr_ARM_WRK()
15130 eaE = mk_EA_reg_plusminus_shifted_reg( rN, bU, rM, sh2, imm5, in disInstr_ARM_WRK()
15140 assign(rnT, getIRegA(rN)); in disInstr_ARM_WRK()
15167 putIRegA( rN, mkexpr(eaT), condT, Ijk_Boring ); in disInstr_ARM_WRK()
15192 if (rN == 13 && summary == (3 | 16) && bB == 0) { in disInstr_ARM_WRK()
15223 vassert(rD != rN); /* since we just wrote rD */ in disInstr_ARM_WRK()
15224 putIRegA( rN, mkexpr(eaT), condT, Ijk_Boring ); in disInstr_ARM_WRK()
15317 { UInt rN = (insn >> 16) & 0xF; /* 19:16 */ in disInstr_ARM_WRK() local
15348 if (rN == 15) goto after_load_store_sbyte_or_hword; in disInstr_ARM_WRK()
15349 if (bL == 1 && rN == rD) goto after_load_store_sbyte_or_hword; in disInstr_ARM_WRK()
15353 if (rN == 15) goto after_load_store_sbyte_or_hword; in disInstr_ARM_WRK()
15354 if (rN == rM) goto after_load_store_sbyte_or_hword; in disInstr_ARM_WRK()
15355 if (bL == 1 && rN == rD) goto after_load_store_sbyte_or_hword; in disInstr_ARM_WRK()
15378 eaE = mk_EA_reg_plusminus_imm8( rN, bU, imm8, dis_buf ); in disInstr_ARM_WRK()
15381 eaE = mk_EA_reg_plusminus_reg( rN, bU, rM, dis_buf ); in disInstr_ARM_WRK()
15390 assign(rnT, getIRegA(rN)); in disInstr_ARM_WRK()
15445 vassert(rD != rN); /* since we just wrote rD */ in disInstr_ARM_WRK()
15446 putIRegA( rN, mkexpr(eaT), condT, Ijk_Boring ); in disInstr_ARM_WRK()
15498 UInt rN = (insn >> 16) & 0xF; in disInstr_ARM_WRK() local
15506 if (rN == 15) goto after_load_store_multiple; in disInstr_ARM_WRK()
15513 if (bW == 1 && bL == 1 && ((1 << rN) & regList) > 0) in disInstr_ARM_WRK()
15525 mk_ldm_stm( True/*arm*/, rN, bINC, bBEFORE, bW, bL, regList ); in disInstr_ARM_WRK()
15530 rN, bW ? "!" : "", regList); in disInstr_ARM_WRK()
15736 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
15737 if (rD == 15 || rM == 15 || rN == 15) { in disInstr_ARM_WRK()
15743 assign(argL, getIRegA(rN)); in disInstr_ARM_WRK()
15747 DIP("sdiv r%u, r%u, r%u\n", rD, rN, rM); in disInstr_ARM_WRK()
15758 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
15759 if (rD == 15 || rM == 15 || rN == 15) { in disInstr_ARM_WRK()
15765 assign(argL, getIRegA(rN)); in disInstr_ARM_WRK()
15769 DIP("udiv r%u, r%u, r%u\n", rD, rN, rM); in disInstr_ARM_WRK()
15780 UInt rN = INSN(15,12); in disInstr_ARM_WRK() local
15788 if (rD == 15 || rM == 15 || rS == 15 || rN == 15) { in disInstr_ARM_WRK()
15799 assign( argP, getIRegA(rN)); in disInstr_ARM_WRK()
15821 nCC(INSN_COND), rD, rM, rS, rN); in disInstr_ARM_WRK()
15934 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
15935 if (rDlo == 15 || rDhi == 15 || rN == 15 || rM == 15 || rDhi == rDlo) { in disInstr_ARM_WRK()
15945 assign( argN, getIRegA(rN) ); in disInstr_ARM_WRK()
15961 nCC(INSN_COND), rDlo, rDhi, rN, rM); in disInstr_ARM_WRK()
15993 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
15996 if (rN != 15 && (write_nzcvq || write_ge)) { in disInstr_ARM_WRK()
15998 assign(rNt, getIRegA(rN)); in disInstr_ARM_WRK()
16001 write_nzcvq ? "f" : "", write_ge ? "g" : "", rN); in disInstr_ARM_WRK()
16043 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16052 if (rD == 15 || rN == 15 || rM == 15 || rN == rM || rN == rD) { in disInstr_ARM_WRK()
16061 assign(tRn, getIRegA(rN)); in disInstr_ARM_WRK()
16085 isB ? "b" : "", nCC(INSN_COND), rD, rM, rN); in disInstr_ARM_WRK()
16100 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16113 if (rT == 15 || rN == 15) in disInstr_ARM_WRK()
16117 if ((rT & 1) == 1 || rT == 14 || rN == 15) in disInstr_ARM_WRK()
16130 stmt( IRStmt_LLSC(Iend_LE, res, getIRegA(rN), in disInstr_ARM_WRK()
16139 nm, nCC(INSN_COND), rT+0, rT+1, rN); in disInstr_ARM_WRK()
16144 DIP("ldrex%s%s r%u, [r%u]\n", nm, nCC(INSN_COND), rT, rN); in disInstr_ARM_WRK()
16154 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16168 if (rD == 15 || rN == 15 || rT == 15 in disInstr_ARM_WRK()
16169 || rD == rN || rD == rT) in disInstr_ARM_WRK()
16173 if (rD == 15 || (rT & 1) == 1 || rT == 14 || rN == 15 in disInstr_ARM_WRK()
16174 || rD == rN || rD == rT || rD == rT+1) in disInstr_ARM_WRK()
16195 stmt( IRStmt_LLSC(Iend_LE, resSC1, getIRegA(rN), mkexpr(data)) ); in disInstr_ARM_WRK()
16207 nm, nCC(INSN_COND), rD, rT, rT+1, rN); in disInstr_ARM_WRK()
16210 nm, nCC(INSN_COND), rD, rT, rN); in disInstr_ARM_WRK()
16316 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
16330 assign(src, rN == 15 ? mkU32(0) : getIRegA(rN)); in disInstr_ARM_WRK()
16344 if (rN == 15) { in disInstr_ARM_WRK()
16349 nCC(INSN_COND), rD, rN, lsb, msb-lsb+1); in disInstr_ARM_WRK()
16360 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
16365 if (rD == 15 || rN == 15 || msb >= 32) { in disInstr_ARM_WRK()
16375 assign(src, getIRegA(rN)); in disInstr_ARM_WRK()
16387 nCC(INSN_COND), rD, rN, lsb, wm1 + 1); in disInstr_ARM_WRK()
16442 { UInt rN = (insn >> 16) & 0xF; /* 19:16 */ in disInstr_ARM_WRK() local
16467 if (rN == 15) goto after_load_store_doubleword; in disInstr_ARM_WRK()
16468 if (bS == 0 && (rN == rD || rN == rD+1)) in disInstr_ARM_WRK()
16473 if (rN == 15) goto after_load_store_doubleword; in disInstr_ARM_WRK()
16474 if (rN == rM) goto after_load_store_doubleword; in disInstr_ARM_WRK()
16475 if (bS == 0 && (rN == rD || rN == rD+1)) in disInstr_ARM_WRK()
16498 eaE = mk_EA_reg_plusminus_imm8( rN, bU, imm8, dis_buf ); in disInstr_ARM_WRK()
16501 eaE = mk_EA_reg_plusminus_reg( rN, bU, rM, dis_buf ); in disInstr_ARM_WRK()
16510 assign(rnT, getIRegA(rN)); in disInstr_ARM_WRK()
16532 && rN == 13 && rN != rD && rN != rD+1 in disInstr_ARM_WRK()
16534 putIRegA( rN, mkexpr(eaT), condT, Ijk_Boring ); in disInstr_ARM_WRK()
16571 vassert(rN != 15); /* from checks above */ in disInstr_ARM_WRK()
16573 vassert(rD+0 != rN); /* since we just wrote rD+0 */ in disInstr_ARM_WRK()
16574 vassert(rD+1 != rN); /* since we just wrote rD+1 */ in disInstr_ARM_WRK()
16577 putIRegA( rN, mkexpr(eaT), condT, Ijk_Boring ); in disInstr_ARM_WRK()
16602 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16607 if (rN == 15/*it's {S,U}XTB*/ || rD == 15 || rM == 15) { in disInstr_ARM_WRK()
16614 assign(srcL, getIRegA(rN)); in disInstr_ARM_WRK()
16622 isU ? 'u' : 's', nCC(INSN_COND), rD, rN, rM, rot); in disInstr_ARM_WRK()
16632 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16637 if (rN == 15/*it's {S,U}XTH*/ || rD == 15 || rM == 15) { in disInstr_ARM_WRK()
16644 assign(srcL, getIRegA(rN)); in disInstr_ARM_WRK()
16653 isU ? 'u' : 's', nCC(INSN_COND), rD, rN, rM, rot); in disInstr_ARM_WRK()
16728 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
16729 if (rD != 15 && rM != 15 && rN != 15) { in disInstr_ARM_WRK()
16733 binop(Iop_MullS32, getIRegA(rN), getIRegA(rM)), in disInstr_ARM_WRK()
16737 nCC(INSN_COND), bitR ? "r" : "", rD, rN, rM); in disInstr_ARM_WRK()
16750 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
16751 if (rD != 15 && rM != 15 && rN != 15) { in disInstr_ARM_WRK()
16757 binop(Iop_MullS32, getIRegA(rN), getIRegA(rM))), in disInstr_ARM_WRK()
16761 nCC(INSN_COND), bitR ? "r" : "", rD, rN, rM, rA); in disInstr_ARM_WRK()
16778 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16782 if (rT == 15 || rN == 15 || rN == rT) valid = False; in disInstr_ARM_WRK()
16786 ILGop_Ident32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
16789 getIRegA(rN), mkU32(imm12)); in disInstr_ARM_WRK()
16790 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
16792 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm12); in disInstr_ARM_WRK()
16804 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16810 if (rT == 15 || rN == 15 || rN == rT || rM == 15 in disInstr_ARM_WRK()
16816 ILGop_Ident32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
16819 IRExpr* erN = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM, in disInstr_ARM_WRK()
16821 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
16833 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16837 if (rT == 15 || rN == 15 || rN == rT) valid = False; in disInstr_ARM_WRK()
16841 ILGop_8Uto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
16844 getIRegA(rN), mkU32(imm12)); in disInstr_ARM_WRK()
16845 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
16847 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm12); in disInstr_ARM_WRK()
16859 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16865 if (rT == 15 || rN == 15 || rN == rT || rM == 15 in disInstr_ARM_WRK()
16871 ILGop_8Uto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
16874 IRExpr* erN = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM, in disInstr_ARM_WRK()
16876 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
16889 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16895 if (rT == 15 || rN == 15 || rN == rT) in disInstr_ARM_WRK()
16900 ILGop_16Uto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
16903 getIRegA(rN), mkU32(imm8)); in disInstr_ARM_WRK()
16904 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
16906 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm8); in disInstr_ARM_WRK()
16918 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16922 if (rT == 15 || rN == 15 || rN == rT || rM == 15) in disInstr_ARM_WRK()
16927 ILGop_16Uto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
16930 getIRegA(rN), getIRegA(rM)); in disInstr_ARM_WRK()
16931 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
16933 nCC(INSN_COND), rT, rN, bU ? '+' : '-', rM); in disInstr_ARM_WRK()
16945 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16951 if (rN == 15 || rT == 15 || rN == rT) in disInstr_ARM_WRK()
16956 ILGop_16Sto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
16959 getIRegA(rN), mkU32(imm8)); in disInstr_ARM_WRK()
16960 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
16962 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm8); in disInstr_ARM_WRK()
16974 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16978 if (rN == 15 || rT == 15 || rN == rT || rM == 15) in disInstr_ARM_WRK()
16983 ILGop_16Sto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
16986 getIRegA(rN), getIRegA(rM)); in disInstr_ARM_WRK()
16987 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
16989 nCC(INSN_COND), rT, rN, bU ? '+' : '-', rM); in disInstr_ARM_WRK()
17001 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17007 if (rT == 15 || rN == 15 || rN == rT) in disInstr_ARM_WRK()
17012 ILGop_8Sto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
17015 getIRegA(rN), mkU32(imm8)); in disInstr_ARM_WRK()
17016 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
17018 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm8); in disInstr_ARM_WRK()
17030 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17034 if (rT == 15 || rN == 15 || rN == rT || rM == 15) in disInstr_ARM_WRK()
17039 ILGop_8Sto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
17042 getIRegA(rN), getIRegA(rM)); in disInstr_ARM_WRK()
17043 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
17045 nCC(INSN_COND), rT, rN, bU ? '+' : '-', rM); in disInstr_ARM_WRK()
17056 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17060 if (rT == 15 || rN == 15 || rN == rT) valid = False; in disInstr_ARM_WRK()
17062 IRExpr* address = getIRegA(rN); in disInstr_ARM_WRK()
17066 getIRegA(rN), mkU32(imm12)); in disInstr_ARM_WRK()
17067 putIRegA(rN, newRn, condT, Ijk_Boring); in disInstr_ARM_WRK()
17069 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm12); in disInstr_ARM_WRK()
17081 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17087 if (rT == 15 || rN == 15 || rN == rT || rM == 15) valid = False; in disInstr_ARM_WRK()
17089 IRExpr* address = getIRegA(rN); in disInstr_ARM_WRK()
17093 IRExpr* erN = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM, in disInstr_ARM_WRK()
17095 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
17108 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17114 if (rT == 15 || rN == 15 || rN == rT) valid = False; in disInstr_ARM_WRK()
17116 IRExpr* address = getIRegA(rN); in disInstr_ARM_WRK()
17120 getIRegA(rN), mkU32(imm8)); in disInstr_ARM_WRK()
17121 putIRegA(rN, newRn, condT, Ijk_Boring); in disInstr_ARM_WRK()
17123 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm8); in disInstr_ARM_WRK()
17135 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17139 if (rT == 15 || rN == 15 || rN == rT || rM == 15) valid = False; in disInstr_ARM_WRK()
17141 IRExpr* address = getIRegA(rN); in disInstr_ARM_WRK()
17145 getIRegA(rN), getIRegA(rM)); in disInstr_ARM_WRK()
17146 putIRegA(rN, newRn, condT, Ijk_Boring); in disInstr_ARM_WRK()
17148 nCC(INSN_COND), rT, rN, bU ? '+' : '-', rM); in disInstr_ARM_WRK()
17159 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17163 if (rN == 15 || rN == rT) valid = False; in disInstr_ARM_WRK()
17165 IRExpr* address = getIRegA(rN); in disInstr_ARM_WRK()
17168 getIRegA(rN), mkU32(imm12)); in disInstr_ARM_WRK()
17169 putIRegA(rN, newRn, condT, Ijk_Boring); in disInstr_ARM_WRK()
17171 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm12); in disInstr_ARM_WRK()
17183 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17189 if (rN == 15 || rN == rT || rM == 15) valid = False; in disInstr_ARM_WRK()
17193 storeGuardedLE( getIRegA(rN), getIRegA(rT), condT); in disInstr_ARM_WRK()
17195 IRExpr* erN = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM, in disInstr_ARM_WRK()
17197 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
17877 UInt rN = INSN0(2,0); in disInstr_THUMB_WRK() local
17881 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
17886 DIP("%s r%u, r%u\n", isCMN ? "cmn" : "cmp", rN, rM); in disInstr_THUMB_WRK()
17892 UInt rN = INSN0(2,0); in disInstr_THUMB_WRK() local
17899 assign( res, binop(Iop_And32, getIRegT(rN), getIRegT(rM)) ); in disInstr_THUMB_WRK()
17902 DIP("tst r%u, r%u\n", rN, rM); in disInstr_THUMB_WRK()
18338 UInt rN = (h1 << 3) | INSN0(2,0); in disInstr_THUMB_WRK() local
18342 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
18346 DIP("cmphi r%u, r%u\n", rN, rM); in disInstr_THUMB_WRK()
18414 UInt rN = INSN0(2,0); in disInstr_THUMB_WRK() local
18421 getIRegT(rN), mkU32(0)) ); in disInstr_THUMB_WRK()
18432 DIP("cb%s r%u, 0x%x\n", bOP ? "nz" : "z", rN, dst - 1); in disInstr_THUMB_WRK()
18595 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18600 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
18607 DIP("%s r%u, r%u, #%u\n", isSub ? "subs" : "adds", rD, rN, uimm3); in disInstr_THUMB_WRK()
18616 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18621 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
18628 DIP("%s r%u, r%u, r%u\n", isSub ? "subs" : "adds", rD, rN, rM); in disInstr_THUMB_WRK()
18638 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18642 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), getIRegT(rM)); in disInstr_THUMB_WRK()
18653 DIP("%s r%u, [r%u, r%u]\n", isLD ? "ldr" : "str", rD, rN, rM); in disInstr_THUMB_WRK()
18663 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18667 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), getIRegT(rM)); in disInstr_THUMB_WRK()
18678 DIP("%sh r%u, [r%u, r%u]\n", isLD ? "ldr" : "str", rD, rN, rM); in disInstr_THUMB_WRK()
18686 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18689 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), getIRegT(rM)); in disInstr_THUMB_WRK()
18696 DIP("ldrsh r%u, [r%u, r%u]\n", rD, rN, rM); in disInstr_THUMB_WRK()
18704 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18707 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), getIRegT(rM)); in disInstr_THUMB_WRK()
18714 DIP("ldrsb r%u, [r%u, r%u]\n", rD, rN, rM); in disInstr_THUMB_WRK()
18724 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18728 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), getIRegT(rM)); in disInstr_THUMB_WRK()
18739 DIP("%sb r%u, [r%u, r%u]\n", isLD ? "ldr" : "str", rD, rN, rM); in disInstr_THUMB_WRK()
18758 UInt rN = INSN0(10,8); in disInstr_THUMB_WRK() local
18762 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
18764 putIRegT( rN, binop(isSub ? Iop_Sub32 : Iop_Add32, in disInstr_THUMB_WRK()
18768 DIP("%s r%u, #%u\n", isSub ? "subs" : "adds", rN, uimm8); in disInstr_THUMB_WRK()
18798 UInt rN = INSN0(10,8); in disInstr_THUMB_WRK() local
18802 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
18806 DIP("cmp r%u, #%u\n", rN, uimm8); in disInstr_THUMB_WRK()
18853 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18857 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm5 * 4)); in disInstr_THUMB_WRK()
18868 DIP("%s r%u, [r%u, #%u]\n", isLD ? "ldr" : "str", rD, rN, imm5 * 4); in disInstr_THUMB_WRK()
18878 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18882 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm5 * 2)); in disInstr_THUMB_WRK()
18893 DIP("%sh r%u, [r%u, #%u]\n", isLD ? "ldr" : "str", rD, rN, imm5 * 2); in disInstr_THUMB_WRK()
18903 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18907 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm5)); in disInstr_THUMB_WRK()
18918 DIP("%sb r%u, [r%u, #%u]\n", isLD ? "ldr" : "str", rD, rN, imm5); in disInstr_THUMB_WRK()
18949 UInt rN = INSN0(10,8); in disInstr_THUMB_WRK() local
18960 assign(oldRn, getIRegT(rN)); in disInstr_THUMB_WRK()
18975 if (0 == (list & (1 << rN))) { in disInstr_THUMB_WRK()
18976 putIRegT(rN, in disInstr_THUMB_WRK()
18986 DIP("ldmia r%u!, {0x%04x}\n", rN, list); in disInstr_THUMB_WRK()
18995 UInt rN = INSN0(10,8); in disInstr_THUMB_WRK() local
19000 if (valid && 0 != (list & (1 << rN))) { in disInstr_THUMB_WRK()
19001 for (i = 0; i < rN; i++) { in disInstr_THUMB_WRK()
19014 assign(oldRn, getIRegT(rN)); in disInstr_THUMB_WRK()
19024 putIRegT(rN, in disInstr_THUMB_WRK()
19032 DIP("stmia r%u!, {0x%04x}\n", rN, list); in disInstr_THUMB_WRK()
19256 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19278 if (rN == 15) valid = False; in disInstr_THUMB_WRK()
19281 if (bW == 1 && (regList & (1<<rN))) valid = False; in disInstr_THUMB_WRK()
19285 if (rN == 15) valid = False; in disInstr_THUMB_WRK()
19287 if (bW == 1 && (regList & (1<<rN))) valid = False; in disInstr_THUMB_WRK()
19303 mk_ldm_stm(False/*!arm*/, rN, bINC, bBEFORE, bW, bL, regList); in disInstr_THUMB_WRK()
19315 rN, bW ? "!" : "", regList); in disInstr_THUMB_WRK()
19326 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19328 Bool valid = !isBadRegT(rN) && !isBadRegT(rD); in disInstr_THUMB_WRK()
19330 if (!valid && rD <= 14 && rN == 13) in disInstr_THUMB_WRK()
19337 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19344 bS == 1 ? "s" : "", rD, rN, imm32); in disInstr_THUMB_WRK()
19353 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19355 Bool valid = !isBadRegT(rN) && !isBadRegT(rD); in disInstr_THUMB_WRK()
19357 if (!valid && rD <= 14 && rN == 13) in disInstr_THUMB_WRK()
19364 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19368 DIP("addw r%u, r%u, #%u\n", rD, rN, imm12); in disInstr_THUMB_WRK()
19380 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19381 if (rN != 15) { in disInstr_THUMB_WRK()
19386 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19390 DIP("%s.w r%u, #%u\n", isCMN ? "cmn" : "cmp", rN, imm32); in disInstr_THUMB_WRK()
19402 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19403 if (!isBadRegT(rN)) { // yes, really, it's inconsistent with CMP.W in disInstr_THUMB_WRK()
19412 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19421 DIP("%s.w r%u, #%u\n", isTST ? "tst" : "teq", rN, imm32); in disInstr_THUMB_WRK()
19434 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19436 Bool valid = !isBadRegT(rN) && !isBadRegT(rD); in disInstr_THUMB_WRK()
19439 if (!valid && !isRSB && rN == 13 && rD != 15) in disInstr_THUMB_WRK()
19446 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19459 isRSB ? "rsb" : "sub", bS == 1 ? "s" : "", rD, rN, imm32); in disInstr_THUMB_WRK()
19468 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19470 Bool valid = !isBadRegT(rN) && !isBadRegT(rD); in disInstr_THUMB_WRK()
19472 if (!valid && rD == 13 && rN == 13) in disInstr_THUMB_WRK()
19479 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19483 DIP("subw r%u, r%u, #%u\n", rD, rN, imm12); in disInstr_THUMB_WRK()
19497 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19499 if (!isBadRegT(rN) && !isBadRegT(rD)) { in disInstr_THUMB_WRK()
19505 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19536 nm, bS == 1 ? "s" : "", rD, rN, imm32); in disInstr_THUMB_WRK()
19553 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19555 if (!isBadRegT(rN) && !isBadRegT(rD)) { in disInstr_THUMB_WRK()
19574 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19589 nm, bS == 1 ? "s" : "", rD, rN, imm32); in disInstr_THUMB_WRK()
19602 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19609 Bool valid = !isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM); in disInstr_THUMB_WRK()
19613 && rD != 15 && rN == 13 && imm5 <= 3 && how == 0) { in disInstr_THUMB_WRK()
19619 && rD != 15 && rN == 13 && imm5 == 0 && how == 0) { in disInstr_THUMB_WRK()
19635 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19668 nm, bS ? "s" : "", rD, rN, dis_buf); in disInstr_THUMB_WRK()
19681 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19684 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
19690 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19733 nm, bS ? "s" : "", rD, rN, dis_buf); in disInstr_THUMB_WRK()
19750 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19753 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
19772 assign(rNt, getIRegT(rN)); in disInstr_THUMB_WRK()
19802 nm, bS ? "s" : "", rD, rN, dis_buf); in disInstr_THUMB_WRK()
19815 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19819 Bool valid = !isBadRegT(rN) && !isBadRegT(rM) && !isBadRegT(rD); in disInstr_THUMB_WRK()
19828 assign(rNt, getIRegT(rN)); in disInstr_THUMB_WRK()
19832 rNt, how, rMt, rN, rM in disInstr_THUMB_WRK()
19842 nm, bS ? "s" : "", rD, rN, rM); in disInstr_THUMB_WRK()
19852 UInt rN = INSN1(3,0); in disInstr_THUMB_WRK() local
19853 if (!isBadRegT(rD) && !isBadRegT(rN)) { in disInstr_THUMB_WRK()
19860 assign(rNt, getIRegT(rN)); in disInstr_THUMB_WRK()
19865 dis_buf, &oldRn, bS ? &oldC : NULL, rNt, how, imm5, rN in disInstr_THUMB_WRK()
19891 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19893 if (!isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
19900 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19920 DIP("%s.w r%u, %s\n", isTST ? "tst" : "teq", rN, dis_buf); in disInstr_THUMB_WRK()
19932 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19934 if (!isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
19940 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19953 DIP("%s.w r%u, %s\n", isCMN ? "cmn" : "cmp", rN, dis_buf); in disInstr_THUMB_WRK()
20060 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20073 if (rN == 15) in disInstr_THUMB_WRK()
20075 if (bW == 1 && rN == rT) in disInstr_THUMB_WRK()
20102 assign(preAddr, getIRegT(rN)); in disInstr_THUMB_WRK()
20128 vassert(rN != rT); // assured by validity check above in disInstr_THUMB_WRK()
20129 putIRegT(rN, mkexpr(postAddr), condT); in disInstr_THUMB_WRK()
20183 vassert(rN != rT); // assured by validity check above in disInstr_THUMB_WRK()
20184 putIRegT(rN, mkexpr(postAddr), condT); in disInstr_THUMB_WRK()
20189 vassert(rN != 15); // assured by validity check above in disInstr_THUMB_WRK()
20200 nm, rT, rN, bU ? '+' : '-', imm8); in disInstr_THUMB_WRK()
20204 nm, rT, rN, bU ? '+' : '-', imm8); in disInstr_THUMB_WRK()
20209 nm, rT, rN, bU ? '+' : '-', imm8); in disInstr_THUMB_WRK()
20252 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20261 if (rN == 15 || isBadRegT(rT) || isBadRegT(rM)) in disInstr_THUMB_WRK()
20265 if (rN == 15 || isBadRegT(rM)) in disInstr_THUMB_WRK()
20291 getIRegT(rN), in disInstr_THUMB_WRK()
20352 vassert(rN != 15); // assured by validity check above in disInstr_THUMB_WRK()
20362 nm, rT, rN, rM, imm2); in disInstr_THUMB_WRK()
20401 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20406 if (rN != 15 && bU == 0) { in disInstr_THUMB_WRK()
20413 if (rN == 15 || rT == 15) in disInstr_THUMB_WRK()
20443 if (rN == 15) { in disInstr_THUMB_WRK()
20447 assign(rNt, getIRegT(rN)); in disInstr_THUMB_WRK()
20513 DIP("%s.w r%u, [r%u, +#%u]\n", nm, rT, rN, imm12); in disInstr_THUMB_WRK()
20530 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20537 if (bW == 1 && (rN == rT || rN == rT2)) valid = False; in disInstr_THUMB_WRK()
20542 if (rN == 15 && (bL == 0/*store*/ in disInstr_THUMB_WRK()
20547 assign(preAddr, 15 == rN in disInstr_THUMB_WRK()
20549 : getIRegT(rN)); in disInstr_THUMB_WRK()
20565 && rN == 13 && rN != rT && rN != rT2 in disInstr_THUMB_WRK()
20567 putIRegT(rN, mkexpr(postAddr), condT); in disInstr_THUMB_WRK()
20600 putIRegT(rN, mkexpr(postAddr), condT); in disInstr_THUMB_WRK()
20607 nm, rT, rT2, rN, bU ? '+' : '-', imm8 << 2); in disInstr_THUMB_WRK()
20611 nm, rT, rT2, rN, bU ? '+' : '-', imm8 << 2); in disInstr_THUMB_WRK()
20616 nm, rT, rT2, rN, bU ? '+' : '-', imm8 << 2); in disInstr_THUMB_WRK()
20705 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20708 if (bH/*ATC*/ || (rN != 13 && !isBadRegT(rM))) { in disInstr_THUMB_WRK()
20717 getIRegT(rN), in disInstr_THUMB_WRK()
20740 bH ? 'h' : 'b', rN, rM, bH ? ", LSL #1" : ""); in disInstr_THUMB_WRK()
20753 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20758 if (!isBadRegT(rD) && !isBadRegT(rN) && msb <= 31) { in disInstr_THUMB_WRK()
20767 assign(src, getIRegT(rN)); in disInstr_THUMB_WRK()
20778 isU ? "ubfx" : "sbfx", rD, rN, lsb, wm1 + 1); in disInstr_THUMB_WRK()
20867 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20870 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
20872 assign(res, binop(Iop_Mul32, getIRegT(rN), getIRegT(rM))); in disInstr_THUMB_WRK()
20874 DIP("mul.w r%u, r%u, r%u\n", rD, rN, rM); in disInstr_THUMB_WRK()
20882 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20885 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
20889 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
20893 DIP("sdiv.w r%u, r%u, r%u\n", rD, rN, rM); in disInstr_THUMB_WRK()
20901 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20904 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
20908 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
20912 DIP("udiv.w r%u, r%u, r%u\n", rD, rN, rM); in disInstr_THUMB_WRK()
20921 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20926 && !isBadRegT(rN) && !isBadRegT(rM) && rDlo != rDhi) { in disInstr_THUMB_WRK()
20929 getIRegT(rN), getIRegT(rM))); in disInstr_THUMB_WRK()
20933 isU ? 'u' : 's', rDlo, rDhi, rN, rM); in disInstr_THUMB_WRK()
20942 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20946 if (!isBadRegT(rD) && !isBadRegT(rN) in disInstr_THUMB_WRK()
20953 binop(Iop_Mul32, getIRegT(rN), getIRegT(rM)))); in disInstr_THUMB_WRK()
20956 isMLA ? "mla" : "mls", rD, rN, rM, rA); in disInstr_THUMB_WRK()
20983 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20987 if (!isBadRegT(rDlo) && !isBadRegT(rDhi) && !isBadRegT(rN) in disInstr_THUMB_WRK()
20998 assign( argR, getIRegT(rN)); in disInstr_THUMB_WRK()
21008 isS ? 's' : 'u', rDlo, rDhi, rN, rM); in disInstr_THUMB_WRK()
21015 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21019 if (!isBadRegT(rDlo) && !isBadRegT(rDhi) && !isBadRegT(rN) in disInstr_THUMB_WRK()
21028 assign( argN, getIRegT(rN) ); in disInstr_THUMB_WRK()
21042 DIP("umaal r%u, r%u, r%u, r%u\n", rDlo, rDhi, rN, rM); in disInstr_THUMB_WRK()
21055 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21056 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
21060 binop(Iop_MullS32, getIRegT(rN), getIRegT(rM)), in disInstr_THUMB_WRK()
21064 bitR ? "r" : "", rD, rN, rM); in disInstr_THUMB_WRK()
21077 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21078 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM) && (rA != 13)) { in disInstr_THUMB_WRK()
21084 binop(Iop_MullS32, getIRegT(rN), getIRegT(rM))), in disInstr_THUMB_WRK()
21088 bitR ? "r" : "", rD, rN, rM, rA); in disInstr_THUMB_WRK()
21114 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21117 if (isBadRegT(rD) || rN == 13 || msb < lsb) { in disInstr_THUMB_WRK()
21128 assign(src, rN == 15 ? mkU32(0) : getIRegT(rN)); in disInstr_THUMB_WRK()
21142 if (rN == 15) { in disInstr_THUMB_WRK()
21147 rD, rN, lsb, msb-lsb+1); in disInstr_THUMB_WRK()
21160 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21164 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
21169 assign(srcL, getIRegT(rN)); in disInstr_THUMB_WRK()
21177 isU ? 'u' : 's', rD, rN, rM, rot); in disInstr_THUMB_WRK()
21189 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21193 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
21198 assign(srcL, getIRegT(rN)); in disInstr_THUMB_WRK()
21206 isU ? 'u' : 's', rD, rN, rM, rot); in disInstr_THUMB_WRK()
21307 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21310 if (!isBadRegT(rN) && (write_nzcvq || write_ge)) { in disInstr_THUMB_WRK()
21312 assign(rNt, getIRegT(rN)); in disInstr_THUMB_WRK()
21315 write_nzcvq ? "f" : "", write_ge ? "g" : "", rN); in disInstr_THUMB_WRK()
21334 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21337 if (!isBadRegT(rT) && rN != 15) { in disInstr_THUMB_WRK()
21345 binop(Iop_Add32, getIRegT(rN), mkU32(imm8 * 4)), in disInstr_THUMB_WRK()
21348 DIP("ldrex r%u, [r%u, #+%u]\n", rT, rN, imm8 * 4); in disInstr_THUMB_WRK()
21356 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21359 if (!isBadRegT(rT) && rN != 15) { in disInstr_THUMB_WRK()
21365 stmt( IRStmt_LLSC(Iend_LE, res, getIRegT(rN), in disInstr_THUMB_WRK()
21369 DIP("ldrex%c r%u, [r%u]\n", isH ? 'h' : 'b', rT, rN); in disInstr_THUMB_WRK()
21376 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21379 if (!isBadRegT(rT) && !isBadRegT(rT2) && rT != rT2 && rN != 15) { in disInstr_THUMB_WRK()
21386 stmt( IRStmt_LLSC(Iend_LE, res, getIRegT(rN), in disInstr_THUMB_WRK()
21391 DIP("ldrexd r%u, r%u, [r%u]\n", rT, rT2, rN); in disInstr_THUMB_WRK()
21398 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21402 if (!isBadRegT(rD) && !isBadRegT(rT) && rN != 15 in disInstr_THUMB_WRK()
21403 && rD != rN && rD != rT) { in disInstr_THUMB_WRK()
21412 binop(Iop_Add32, getIRegT(rN), mkU32(imm8 * 4)), in disInstr_THUMB_WRK()
21420 DIP("strex r%u, r%u, [r%u, #+%u]\n", rD, rT, rN, imm8 * 4); in disInstr_THUMB_WRK()
21428 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21432 if (!isBadRegT(rD) && !isBadRegT(rT) && rN != 15 in disInstr_THUMB_WRK()
21433 && rD != rN && rD != rT) { in disInstr_THUMB_WRK()
21440 stmt( IRStmt_LLSC(Iend_LE, resSC1, getIRegT(rN), in disInstr_THUMB_WRK()
21449 DIP("strex%c r%u, r%u, [r%u]\n", isH ? 'h' : 'b', rD, rT, rN); in disInstr_THUMB_WRK()
21456 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21461 && rN != 15 && rD != rN && rD != rT && rD != rT) { in disInstr_THUMB_WRK()
21472 stmt( IRStmt_LLSC(Iend_LE, resSC1, getIRegT(rN), mkexpr(data))); in disInstr_THUMB_WRK()
21479 DIP("strexd r%u, r%u, r%u, [r%u]\n", rD, rT, rT2, rN); in disInstr_THUMB_WRK()
21527 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21530 DIP("pld%s [r%u, #%u]\n", bW ? "w" : "", rN, imm12); in disInstr_THUMB_WRK()
21537 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21540 DIP("pld%s [r%u, #-%u]\n", bW ? "w" : "", rN, imm8); in disInstr_THUMB_WRK()
21547 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21552 DIP("pld%s [r%u, r%u, lsl %d]\n", bW ? "w" : "", rN, rM, imm2); in disInstr_THUMB_WRK()
21600 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21603 if (rN == 15 || isBadRegT(rT)) valid = False; in disInstr_THUMB_WRK()
21606 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
21611 DIP("ldrt r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
21623 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21626 if (rN == 15 || isBadRegT(rT)) valid = False; in disInstr_THUMB_WRK()
21629 IRExpr* address = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
21632 DIP("strt r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
21644 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21647 if (rN == 15 || isBadRegT(rT)) valid = False; in disInstr_THUMB_WRK()
21650 IRExpr* address = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
21654 DIP("strbt r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
21665 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21667 if (rN == 15) { in disInstr_THUMB_WRK()
21678 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
21683 DIP("ldrht r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
21694 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21696 if (rN == 15) { in disInstr_THUMB_WRK()
21707 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
21712 DIP("ldrsht r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
21724 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21727 if (rN == 15 || isBadRegT(rT)) valid = False; in disInstr_THUMB_WRK()
21730 IRExpr* address = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
21734 DIP("strht r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
21745 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21749 if (rN == 15 /* insn is LDRB (literal) */) valid = False; in disInstr_THUMB_WRK()
21753 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
21758 DIP("ldrbt r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
21769 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21773 if (rN == 15 /* insn is LDRSB (literal) */) valid = False; in disInstr_THUMB_WRK()
21777 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
21782 DIP("ldrsbt r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
21793 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21795 if (rN != 15) { in disInstr_THUMB_WRK()
21796 DIP("pli [r%u, #%u]\n", rN, imm12); in disInstr_THUMB_WRK()
21807 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21809 if (rN != 15) { in disInstr_THUMB_WRK()
21810 DIP("pli [r%u, #-%u]\n", rN, imm8); in disInstr_THUMB_WRK()