aboutsummaryrefslogtreecommitdiff
path: root/target/alpha
diff options
context:
space:
mode:
authorEmilio G. Cota <cota@braap.org>2018-02-19 20:51:58 -0500
committerRichard Henderson <richard.henderson@linaro.org>2018-05-09 10:12:21 -0700
commitb542683d77b4f56cef0221b267c341616d87bce9 (patch)
treede651b8d95bd698263970af7d0456e597d999f2b /target/alpha
parent6cd79443d33e6ba6b4c5b787eb713ca1cec56328 (diff)
translator: merge max_insns into DisasContextBase
While at it, use int for both num_insns and max_insns to make sure we have same-type comparisons. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Michael Clark <mjc@sifive.com> Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/alpha')
-rw-r--r--target/alpha/translate.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/target/alpha/translate.c b/target/alpha/translate.c
index 73a1b5e63e..15eca71d49 100644
--- a/target/alpha/translate.c
+++ b/target/alpha/translate.c
@@ -2919,8 +2919,7 @@ static DisasJumpType translate_one(DisasContext *ctx, uint32_t insn)
return ret;
}
-static int alpha_tr_init_disas_context(DisasContextBase *dcbase,
- CPUState *cpu, int max_insns)
+static void alpha_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu)
{
DisasContext *ctx = container_of(dcbase, DisasContext, base);
CPUAlphaState *env = cpu->env_ptr;
@@ -2959,8 +2958,7 @@ static int alpha_tr_init_disas_context(DisasContextBase *dcbase,
mask = TARGET_PAGE_MASK;
}
bound = -(ctx->base.pc_first | mask) / 4;
-
- return MIN(max_insns, bound);
+ ctx->base.max_insns = MIN(ctx->base.max_insns, bound);
}
static void alpha_tr_tb_start(DisasContextBase *db, CPUState *cpu)