diff options
author | Yifan Lu | 2016-11-03 14:47:29 -0700 |
---|---|---|
committer | Yifan Lu | 2016-11-03 14:47:29 -0700 |
commit | bf4841093fac16a7349561cd89af452a3b2a5fda (patch) | |
tree | d84cbc8efca8488b5c52d87ce7c210092a5463e8 /lib/arm/dis-thumb2.inc.h | |
parent | Flush cache for mirror too (diff) | |
download | substitute-bf4841093fac16a7349561cd89af452a3b2a5fda.tar.gz |
Bad handling of t2 BL/BLX
Fixes #1
Diffstat (limited to '')
-rw-r--r-- | lib/arm/dis-thumb2.inc.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/arm/dis-thumb2.inc.h b/lib/arm/dis-thumb2.inc.h index b8082f3..d26e9a0 100644 --- a/lib/arm/dis-thumb2.inc.h +++ b/lib/arm/dis-thumb2.inc.h @@ -173,7 +173,7 @@ static INLINE void P(unk_Rt_13_VMOVRRD)(tdis_ctx ctx, UNUSED struct bitslice Rt) 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 S = crap >> 24 & 1; - if (S) + if (!S) crap ^= (3 << 22); return P(branch)(ctx, ctx->base.pc + 4 + 2 * sext(crap, 25), CC_CALL); @@ -181,7 +181,7 @@ static INLINE void P(t_bltarget_func_1_tBL)(tdis_ctx ctx, struct bitslice func) static INLINE void P(t_blxtarget_func_1_tBLXi)(tdis_ctx ctx, struct bitslice func) { unsigned crap = bs_get(func, ctx->base.op); unsigned S = crap >> 24 & 1; - if (S) + if (!S) crap ^= (3 << 22); return P(branch)(ctx, ctx->base.pc + 4 + 2 * sext(crap, 25), CC_CALL); } |