diff options
Diffstat (limited to 'lib/dis-thumb.inc.h')
-rw-r--r-- | lib/dis-thumb.inc.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/lib/dis-thumb.inc.h b/lib/dis-thumb.inc.h index 5541510..eb1aae4 100644 --- a/lib/dis-thumb.inc.h +++ b/lib/dis-thumb.inc.h @@ -1,6 +1,6 @@ #include "dis.h" static INLINE tdis_ret P(GPR_Rm_2_tADDhirr)(tdis_ctx ctx, struct bitslice Rm) { - return P(regs)(ctx, Rm, 0, 3, Rm, 0, 0); + data(r(Rm)); } static INLINE tdis_ret P(GPR_Rm_B_1_tBX)(tdis_ctx ctx, struct bitslice Rm) { unsigned val = bs_get(Rm, ctx->op); @@ -17,27 +17,34 @@ static INLINE tdis_ret P(GPR_Rm_unk_Rd_1_tMOVr)(tdis_ctx ctx, struct bitslice Rd if (Rd_val == 15) return P(bad)(ctx); if (Rm_val == 15) - return P(pcrel)(ctx, ctx->pc + 4, Rd_val); + return P(pcrel)(ctx, ctx->pc + 4, Rd_val, false); return P(unidentified)(ctx); } -static INLINE tdis_ret P(t_addrmode_pc_addr_1_tLDRpci)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) { +static INLINE tdis_ret P(tGPR_Rn_reglist_regs_1_tLDMIA)(tdis_ctx ctx, UNUSED struct bitslice regs, UNUSED struct bitslice Rn) { + return P(unidentified)(ctx); +} +static INLINE tdis_ret P(tGPR_Rn_reglist_regs_S_1_tSTMIA_UPD)(tdis_ctx ctx, UNUSED struct bitslice regs, UNUSED struct bitslice Rn) { + return P(unidentified)(ctx); +} +static INLINE tdis_ret P(t_addrmode_pc_addr_unk_Rt_1_tLDRpci)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) { return P(pcrel)(ctx, ((ctx->pc + 4) & ~2) + bs_get(addr, ctx->op), bs_get(Rt, ctx->op), true); } -static INLINE tdis_ret P(t_adrlabel_addr_1_tADR)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rd) { +static INLINE tdis_ret P(t_adrlabel_addr_unk_Rd_1_tADR)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rd) { return P(pcrel)(ctx, ((ctx->pc + 4) & ~2) + bs_get(addr, ctx->op), bs_get(Rd, ctx->op), false); } static INLINE tdis_ret P(t_bcctarget_target_B_1_tBcc)(tdis_ctx ctx, struct bitslice target) { - return P(branch)(ctx->pc + 4 + 2 * sext(bs_get(target, ctx->op), 8); + return P(branch)(ctx, ctx->pc + 4 + 2 * sext(bs_get(target, ctx->op), 8)); } static INLINE tdis_ret P(t_brtarget_target_B_1_tB)(tdis_ctx ctx, struct bitslice target) { - return P(branch)(ctx->pc + 4 + 2 * sext(bs_get(target, ctx->op), 11); + return P(branch)(ctx, ctx->pc + 4 + 2 * sext(bs_get(target, ctx->op), 11)); } static INLINE tdis_ret P(t_cbtarget_target_B_2_tCBNZ)(tdis_ctx ctx, struct bitslice target) { - return P(branch)(ctx->pc + 4 + 2 * bs_get(target, ctx->op); + return P(branch)(ctx, ctx->pc + 4 + 2 * bs_get(target, ctx->op)); } static tdis_ret P(dis_thumb)(tdis_ctx ctx) { unsigned op = ctx->op; - #include "../generated/transform-dis-thumb.inc" + #include "../generated/transform-dis-thumb.inc.h" + __builtin_abort(); } |