From bf4841093fac16a7349561cd89af452a3b2a5fda Mon Sep 17 00:00:00 2001 From: Yifan Lu Date: Thu, 3 Nov 2016 14:47:29 -0700 Subject: Bad handling of t2 BL/BLX Fixes #1 --- lib/arm/dis-thumb2.inc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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); } -- cgit v1.2.3