From b63f1dff9dc736f7fa66f04976436f1f3fe2ac5d Mon Sep 17 00:00:00 2001 From: comex Date: Mon, 23 Feb 2015 00:41:29 -0500 Subject: Ban calls within transform regions in threadsafe mode. --- lib/arm64/dis-main.inc.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/arm64/dis-main.inc.h') diff --git a/lib/arm64/dis-main.inc.h b/lib/arm64/dis-main.inc.h index 0107715..a009189 100644 --- a/lib/arm64/dis-main.inc.h +++ b/lib/arm64/dis-main.inc.h @@ -55,8 +55,13 @@ static INLINE void P(am_ldrlit_label_unk_Rt_6_LDRDl)(tdis_ctx ctx, struct bitsli return P(pcrel)(ctx, ctx->base.pc + sext(bs_get(label, ctx->base.op), 19) * 4, (struct arch_pcrel_info) {bs_get(Rt, ctx->base.op), mode}); } -static INLINE void P(GPR64_Rn_1_RET)(tdis_ctx ctx, UNUSED struct bitslice Rn) { - return P(ret)(ctx); + +static INLINE void P(GPR64_Rn_2_BLR)(tdis_ctx ctx, UNUSED struct bitslice Rn) { + int op = ctx->base.op >> 21 & 3; + if (op == 1) + return P(indirect_call)(ctx); + else + return P(ret)(ctx); } static INLINE void P(dis)(tdis_ctx ctx) { -- cgit v1.2.3