diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2018-05-30 18:06:23 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2018-06-01 15:15:27 -0700 |
commit | 07ea28b41830f946de3841b0ac61a3413679feb9 (patch) | |
tree | 42c4837f1a3f06b76291c9cf8412914d2c27c346 /target/alpha | |
parent | 392fba9f583223786f844dce9b2e7f9a0ce0147a (diff) | |
download | qemu-07ea28b41830f946de3841b0ac61a3413679feb9.zip qemu-07ea28b41830f946de3841b0ac61a3413679feb9.tar.gz qemu-07ea28b41830f946de3841b0ac61a3413679feb9.tar.bz2 |
tcg: Pass tb and index to tcg_gen_exit_tb separately
Do the cast to uintptr_t within the helper, so that the compiler
can type check the pointer argument. We can also do some more
sanity checking of the index argument.
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/alpha')
-rw-r--r-- | target/alpha/translate.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 15eca71..e5d6285 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -488,7 +488,7 @@ static DisasJumpType gen_bdirect(DisasContext *ctx, int ra, int32_t disp) } else if (use_goto_tb(ctx, dest)) { tcg_gen_goto_tb(0); tcg_gen_movi_i64(cpu_pc, dest); - tcg_gen_exit_tb((uintptr_t)ctx->base.tb); + tcg_gen_exit_tb(ctx->base.tb, 0); return DISAS_NORETURN; } else { tcg_gen_movi_i64(cpu_pc, dest); @@ -507,12 +507,12 @@ static DisasJumpType gen_bcond_internal(DisasContext *ctx, TCGCond cond, tcg_gen_goto_tb(0); tcg_gen_movi_i64(cpu_pc, ctx->base.pc_next); - tcg_gen_exit_tb((uintptr_t)ctx->base.tb); + tcg_gen_exit_tb(ctx->base.tb, 0); gen_set_label(lab_true); tcg_gen_goto_tb(1); tcg_gen_movi_i64(cpu_pc, dest); - tcg_gen_exit_tb((uintptr_t)ctx->base.tb + 1); + tcg_gen_exit_tb(ctx->base.tb, 1); return DISAS_NORETURN; } else { @@ -1273,7 +1273,7 @@ static DisasJumpType gen_call_pal(DisasContext *ctx, int palcode) if (!use_exit_tb(ctx)) { tcg_gen_goto_tb(0); tcg_gen_movi_i64(cpu_pc, entry); - tcg_gen_exit_tb((uintptr_t)ctx->base.tb); + tcg_gen_exit_tb(ctx->base.tb, 0); return DISAS_NORETURN; } else { tcg_gen_movi_i64(cpu_pc, entry); @@ -3009,7 +3009,7 @@ static void alpha_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu) if (use_goto_tb(ctx, ctx->base.pc_next)) { tcg_gen_goto_tb(0); tcg_gen_movi_i64(cpu_pc, ctx->base.pc_next); - tcg_gen_exit_tb((uintptr_t)ctx->base.tb); + tcg_gen_exit_tb(ctx->base.tb, 0); } /* FALLTHRU */ case DISAS_PC_STALE: @@ -3025,7 +3025,7 @@ static void alpha_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu) if (ctx->base.singlestep_enabled) { gen_excp_1(EXCP_DEBUG, 0); } else { - tcg_gen_exit_tb(0); + tcg_gen_exit_tb(NULL, 0); } break; default: |