diff options
author | comex | 2015-01-11 21:13:04 -0500 |
---|---|---|
committer | comex | 2015-01-11 21:13:04 -0500 |
commit | c03900f1d25ee8a7feaf836665210ea96549d346 (patch) | |
tree | 46ec20328b274ce975cc51627508c0290a533c5e /lib/dis-thumb.inc.h | |
parent | theoretically fix thumb (diff) | |
download | substitute-c03900f1d25ee8a7feaf836665210ea96549d346.tar.gz |
thumb2 progress
Diffstat (limited to '')
-rw-r--r-- | lib/dis-thumb.inc.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/dis-thumb.inc.h b/lib/dis-thumb.inc.h index 8b41929..5541510 100644 --- a/lib/dis-thumb.inc.h +++ b/lib/dis-thumb.inc.h @@ -27,13 +27,13 @@ static INLINE tdis_ret P(t_adrlabel_addr_1_tADR)(tdis_ctx ctx, struct bitslice a 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 + 2 + sext(bs_get(target, ctx->op), 8); + return P(branch)(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 + 2 + sext(bs_get(target, ctx->op), 11); + return P(branch)(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 + 2 + bs_get(target, ctx->op); + return P(branch)(ctx->pc + 4 + 2 * bs_get(target, ctx->op); } static tdis_ret P(dis_thumb)(tdis_ctx ctx) { |