diff options
author | Yifan Lu | 2016-11-03 14:47:29 -0700 |
---|---|---|
committer | Yifan Lu | 2016-11-03 14:49:07 -0700 |
commit | b801dc06f4a8c09b96b61241e228990cf04c6b86 (patch) | |
tree | 2cb8d9ea93b1e307e858267c1bea9fa436f635a8 /lib/arm | |
parent | make ln command more robust (diff) | |
download | substitute-b801dc06f4a8c09b96b61241e228990cf04c6b86.tar.gz |
Bad handling of t2 BL/BLX
Fixes #1
Diffstat (limited to 'lib/arm')
-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); } |