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=%u)\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()
14471 UInt rN = INSN(19,16); in decode_NV_instruction() local
14475 DIP("pld%c [r%u, #%c%u]\n", bR ? ' ' : 'w', rN, bU ? '+' : '-', imm12); in decode_NV_instruction()
14482 UInt rN = INSN(19,16); in decode_NV_instruction() local
14488 if (rM != 15 && (rN != 15 || bR)) { in decode_NV_instruction()
14489 IRExpr* eaE = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM, in decode_NV_instruction()
14506 UInt rN = INSN(19,16); in decode_NV_instruction() local
14509 DIP("pli [r%u, #%c%u]\n", rN, bU ? '+' : '-', imm12); in decode_NV_instruction()
14776 UInt rN = (insn >> 16) & 0xF; /* 19:16 */ in disInstr_ARM_WRK() local
14815 assign(rNt, getIRegA(rN)); in disInstr_ARM_WRK()
14877 name, nCC(INSN_COND), bitS ? "s" : "", rD, rN, dis_buf ); in disInstr_ARM_WRK()
14886 if (rN != 0) in disInstr_ARM_WRK()
14931 assign(rNt, getIRegA(rN)); in disInstr_ARM_WRK()
14944 nCC(INSN_COND), rN, dis_buf ); in disInstr_ARM_WRK()
14957 assign(rNt, getIRegA(rN)); in disInstr_ARM_WRK()
14975 nCC(INSN_COND), rN, dis_buf ); in disInstr_ARM_WRK()
14989 assign(rNt, getIRegA(rN)); in disInstr_ARM_WRK()
15051 name, nCC(INSN_COND), bitS ? "s" : "", rD, rN, dis_buf ); in disInstr_ARM_WRK()
15108 { UInt rN = (insn >> 16) & 0xF; /* 19:16 */ in disInstr_ARM_WRK() local
15128 if (rN == 15) goto after_load_store_ubyte_or_word; in disInstr_ARM_WRK()
15129 if (bL == 1 && rN == rD) goto after_load_store_ubyte_or_word; in disInstr_ARM_WRK()
15133 if (rN == 15) goto after_load_store_ubyte_or_word; in disInstr_ARM_WRK()
15134 if (rN == rM) goto after_load_store_ubyte_or_word; in disInstr_ARM_WRK()
15135 if (bL == 1 && rN == rD) goto after_load_store_ubyte_or_word; in disInstr_ARM_WRK()
15146 eaE = mk_EA_reg_plusminus_imm12( rN, bU, imm12, dis_buf ); in disInstr_ARM_WRK()
15149 eaE = mk_EA_reg_plusminus_shifted_reg( rN, bU, rM, sh2, imm5, in disInstr_ARM_WRK()
15159 assign(rnT, getIRegA(rN)); in disInstr_ARM_WRK()
15186 putIRegA( rN, mkexpr(eaT), condT, Ijk_Boring ); in disInstr_ARM_WRK()
15211 if (rN == 13 && summary == (3 | 16) && bB == 0) { in disInstr_ARM_WRK()
15242 vassert(rD != rN); /* since we just wrote rD */ in disInstr_ARM_WRK()
15243 putIRegA( rN, mkexpr(eaT), condT, Ijk_Boring ); in disInstr_ARM_WRK()
15336 { UInt rN = (insn >> 16) & 0xF; /* 19:16 */ in disInstr_ARM_WRK() local
15367 if (rN == 15) goto after_load_store_sbyte_or_hword; in disInstr_ARM_WRK()
15368 if (bL == 1 && rN == rD) goto after_load_store_sbyte_or_hword; in disInstr_ARM_WRK()
15372 if (rN == 15) goto after_load_store_sbyte_or_hword; in disInstr_ARM_WRK()
15373 if (rN == rM) goto after_load_store_sbyte_or_hword; in disInstr_ARM_WRK()
15374 if (bL == 1 && rN == rD) goto after_load_store_sbyte_or_hword; in disInstr_ARM_WRK()
15397 eaE = mk_EA_reg_plusminus_imm8( rN, bU, imm8, dis_buf ); in disInstr_ARM_WRK()
15400 eaE = mk_EA_reg_plusminus_reg( rN, bU, rM, dis_buf ); in disInstr_ARM_WRK()
15409 assign(rnT, getIRegA(rN)); in disInstr_ARM_WRK()
15464 vassert(rD != rN); /* since we just wrote rD */ in disInstr_ARM_WRK()
15465 putIRegA( rN, mkexpr(eaT), condT, Ijk_Boring ); in disInstr_ARM_WRK()
15517 UInt rN = (insn >> 16) & 0xF; in disInstr_ARM_WRK() local
15525 if (rN == 15) goto after_load_store_multiple; in disInstr_ARM_WRK()
15532 if (bW == 1 && bL == 1 && ((1 << rN) & regList) > 0) in disInstr_ARM_WRK()
15544 mk_ldm_stm( True/*arm*/, rN, bINC, bBEFORE, bW, bL, regList ); in disInstr_ARM_WRK()
15549 rN, bW ? "!" : "", regList); in disInstr_ARM_WRK()
15755 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
15756 if (rD == 15 || rM == 15 || rN == 15) { in disInstr_ARM_WRK()
15762 assign(argL, getIRegA(rN)); in disInstr_ARM_WRK()
15766 DIP("sdiv r%u, r%u, r%u\n", rD, rN, rM); in disInstr_ARM_WRK()
15777 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
15778 if (rD == 15 || rM == 15 || rN == 15) { in disInstr_ARM_WRK()
15784 assign(argL, getIRegA(rN)); in disInstr_ARM_WRK()
15788 DIP("udiv r%u, r%u, r%u\n", rD, rN, rM); in disInstr_ARM_WRK()
15799 UInt rN = INSN(15,12); in disInstr_ARM_WRK() local
15807 if (rD == 15 || rM == 15 || rS == 15 || rN == 15) { in disInstr_ARM_WRK()
15818 assign( argP, getIRegA(rN)); in disInstr_ARM_WRK()
15840 nCC(INSN_COND), rD, rM, rS, rN); in disInstr_ARM_WRK()
15953 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
15954 if (rDlo == 15 || rDhi == 15 || rN == 15 || rM == 15 || rDhi == rDlo) { in disInstr_ARM_WRK()
15964 assign( argN, getIRegA(rN) ); in disInstr_ARM_WRK()
15980 nCC(INSN_COND), rDlo, rDhi, rN, rM); in disInstr_ARM_WRK()
16012 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
16015 if (rN != 15 && (write_nzcvq || write_ge)) { in disInstr_ARM_WRK()
16017 assign(rNt, getIRegA(rN)); in disInstr_ARM_WRK()
16020 write_nzcvq ? "f" : "", write_ge ? "g" : "", rN); in disInstr_ARM_WRK()
16062 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16071 if (rD == 15 || rN == 15 || rM == 15 || rN == rM || rN == rD) { in disInstr_ARM_WRK()
16080 assign(tRn, getIRegA(rN)); in disInstr_ARM_WRK()
16104 isB ? "b" : "", nCC(INSN_COND), rD, rM, rN); in disInstr_ARM_WRK()
16119 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16132 if (rT == 15 || rN == 15) in disInstr_ARM_WRK()
16136 if ((rT & 1) == 1 || rT == 14 || rN == 15) in disInstr_ARM_WRK()
16149 stmt( IRStmt_LLSC(Iend_LE, res, getIRegA(rN), in disInstr_ARM_WRK()
16158 nm, nCC(INSN_COND), rT+0, rT+1, rN); in disInstr_ARM_WRK()
16163 DIP("ldrex%s%s r%u, [r%u]\n", nm, nCC(INSN_COND), rT, rN); in disInstr_ARM_WRK()
16173 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16187 if (rD == 15 || rN == 15 || rT == 15 in disInstr_ARM_WRK()
16188 || rD == rN || rD == rT) in disInstr_ARM_WRK()
16192 if (rD == 15 || (rT & 1) == 1 || rT == 14 || rN == 15 in disInstr_ARM_WRK()
16193 || rD == rN || rD == rT || rD == rT+1) in disInstr_ARM_WRK()
16214 stmt( IRStmt_LLSC(Iend_LE, resSC1, getIRegA(rN), mkexpr(data)) ); in disInstr_ARM_WRK()
16226 nm, nCC(INSN_COND), rD, rT, rT+1, rN); in disInstr_ARM_WRK()
16229 nm, nCC(INSN_COND), rD, rT, rN); in disInstr_ARM_WRK()
16335 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
16349 assign(src, rN == 15 ? mkU32(0) : getIRegA(rN)); in disInstr_ARM_WRK()
16363 if (rN == 15) { in disInstr_ARM_WRK()
16368 nCC(INSN_COND), rD, rN, lsb, msb-lsb+1); in disInstr_ARM_WRK()
16379 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
16384 if (rD == 15 || rN == 15 || msb >= 32) { in disInstr_ARM_WRK()
16394 assign(src, getIRegA(rN)); in disInstr_ARM_WRK()
16406 nCC(INSN_COND), rD, rN, lsb, wm1 + 1); in disInstr_ARM_WRK()
16461 { UInt rN = (insn >> 16) & 0xF; /* 19:16 */ in disInstr_ARM_WRK() local
16486 if (rN == 15) goto after_load_store_doubleword; in disInstr_ARM_WRK()
16487 if (bS == 0 && (rN == rD || rN == rD+1)) in disInstr_ARM_WRK()
16492 if (rN == 15) goto after_load_store_doubleword; in disInstr_ARM_WRK()
16493 if (rN == rM) goto after_load_store_doubleword; in disInstr_ARM_WRK()
16494 if (bS == 0 && (rN == rD || rN == rD+1)) in disInstr_ARM_WRK()
16517 eaE = mk_EA_reg_plusminus_imm8( rN, bU, imm8, dis_buf ); in disInstr_ARM_WRK()
16520 eaE = mk_EA_reg_plusminus_reg( rN, bU, rM, dis_buf ); in disInstr_ARM_WRK()
16529 assign(rnT, getIRegA(rN)); in disInstr_ARM_WRK()
16551 && rN == 13 && rN != rD && rN != rD+1 in disInstr_ARM_WRK()
16553 putIRegA( rN, mkexpr(eaT), condT, Ijk_Boring ); in disInstr_ARM_WRK()
16590 vassert(rN != 15); /* from checks above */ in disInstr_ARM_WRK()
16592 vassert(rD+0 != rN); /* since we just wrote rD+0 */ in disInstr_ARM_WRK()
16593 vassert(rD+1 != rN); /* since we just wrote rD+1 */ in disInstr_ARM_WRK()
16596 putIRegA( rN, mkexpr(eaT), condT, Ijk_Boring ); in disInstr_ARM_WRK()
16621 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16626 if (rN == 15/*it's {S,U}XTB*/ || rD == 15 || rM == 15) { in disInstr_ARM_WRK()
16633 assign(srcL, getIRegA(rN)); in disInstr_ARM_WRK()
16641 isU ? 'u' : 's', nCC(INSN_COND), rD, rN, rM, rot); in disInstr_ARM_WRK()
16651 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16656 if (rN == 15/*it's {S,U}XTH*/ || rD == 15 || rM == 15) { in disInstr_ARM_WRK()
16663 assign(srcL, getIRegA(rN)); in disInstr_ARM_WRK()
16672 isU ? 'u' : 's', nCC(INSN_COND), rD, rN, rM, rot); in disInstr_ARM_WRK()
16747 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
16748 if (rD != 15 && rM != 15 && rN != 15) { in disInstr_ARM_WRK()
16752 binop(Iop_MullS32, getIRegA(rN), getIRegA(rM)), in disInstr_ARM_WRK()
16756 nCC(INSN_COND), bitR ? "r" : "", rD, rN, rM); in disInstr_ARM_WRK()
16769 UInt rN = INSN(3,0); in disInstr_ARM_WRK() local
16770 if (rD != 15 && rM != 15 && rN != 15) { in disInstr_ARM_WRK()
16776 binop(Iop_MullS32, getIRegA(rN), getIRegA(rM))), in disInstr_ARM_WRK()
16780 nCC(INSN_COND), bitR ? "r" : "", rD, rN, rM, rA); in disInstr_ARM_WRK()
16791 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16795 if (rT == 15 || rN == 15 || rN == rT) valid = False; in disInstr_ARM_WRK()
16799 ILGop_Ident32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
16802 getIRegA(rN), mkU32(imm12)); in disInstr_ARM_WRK()
16803 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
16805 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm12); in disInstr_ARM_WRK()
16817 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16823 if (rT == 15 || rN == 15 || rN == rT || rM == 15 in disInstr_ARM_WRK()
16829 ILGop_Ident32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
16832 IRExpr* erN = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM, in disInstr_ARM_WRK()
16834 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
16846 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16850 if (rT == 15 || rN == 15 || rN == rT) valid = False; in disInstr_ARM_WRK()
16854 ILGop_8Uto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
16857 getIRegA(rN), mkU32(imm12)); in disInstr_ARM_WRK()
16858 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
16860 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm12); in disInstr_ARM_WRK()
16872 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16878 if (rT == 15 || rN == 15 || rN == rT || rM == 15 in disInstr_ARM_WRK()
16884 ILGop_8Uto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
16887 IRExpr* erN = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM, in disInstr_ARM_WRK()
16889 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
16902 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16908 if (rT == 15 || rN == 15 || rN == rT) in disInstr_ARM_WRK()
16913 ILGop_16Uto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
16916 getIRegA(rN), mkU32(imm8)); in disInstr_ARM_WRK()
16917 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
16919 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm8); in disInstr_ARM_WRK()
16931 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16935 if (rT == 15 || rN == 15 || rN == rT || rM == 15) in disInstr_ARM_WRK()
16940 ILGop_16Uto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
16943 getIRegA(rN), getIRegA(rM)); in disInstr_ARM_WRK()
16944 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
16946 nCC(INSN_COND), rT, rN, bU ? '+' : '-', rM); in disInstr_ARM_WRK()
16958 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16964 if (rN == 15 || rT == 15 || rN == rT) in disInstr_ARM_WRK()
16969 ILGop_16Sto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
16972 getIRegA(rN), mkU32(imm8)); in disInstr_ARM_WRK()
16973 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
16975 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm8); in disInstr_ARM_WRK()
16987 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
16991 if (rN == 15 || rT == 15 || rN == rT || rM == 15) in disInstr_ARM_WRK()
16996 ILGop_16Sto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
16999 getIRegA(rN), getIRegA(rM)); in disInstr_ARM_WRK()
17000 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
17002 nCC(INSN_COND), rT, rN, bU ? '+' : '-', rM); in disInstr_ARM_WRK()
17014 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17020 if (rT == 15 || rN == 15 || rN == rT) in disInstr_ARM_WRK()
17025 ILGop_8Sto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
17028 getIRegA(rN), mkU32(imm8)); in disInstr_ARM_WRK()
17029 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
17031 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm8); in disInstr_ARM_WRK()
17043 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17047 if (rT == 15 || rN == 15 || rN == rT || rM == 15) in disInstr_ARM_WRK()
17052 ILGop_8Sto32, getIRegA(rN), getIRegA(rT), condT ); in disInstr_ARM_WRK()
17055 getIRegA(rN), getIRegA(rM)); in disInstr_ARM_WRK()
17056 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
17058 nCC(INSN_COND), rT, rN, bU ? '+' : '-', rM); in disInstr_ARM_WRK()
17069 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17073 if (rT == 15 || rN == 15 || rN == rT) valid = False; in disInstr_ARM_WRK()
17075 IRExpr* address = getIRegA(rN); in disInstr_ARM_WRK()
17079 getIRegA(rN), mkU32(imm12)); in disInstr_ARM_WRK()
17080 putIRegA(rN, newRn, condT, Ijk_Boring); in disInstr_ARM_WRK()
17082 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm12); in disInstr_ARM_WRK()
17094 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17100 if (rT == 15 || rN == 15 || rN == rT || rM == 15) valid = False; in disInstr_ARM_WRK()
17102 IRExpr* address = getIRegA(rN); in disInstr_ARM_WRK()
17106 IRExpr* erN = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM, in disInstr_ARM_WRK()
17108 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
17121 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17127 if (rT == 15 || rN == 15 || rN == rT) valid = False; in disInstr_ARM_WRK()
17129 IRExpr* address = getIRegA(rN); in disInstr_ARM_WRK()
17133 getIRegA(rN), mkU32(imm8)); in disInstr_ARM_WRK()
17134 putIRegA(rN, newRn, condT, Ijk_Boring); in disInstr_ARM_WRK()
17136 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm8); in disInstr_ARM_WRK()
17148 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17152 if (rT == 15 || rN == 15 || rN == rT || rM == 15) valid = False; in disInstr_ARM_WRK()
17154 IRExpr* address = getIRegA(rN); in disInstr_ARM_WRK()
17158 getIRegA(rN), getIRegA(rM)); in disInstr_ARM_WRK()
17159 putIRegA(rN, newRn, condT, Ijk_Boring); in disInstr_ARM_WRK()
17161 nCC(INSN_COND), rT, rN, bU ? '+' : '-', rM); in disInstr_ARM_WRK()
17172 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17176 if (rN == 15 || rN == rT) valid = False; in disInstr_ARM_WRK()
17178 IRExpr* address = getIRegA(rN); in disInstr_ARM_WRK()
17181 getIRegA(rN), mkU32(imm12)); in disInstr_ARM_WRK()
17182 putIRegA(rN, newRn, condT, Ijk_Boring); in disInstr_ARM_WRK()
17184 nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm12); in disInstr_ARM_WRK()
17196 UInt rN = INSN(19,16); in disInstr_ARM_WRK() local
17202 if (rN == 15 || rN == rT || rM == 15) valid = False; in disInstr_ARM_WRK()
17206 storeGuardedLE( getIRegA(rN), getIRegA(rT), condT); in disInstr_ARM_WRK()
17208 IRExpr* erN = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM, in disInstr_ARM_WRK()
17210 putIRegA(rN, erN, condT, Ijk_Boring); in disInstr_ARM_WRK()
17933 UInt rN = INSN0(2,0); in disInstr_THUMB_WRK() local
17937 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
17942 DIP("%s r%u, r%u\n", isCMN ? "cmn" : "cmp", rN, rM); in disInstr_THUMB_WRK()
17948 UInt rN = INSN0(2,0); in disInstr_THUMB_WRK() local
17955 assign( res, binop(Iop_And32, getIRegT(rN), getIRegT(rM)) ); in disInstr_THUMB_WRK()
17958 DIP("tst r%u, r%u\n", rN, rM); in disInstr_THUMB_WRK()
18394 UInt rN = (h1 << 3) | INSN0(2,0); in disInstr_THUMB_WRK() local
18398 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
18402 DIP("cmphi r%u, r%u\n", rN, rM); in disInstr_THUMB_WRK()
18470 UInt rN = INSN0(2,0); in disInstr_THUMB_WRK() local
18477 getIRegT(rN), mkU32(0)) ); in disInstr_THUMB_WRK()
18488 DIP("cb%s r%u, 0x%x\n", bOP ? "nz" : "z", rN, dst - 1); in disInstr_THUMB_WRK()
18651 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18656 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
18663 DIP("%s r%u, r%u, #%u\n", isSub ? "subs" : "adds", rD, rN, uimm3); in disInstr_THUMB_WRK()
18672 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18677 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
18684 DIP("%s r%u, r%u, r%u\n", isSub ? "subs" : "adds", rD, rN, rM); in disInstr_THUMB_WRK()
18694 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18698 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), getIRegT(rM)); in disInstr_THUMB_WRK()
18709 DIP("%s r%u, [r%u, r%u]\n", isLD ? "ldr" : "str", rD, rN, rM); in disInstr_THUMB_WRK()
18719 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18723 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), getIRegT(rM)); in disInstr_THUMB_WRK()
18734 DIP("%sh r%u, [r%u, r%u]\n", isLD ? "ldr" : "str", rD, rN, rM); in disInstr_THUMB_WRK()
18742 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18745 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), getIRegT(rM)); in disInstr_THUMB_WRK()
18752 DIP("ldrsh r%u, [r%u, r%u]\n", rD, rN, rM); in disInstr_THUMB_WRK()
18760 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18763 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), getIRegT(rM)); in disInstr_THUMB_WRK()
18770 DIP("ldrsb r%u, [r%u, r%u]\n", rD, rN, rM); in disInstr_THUMB_WRK()
18780 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18784 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), getIRegT(rM)); in disInstr_THUMB_WRK()
18795 DIP("%sb r%u, [r%u, r%u]\n", isLD ? "ldr" : "str", rD, rN, rM); in disInstr_THUMB_WRK()
18814 UInt rN = INSN0(10,8); in disInstr_THUMB_WRK() local
18818 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
18820 putIRegT( rN, binop(isSub ? Iop_Sub32 : Iop_Add32, in disInstr_THUMB_WRK()
18824 DIP("%s r%u, #%u\n", isSub ? "subs" : "adds", rN, uimm8); in disInstr_THUMB_WRK()
18854 UInt rN = INSN0(10,8); in disInstr_THUMB_WRK() local
18858 assign( argL, getIRegT(rN) ); in disInstr_THUMB_WRK()
18862 DIP("cmp r%u, #%u\n", rN, uimm8); in disInstr_THUMB_WRK()
18909 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18913 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm5 * 4)); in disInstr_THUMB_WRK()
18924 DIP("%s r%u, [r%u, #%u]\n", isLD ? "ldr" : "str", rD, rN, imm5 * 4); in disInstr_THUMB_WRK()
18934 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18938 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm5 * 2)); in disInstr_THUMB_WRK()
18949 DIP("%sh r%u, [r%u, #%u]\n", isLD ? "ldr" : "str", rD, rN, imm5 * 2); in disInstr_THUMB_WRK()
18959 UInt rN = INSN0(5,3); in disInstr_THUMB_WRK() local
18963 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm5)); in disInstr_THUMB_WRK()
18974 DIP("%sb r%u, [r%u, #%u]\n", isLD ? "ldr" : "str", rD, rN, imm5); in disInstr_THUMB_WRK()
19005 UInt rN = INSN0(10,8); in disInstr_THUMB_WRK() local
19016 assign(oldRn, getIRegT(rN)); in disInstr_THUMB_WRK()
19031 if (0 == (list & (1 << rN))) { in disInstr_THUMB_WRK()
19032 putIRegT(rN, in disInstr_THUMB_WRK()
19042 DIP("ldmia r%u!, {0x%04x}\n", rN, list); in disInstr_THUMB_WRK()
19051 UInt rN = INSN0(10,8); in disInstr_THUMB_WRK() local
19056 if (valid && 0 != (list & (1 << rN))) { in disInstr_THUMB_WRK()
19057 for (i = 0; i < rN; i++) { in disInstr_THUMB_WRK()
19070 assign(oldRn, getIRegT(rN)); in disInstr_THUMB_WRK()
19080 putIRegT(rN, in disInstr_THUMB_WRK()
19088 DIP("stmia r%u!, {0x%04x}\n", rN, list); in disInstr_THUMB_WRK()
19314 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19336 if (rN == 15) valid = False; in disInstr_THUMB_WRK()
19339 if (bW == 1 && (regList & (1<<rN))) valid = False; in disInstr_THUMB_WRK()
19343 if (rN == 15) valid = False; in disInstr_THUMB_WRK()
19345 if (bW == 1 && (regList & (1<<rN))) valid = False; in disInstr_THUMB_WRK()
19361 mk_ldm_stm(False/*!arm*/, rN, bINC, bBEFORE, bW, bL, regList); in disInstr_THUMB_WRK()
19373 rN, bW ? "!" : "", regList); in disInstr_THUMB_WRK()
19384 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19386 Bool valid = !isBadRegT(rN) && !isBadRegT(rD); in disInstr_THUMB_WRK()
19388 if (!valid && rD <= 14 && rN == 13) in disInstr_THUMB_WRK()
19395 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19402 bS == 1 ? "s" : "", rD, rN, imm32); in disInstr_THUMB_WRK()
19411 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19413 Bool valid = !isBadRegT(rN) && !isBadRegT(rD); in disInstr_THUMB_WRK()
19415 if (!valid && rD <= 14 && rN == 13) in disInstr_THUMB_WRK()
19422 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19426 DIP("addw r%u, r%u, #%u\n", rD, rN, imm12); in disInstr_THUMB_WRK()
19438 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19439 if (rN != 15) { in disInstr_THUMB_WRK()
19444 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19448 DIP("%s.w r%u, #%u\n", isCMN ? "cmn" : "cmp", rN, imm32); in disInstr_THUMB_WRK()
19460 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19461 if (!isBadRegT(rN)) { // yes, really, it's inconsistent with CMP.W in disInstr_THUMB_WRK()
19470 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19479 DIP("%s.w r%u, #%u\n", isTST ? "tst" : "teq", rN, imm32); in disInstr_THUMB_WRK()
19492 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19494 Bool valid = !isBadRegT(rN) && !isBadRegT(rD); in disInstr_THUMB_WRK()
19497 if (!valid && !isRSB && rN == 13 && rD != 15) in disInstr_THUMB_WRK()
19504 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19517 isRSB ? "rsb" : "sub", bS == 1 ? "s" : "", rD, rN, imm32); in disInstr_THUMB_WRK()
19526 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19528 Bool valid = !isBadRegT(rN) && !isBadRegT(rD); in disInstr_THUMB_WRK()
19530 if (!valid && rD == 13 && rN == 13) in disInstr_THUMB_WRK()
19537 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19541 DIP("subw r%u, r%u, #%u\n", rD, rN, imm12); in disInstr_THUMB_WRK()
19555 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19557 if (!isBadRegT(rN) && !isBadRegT(rD)) { in disInstr_THUMB_WRK()
19563 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19594 nm, bS == 1 ? "s" : "", rD, rN, imm32); in disInstr_THUMB_WRK()
19611 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19613 if (!isBadRegT(rN) && !isBadRegT(rD)) { in disInstr_THUMB_WRK()
19632 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19647 nm, bS == 1 ? "s" : "", rD, rN, imm32); in disInstr_THUMB_WRK()
19660 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19667 Bool valid = !isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM); in disInstr_THUMB_WRK()
19671 && rD != 15 && rN == 13 && imm5 <= 3 && how == 0) { in disInstr_THUMB_WRK()
19677 && rD != 15 && rN == 13 && imm5 <= 3 && how == 0) { in disInstr_THUMB_WRK()
19693 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19726 nm, bS ? "s" : "", rD, rN, dis_buf); in disInstr_THUMB_WRK()
19739 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19742 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
19748 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19791 nm, bS ? "s" : "", rD, rN, dis_buf); in disInstr_THUMB_WRK()
19808 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19811 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
19830 assign(rNt, getIRegT(rN)); in disInstr_THUMB_WRK()
19860 nm, bS ? "s" : "", rD, rN, dis_buf); in disInstr_THUMB_WRK()
19873 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19877 Bool valid = !isBadRegT(rN) && !isBadRegT(rM) && !isBadRegT(rD); in disInstr_THUMB_WRK()
19886 assign(rNt, getIRegT(rN)); in disInstr_THUMB_WRK()
19890 rNt, how, rMt, rN, rM in disInstr_THUMB_WRK()
19900 nm, bS ? "s" : "", rD, rN, rM); in disInstr_THUMB_WRK()
19910 UInt rN = INSN1(3,0); in disInstr_THUMB_WRK() local
19914 ? (!isBadRegT(rD) && !isBadRegT(rN)) in disInstr_THUMB_WRK()
19915 : (rD != 15 && rN != 15 && (rD != 13 || rN != 13)); in disInstr_THUMB_WRK()
19921 assign(rNt, getIRegT(rN)); in disInstr_THUMB_WRK()
19926 dis_buf, &oldRn, bS ? &oldC : NULL, rNt, how, imm5, rN in disInstr_THUMB_WRK()
19952 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19954 if (!isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
19961 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
19981 DIP("%s.w r%u, %s\n", isTST ? "tst" : "teq", rN, dis_buf); in disInstr_THUMB_WRK()
19993 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
19995 if (!isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
20001 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
20014 DIP("%s.w r%u, %s\n", isCMN ? "cmn" : "cmp", rN, dis_buf); in disInstr_THUMB_WRK()
20121 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20134 if (rN == 15) in disInstr_THUMB_WRK()
20136 if (bW == 1 && rN == rT) in disInstr_THUMB_WRK()
20163 assign(preAddr, getIRegT(rN)); in disInstr_THUMB_WRK()
20189 vassert(rN != rT); // assured by validity check above in disInstr_THUMB_WRK()
20190 putIRegT(rN, mkexpr(postAddr), condT); in disInstr_THUMB_WRK()
20244 vassert(rN != rT); // assured by validity check above in disInstr_THUMB_WRK()
20245 putIRegT(rN, mkexpr(postAddr), condT); in disInstr_THUMB_WRK()
20250 vassert(rN != 15); // assured by validity check above in disInstr_THUMB_WRK()
20261 nm, rT, rN, bU ? '+' : '-', imm8); in disInstr_THUMB_WRK()
20265 nm, rT, rN, bU ? '+' : '-', imm8); in disInstr_THUMB_WRK()
20270 nm, rT, rN, bU ? '+' : '-', imm8); in disInstr_THUMB_WRK()
20313 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20322 if (rN == 15 || isBadRegT(rT) || isBadRegT(rM)) in disInstr_THUMB_WRK()
20326 if (rN == 15 || isBadRegT(rM)) in disInstr_THUMB_WRK()
20352 getIRegT(rN), in disInstr_THUMB_WRK()
20413 vassert(rN != 15); // assured by validity check above in disInstr_THUMB_WRK()
20423 nm, rT, rN, rM, imm2); in disInstr_THUMB_WRK()
20462 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20467 if (rN != 15 && bU == 0) { in disInstr_THUMB_WRK()
20474 if (rN == 15 || rT == 15) in disInstr_THUMB_WRK()
20504 if (rN == 15) { in disInstr_THUMB_WRK()
20508 assign(rNt, getIRegT(rN)); in disInstr_THUMB_WRK()
20574 DIP("%s.w r%u, [r%u, +#%u]\n", nm, rT, rN, imm12); in disInstr_THUMB_WRK()
20591 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20598 if (bW == 1 && (rN == rT || rN == rT2)) valid = False; in disInstr_THUMB_WRK()
20603 if (rN == 15 && (bL == 0/*store*/ in disInstr_THUMB_WRK()
20608 assign(preAddr, 15 == rN in disInstr_THUMB_WRK()
20610 : getIRegT(rN)); in disInstr_THUMB_WRK()
20626 && rN == 13 && rN != rT && rN != rT2 in disInstr_THUMB_WRK()
20628 putIRegT(rN, mkexpr(postAddr), condT); in disInstr_THUMB_WRK()
20661 putIRegT(rN, mkexpr(postAddr), condT); in disInstr_THUMB_WRK()
20668 nm, rT, rT2, rN, bU ? '+' : '-', imm8 << 2); in disInstr_THUMB_WRK()
20672 nm, rT, rT2, rN, bU ? '+' : '-', imm8 << 2); in disInstr_THUMB_WRK()
20677 nm, rT, rT2, rN, bU ? '+' : '-', imm8 << 2); in disInstr_THUMB_WRK()
20766 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20769 if (bH/*ATC*/ || (rN != 13 && !isBadRegT(rM))) { in disInstr_THUMB_WRK()
20778 getIRegT(rN), in disInstr_THUMB_WRK()
20801 bH ? 'h' : 'b', rN, rM, bH ? ", LSL #1" : ""); in disInstr_THUMB_WRK()
20814 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20819 if (!isBadRegT(rD) && !isBadRegT(rN) && msb <= 31) { in disInstr_THUMB_WRK()
20828 assign(src, getIRegT(rN)); in disInstr_THUMB_WRK()
20839 isU ? "ubfx" : "sbfx", rD, rN, lsb, wm1 + 1); in disInstr_THUMB_WRK()
20928 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20931 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
20933 assign(res, binop(Iop_Mul32, getIRegT(rN), getIRegT(rM))); in disInstr_THUMB_WRK()
20935 DIP("mul.w r%u, r%u, r%u\n", rD, rN, rM); in disInstr_THUMB_WRK()
20943 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20946 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
20950 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
20954 DIP("sdiv.w r%u, r%u, r%u\n", rD, rN, rM); in disInstr_THUMB_WRK()
20962 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20965 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
20969 assign(argL, getIRegT(rN)); in disInstr_THUMB_WRK()
20973 DIP("udiv.w r%u, r%u, r%u\n", rD, rN, rM); in disInstr_THUMB_WRK()
20982 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
20987 && !isBadRegT(rN) && !isBadRegT(rM) && rDlo != rDhi) { in disInstr_THUMB_WRK()
20990 getIRegT(rN), getIRegT(rM))); in disInstr_THUMB_WRK()
20994 isU ? 'u' : 's', rDlo, rDhi, rN, rM); in disInstr_THUMB_WRK()
21003 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21007 if (!isBadRegT(rD) && !isBadRegT(rN) in disInstr_THUMB_WRK()
21014 binop(Iop_Mul32, getIRegT(rN), getIRegT(rM)))); in disInstr_THUMB_WRK()
21017 isMLA ? "mla" : "mls", rD, rN, rM, rA); in disInstr_THUMB_WRK()
21044 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21048 if (!isBadRegT(rDlo) && !isBadRegT(rDhi) && !isBadRegT(rN) in disInstr_THUMB_WRK()
21059 assign( argR, getIRegT(rN)); in disInstr_THUMB_WRK()
21069 isS ? 's' : 'u', rDlo, rDhi, rN, rM); in disInstr_THUMB_WRK()
21076 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21080 if (!isBadRegT(rDlo) && !isBadRegT(rDhi) && !isBadRegT(rN) in disInstr_THUMB_WRK()
21089 assign( argN, getIRegT(rN) ); in disInstr_THUMB_WRK()
21103 DIP("umaal r%u, r%u, r%u, r%u\n", rDlo, rDhi, rN, rM); in disInstr_THUMB_WRK()
21116 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21117 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
21121 binop(Iop_MullS32, getIRegT(rN), getIRegT(rM)), in disInstr_THUMB_WRK()
21125 bitR ? "r" : "", rD, rN, rM); in disInstr_THUMB_WRK()
21138 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21139 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM) && (rA != 13)) { in disInstr_THUMB_WRK()
21145 binop(Iop_MullS32, getIRegT(rN), getIRegT(rM))), in disInstr_THUMB_WRK()
21149 bitR ? "r" : "", rD, rN, rM, rA); in disInstr_THUMB_WRK()
21175 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21178 if (isBadRegT(rD) || rN == 13 || msb < lsb) { in disInstr_THUMB_WRK()
21189 assign(src, rN == 15 ? mkU32(0) : getIRegT(rN)); in disInstr_THUMB_WRK()
21203 if (rN == 15) { in disInstr_THUMB_WRK()
21208 rD, rN, lsb, msb-lsb+1); in disInstr_THUMB_WRK()
21221 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21225 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
21230 assign(srcL, getIRegT(rN)); in disInstr_THUMB_WRK()
21238 isU ? 'u' : 's', rD, rN, rM, rot); in disInstr_THUMB_WRK()
21250 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21254 if (!isBadRegT(rD) && !isBadRegT(rN) && !isBadRegT(rM)) { in disInstr_THUMB_WRK()
21259 assign(srcL, getIRegT(rN)); in disInstr_THUMB_WRK()
21267 isU ? 'u' : 's', rD, rN, rM, rot); in disInstr_THUMB_WRK()
21368 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21371 if (!isBadRegT(rN) && (write_nzcvq || write_ge)) { in disInstr_THUMB_WRK()
21373 assign(rNt, getIRegT(rN)); in disInstr_THUMB_WRK()
21376 write_nzcvq ? "f" : "", write_ge ? "g" : "", rN); in disInstr_THUMB_WRK()
21395 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21398 if (!isBadRegT(rT) && rN != 15) { in disInstr_THUMB_WRK()
21406 binop(Iop_Add32, getIRegT(rN), mkU32(imm8 * 4)), in disInstr_THUMB_WRK()
21409 DIP("ldrex r%u, [r%u, #+%u]\n", rT, rN, imm8 * 4); in disInstr_THUMB_WRK()
21417 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21420 if (!isBadRegT(rT) && rN != 15) { in disInstr_THUMB_WRK()
21426 stmt( IRStmt_LLSC(Iend_LE, res, getIRegT(rN), in disInstr_THUMB_WRK()
21430 DIP("ldrex%c r%u, [r%u]\n", isH ? 'h' : 'b', rT, rN); in disInstr_THUMB_WRK()
21437 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21440 if (!isBadRegT(rT) && !isBadRegT(rT2) && rT != rT2 && rN != 15) { in disInstr_THUMB_WRK()
21447 stmt( IRStmt_LLSC(Iend_LE, res, getIRegT(rN), in disInstr_THUMB_WRK()
21452 DIP("ldrexd r%u, r%u, [r%u]\n", rT, rT2, rN); in disInstr_THUMB_WRK()
21459 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21463 if (!isBadRegT(rD) && !isBadRegT(rT) && rN != 15 in disInstr_THUMB_WRK()
21464 && rD != rN && rD != rT) { in disInstr_THUMB_WRK()
21473 binop(Iop_Add32, getIRegT(rN), mkU32(imm8 * 4)), in disInstr_THUMB_WRK()
21481 DIP("strex r%u, r%u, [r%u, #+%u]\n", rD, rT, rN, imm8 * 4); in disInstr_THUMB_WRK()
21489 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21493 if (!isBadRegT(rD) && !isBadRegT(rT) && rN != 15 in disInstr_THUMB_WRK()
21494 && rD != rN && rD != rT) { in disInstr_THUMB_WRK()
21501 stmt( IRStmt_LLSC(Iend_LE, resSC1, getIRegT(rN), in disInstr_THUMB_WRK()
21510 DIP("strex%c r%u, r%u, [r%u]\n", isH ? 'h' : 'b', rD, rT, rN); in disInstr_THUMB_WRK()
21517 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21522 && rN != 15 && rD != rN && rD != rT && rD != rT2) { in disInstr_THUMB_WRK()
21533 stmt( IRStmt_LLSC(Iend_LE, resSC1, getIRegT(rN), mkexpr(data))); in disInstr_THUMB_WRK()
21540 DIP("strexd r%u, r%u, r%u, [r%u]\n", rD, rT, rT2, rN); in disInstr_THUMB_WRK()
21588 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21591 DIP("pld%s [r%u, #%u]\n", bW ? "w" : "", rN, imm12); in disInstr_THUMB_WRK()
21598 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21601 DIP("pld%s [r%u, #-%u]\n", bW ? "w" : "", rN, imm8); in disInstr_THUMB_WRK()
21608 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21613 DIP("pld%s [r%u, r%u, lsl %u]\n", bW ? "w" : "", rN, rM, imm2); in disInstr_THUMB_WRK()
21675 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21678 if (rN == 15 || isBadRegT(rT)) valid = False; in disInstr_THUMB_WRK()
21681 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
21686 DIP("ldrt r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
21698 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21701 if (rN == 15 || isBadRegT(rT)) valid = False; in disInstr_THUMB_WRK()
21704 IRExpr* address = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
21707 DIP("strt r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
21719 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21722 if (rN == 15 || isBadRegT(rT)) valid = False; in disInstr_THUMB_WRK()
21725 IRExpr* address = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
21729 DIP("strbt r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
21740 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21742 if (rN == 15) { in disInstr_THUMB_WRK()
21753 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
21758 DIP("ldrht r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
21769 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21771 if (rN == 15) { in disInstr_THUMB_WRK()
21782 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
21787 DIP("ldrsht r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
21799 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21802 if (rN == 15 || isBadRegT(rT)) valid = False; in disInstr_THUMB_WRK()
21805 IRExpr* address = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
21809 DIP("strht r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
21820 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21824 if (rN == 15 /* insn is LDRB (literal) */) valid = False; in disInstr_THUMB_WRK()
21828 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
21833 DIP("ldrbt r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
21844 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21848 if (rN == 15 /* insn is LDRSB (literal) */) valid = False; in disInstr_THUMB_WRK()
21852 IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm8)); in disInstr_THUMB_WRK()
21857 DIP("ldrsbt r%u, [r%u, #%u]\n", rT, rN, imm8); in disInstr_THUMB_WRK()
21868 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21870 if (rN != 15) { in disInstr_THUMB_WRK()
21871 DIP("pli [r%u, #%u]\n", rN, imm12); in disInstr_THUMB_WRK()
21882 UInt rN = INSN0(3,0); in disInstr_THUMB_WRK() local
21884 if (rN != 15) { in disInstr_THUMB_WRK()
21885 DIP("pli [r%u, #-%u]\n", rN, imm8); in disInstr_THUMB_WRK()