diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dis-arm64.inc.h | 3 | ||||
-rw-r--r-- | lib/dis.h | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/dis-arm64.inc.h b/lib/dis-arm64.inc.h index d99cae7..19f986a 100644 --- a/lib/dis-arm64.inc.h +++ b/lib/dis-arm64.inc.h @@ -19,6 +19,9 @@ static INLINE tdis_ret P(am_ldrlit_label_unk_Rt_6_LDRDl)(tdis_ctx ctx, struct bi static INLINE tdis_ret P(am_tbrcond_target_B_4_TBNZW)(tdis_ctx ctx, struct bitslice target) { return P(branch)(ctx, ctx->pc + sext(bs_get(target, ctx->op), 14) * 4); } +static INLINE tdis_ret P(GPR64_Rn_1_RET)(tdis_ctx ctx, UNUSED struct bitslice Rn) { + return P(ret)(ctx); +} static tdis_ret P(dis_arm64)(tdis_ctx ctx) { unsigned op = ctx->op; @@ -67,7 +67,7 @@ static const struct bitslice nullbs = { 0, NULL }; #define rnull nullbs, false, false #define data(...) data_(__VA_ARGS__, rnull, rnull, rnull, rnull) #define data_(...) data__(__VA_ARGS__) -#define data__(b1, o1, v1, b2, o2, v2, b3, o3, v3, b4, o4, v4, ...) \ +#define data__(b1, o1, v1, b2, o2, v2, b3, o3, v3, b4, o4, v4, ...) do { \ tdis_ret ret = P(data)(ctx, \ v1 ? bs_get(b1, ctx->op) : -1u, \ v2 ? bs_get(b2, ctx->op) : -1u, \ @@ -77,7 +77,8 @@ static const struct bitslice nullbs = { 0, NULL }; (o2 << 1) | \ (o3 << 2) | \ (o4 << 3)); \ - if(ret.modify) { \ + IF_BOTHER_WITH_MODIFY( \ + if (ret.modify) { \ unsigned new = ctx->op; \ new = bs_set(b1, ctx->newval[0], new); \ new = bs_set(b2, ctx->newval[1], new); \ @@ -85,5 +86,7 @@ static const struct bitslice nullbs = { 0, NULL }; new = bs_set(b4, ctx->newval[3], new); \ ctx->newop = new; \ } \ - return ret; + ) \ + return ret; \ +} while (0) |