diff options
author | Yifan Lu | 2016-11-03 23:06:55 -0700 |
---|---|---|
committer | Yifan Lu | 2016-11-03 23:06:55 -0700 |
commit | e0e2d09b3f441a1adca6d8bc4402dc40b5af4871 (patch) | |
tree | a445240dde184069c0b0ffc30150561b4c7a9b18 /lib/arm/dis-thumb2.inc.h | |
parent | Bad handling of t2 BL/BLX (diff) | |
download | substitute-e0e2d09b3f441a1adca6d8bc4402dc40b5af4871.tar.gz |
Fixed extraction for BL/BLX thumb2
Diffstat (limited to '')
-rw-r--r-- | lib/arm/dis-thumb2.inc.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/arm/dis-thumb2.inc.h b/lib/arm/dis-thumb2.inc.h index d26e9a0..4203c01 100644 --- a/lib/arm/dis-thumb2.inc.h +++ b/lib/arm/dis-thumb2.inc.h @@ -171,19 +171,19 @@ static INLINE void P(unk_Rt_13_VMOVRRD)(tdis_ctx ctx, UNUSED struct bitslice Rt) return P(unidentified)(ctx); } static INLINE void P(t_bltarget_func_1_tBL)(tdis_ctx ctx, struct bitslice func) { - unsigned crap = bs_get(func, ctx->base.op) << 1; + unsigned crap = bs_get(func, ctx->base.op) << 1; // first bit zero unsigned S = crap >> 24 & 1; if (!S) crap ^= (3 << 22); - return P(branch)(ctx, ctx->base.pc + 4 + 2 * sext(crap, 25), CC_CALL); + return P(branch)(ctx, ctx->base.pc + 4 + sext(crap, 25), CC_CALL); } static INLINE void P(t_blxtarget_func_1_tBLXi)(tdis_ctx ctx, struct bitslice func) { - unsigned crap = bs_get(func, ctx->base.op); + unsigned crap = bs_get(func, ctx->base.op) << 1; // first two bits zero unsigned S = crap >> 24 & 1; if (!S) crap ^= (3 << 22); - return P(branch)(ctx, ctx->base.pc + 4 + 2 * sext(crap, 25), CC_CALL); + return P(branch)(ctx, ctx->base.pc + 4 + sext(crap, 25), CC_CALL); } static INLINE void P(rGPR_func_1_t2BXJ)(tdis_ctx ctx, UNUSED struct bitslice func) { return P(unidentified)(ctx); |