diff options
author | Reiko Asakura | 2021-02-17 10:16:20 -0500 |
---|---|---|
committer | Reiko Asakura | 2021-02-17 10:16:20 -0500 |
commit | 2f285db8573f30f78a3a5a17329ae4d0ab097c86 (patch) | |
tree | 725217e0f9d1ab49d9973281c4041f34aea503dd /lib/arm/dis-thumb2.inc.h | |
parent | Fix always_inline attribute warning (diff) | |
download | substitute-2f285db8573f30f78a3a5a17329ae4d0ab097c86.tar.gz |
Fix wrong T bit in BLX(imm)->BLX(reg) transform
Diffstat (limited to '')
-rw-r--r-- | lib/arm/dis-thumb2.inc.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/arm/dis-thumb2.inc.h b/lib/arm/dis-thumb2.inc.h index 4203c01..98ba5ac 100644 --- a/lib/arm/dis-thumb2.inc.h +++ b/lib/arm/dis-thumb2.inc.h @@ -175,7 +175,8 @@ static INLINE void P(t_bltarget_func_1_tBL)(tdis_ctx ctx, struct bitslice func) unsigned S = crap >> 24 & 1; if (!S) crap ^= (3 << 22); - return P(branch)(ctx, ctx->base.pc + 4 + sext(crap, 25), CC_CALL); + /* Set Thumb bit because this call will be transformed into a BLX (reg) */ + return P(branch)(ctx, (ctx->base.pc + 4 + sext(crap, 25)) | 1, CC_CALL); } static INLINE void P(t_blxtarget_func_1_tBLXi)(tdis_ctx ctx, struct bitslice func) { |