Commit 8cfd0495 authored by Richard Henderson's avatar Richard Henderson
Browse files

tcg: Change tcg_gen_exit_tb argument to uintptr_t



And update all users.

Reviewed-by: default avatarAurelien Jarno <aurelien@aurel32.net>
Signed-off-by: default avatarRichard Henderson <rth@twiddle.net>
parent 48bc6bab
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -39,12 +39,12 @@ static inline void gen_tb_start(void)
static void gen_tb_end(TranslationBlock *tb, int num_insns)
{
    gen_set_label(exitreq_label);
    tcg_gen_exit_tb((tcg_target_long)tb + TB_EXIT_REQUESTED);
    tcg_gen_exit_tb((uintptr_t)tb + TB_EXIT_REQUESTED);

    if (use_icount) {
        *icount_arg = num_insns;
        gen_set_label(icount_label);
        tcg_gen_exit_tb((tcg_target_long)tb + TB_EXIT_ICOUNT_EXPIRED);
        tcg_gen_exit_tb((uintptr_t)tb + TB_EXIT_ICOUNT_EXPIRED);
    }
}

+4 −4
Original line number Diff line number Diff line
@@ -415,7 +415,7 @@ static ExitStatus 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((tcg_target_long)ctx->tb);
        tcg_gen_exit_tb((uintptr_t)ctx->tb);
        return EXIT_GOTO_TB;
    } else {
        tcg_gen_movi_i64(cpu_pc, dest);
@@ -434,12 +434,12 @@ static ExitStatus gen_bcond_internal(DisasContext *ctx, TCGCond cond,

        tcg_gen_goto_tb(0);
        tcg_gen_movi_i64(cpu_pc, ctx->pc);
        tcg_gen_exit_tb((tcg_target_long)ctx->tb);
        tcg_gen_exit_tb((uintptr_t)ctx->tb);

        gen_set_label(lab_true);
        tcg_gen_goto_tb(1);
        tcg_gen_movi_i64(cpu_pc, dest);
        tcg_gen_exit_tb((tcg_target_long)ctx->tb + 1);
        tcg_gen_exit_tb((uintptr_t)ctx->tb + 1);

        return EXIT_GOTO_TB;
    } else {
@@ -1629,7 +1629,7 @@ static ExitStatus gen_call_pal(DisasContext *ctx, int palcode)
           we change the PAL base register.  */
        if (!ctx->singlestep_enabled && !(ctx->tb->cflags & CF_LAST_IO)) {
            tcg_gen_goto_tb(0);
            tcg_gen_exit_tb((tcg_target_long)ctx->tb);
            tcg_gen_exit_tb((uintptr_t)ctx->tb);
            return EXIT_GOTO_TB;
        }

+1 −1
Original line number Diff line number Diff line
@@ -3356,7 +3356,7 @@ static inline void gen_goto_tb(DisasContext *s, int n, uint32_t dest)
    if ((tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK)) {
        tcg_gen_goto_tb(n);
        gen_set_pc_im(dest);
        tcg_gen_exit_tb((tcg_target_long)tb + n);
        tcg_gen_exit_tb((uintptr_t)tb + n);
    } else {
        gen_set_pc_im(dest);
        tcg_gen_exit_tb(0);
+1 −1
Original line number Diff line number Diff line
@@ -558,7 +558,7 @@ static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest)
    if ((tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK)) {
        tcg_gen_goto_tb(n);
        tcg_gen_movi_tl(env_pc, dest);
                tcg_gen_exit_tb((tcg_target_long)tb + n);
                tcg_gen_exit_tb((uintptr_t)tb + n);
    } else {
        tcg_gen_movi_tl(env_pc, dest);
        tcg_gen_exit_tb(0);
+1 −1
Original line number Diff line number Diff line
@@ -2413,7 +2413,7 @@ static inline void gen_goto_tb(DisasContext *s, int tb_num, target_ulong eip)
        /* jump to same page: we can use a direct jump */
        tcg_gen_goto_tb(tb_num);
        gen_jmp_im(eip);
        tcg_gen_exit_tb((tcg_target_long)tb + tb_num);
        tcg_gen_exit_tb((uintptr_t)tb + tb_num);
    } else {
        /* jump to another page: currently not optimized */
        gen_jmp_im(eip);
Loading