mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/rth/tags/tcg-next-pull-request' into staging
tcg-next queue # gpg: Signature made Sat 02 Jun 2018 00:12:42 BST # gpg: using RSA key 64DF38E8AF7E215F # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * remotes/rth/tags/tcg-next-pull-request: tcg: Pass tb and index to tcg_gen_exit_tb separately Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
@@ -52,7 +52,7 @@ static inline void gen_tb_end(TranslationBlock *tb, int num_insns)
|
||||
}
|
||||
|
||||
gen_set_label(tcg_ctx->exitreq_label);
|
||||
tcg_gen_exit_tb((uintptr_t)tb + TB_EXIT_REQUESTED);
|
||||
tcg_gen_exit_tb(tb, TB_EXIT_REQUESTED);
|
||||
}
|
||||
|
||||
static inline void gen_io_start(void)
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -383,7 +383,7 @@ static inline void gen_goto_tb(DisasContext *s, int n, uint64_t dest)
|
||||
if (use_goto_tb(s, n, dest)) {
|
||||
tcg_gen_goto_tb(n);
|
||||
gen_a64_set_pc_im(dest);
|
||||
tcg_gen_exit_tb((intptr_t)tb + n);
|
||||
tcg_gen_exit_tb(tb, n);
|
||||
s->base.is_jmp = DISAS_NORETURN;
|
||||
} else {
|
||||
gen_a64_set_pc_im(dest);
|
||||
@@ -13883,7 +13883,7 @@ static void aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
|
||||
gen_a64_set_pc_im(dc->pc);
|
||||
/* fall through */
|
||||
case DISAS_EXIT:
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
break;
|
||||
case DISAS_JUMP:
|
||||
tcg_gen_lookup_and_goto_ptr();
|
||||
@@ -13912,7 +13912,7 @@ static void aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
|
||||
/* The helper doesn't necessarily throw an exception, but we
|
||||
* must go back to the main loop to check for interrupts anyway.
|
||||
*/
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -995,7 +995,7 @@ static inline void gen_bx_excret_final_code(DisasContext *s)
|
||||
if (is_singlestepping(s)) {
|
||||
gen_singlestep_exception(s);
|
||||
} else {
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
}
|
||||
gen_set_label(excret_label);
|
||||
/* Yes: this is an exception return.
|
||||
@@ -4263,7 +4263,7 @@ static void gen_goto_tb(DisasContext *s, int n, target_ulong dest)
|
||||
if (use_goto_tb(s, dest)) {
|
||||
tcg_gen_goto_tb(n);
|
||||
gen_set_pc_im(s, dest);
|
||||
tcg_gen_exit_tb((uintptr_t)s->base.tb + n);
|
||||
tcg_gen_exit_tb(s->base.tb, n);
|
||||
} else {
|
||||
gen_set_pc_im(s, dest);
|
||||
gen_goto_ptr();
|
||||
@@ -12699,7 +12699,7 @@ static void arm_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
|
||||
/* fall through */
|
||||
default:
|
||||
/* indicate that the hash table must be used to find the next TB */
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
break;
|
||||
case DISAS_NORETURN:
|
||||
/* nothing more to generate */
|
||||
@@ -12714,7 +12714,7 @@ static void arm_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
|
||||
/* The helper doesn't necessarily throw an exception, but we
|
||||
* must go back to the main loop to check for interrupts anyway.
|
||||
*/
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
break;
|
||||
}
|
||||
case DISAS_WFE:
|
||||
|
||||
@@ -540,10 +540,10 @@ static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest)
|
||||
if (use_goto_tb(dc, dest)) {
|
||||
tcg_gen_goto_tb(n);
|
||||
tcg_gen_movi_tl(env_pc, dest);
|
||||
tcg_gen_exit_tb((uintptr_t)dc->tb + n);
|
||||
tcg_gen_exit_tb(dc->tb, n);
|
||||
} else {
|
||||
tcg_gen_movi_tl(env_pc, dest);
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3276,7 +3276,7 @@ void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb)
|
||||
case DISAS_UPDATE:
|
||||
/* indicate that the hash table must be used
|
||||
to find the next TB */
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
break;
|
||||
case DISAS_SWI:
|
||||
case DISAS_TB_JUMP:
|
||||
|
||||
@@ -779,7 +779,7 @@ static void gen_goto_tb(DisasContext *ctx, int which,
|
||||
tcg_gen_goto_tb(which);
|
||||
tcg_gen_movi_reg(cpu_iaoq_f, f);
|
||||
tcg_gen_movi_reg(cpu_iaoq_b, b);
|
||||
tcg_gen_exit_tb((uintptr_t)ctx->base.tb + which);
|
||||
tcg_gen_exit_tb(ctx->base.tb, which);
|
||||
} else {
|
||||
copy_iaoq_entry(cpu_iaoq_f, f, cpu_iaoq_b);
|
||||
copy_iaoq_entry(cpu_iaoq_b, b, ctx->iaoq_n_var);
|
||||
@@ -2303,7 +2303,7 @@ static DisasJumpType trans_rfi(DisasContext *ctx, uint32_t insn,
|
||||
if (ctx->base.singlestep_enabled) {
|
||||
gen_excp_1(EXCP_DEBUG);
|
||||
} else {
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
}
|
||||
|
||||
/* Exit the TB to recognize new interrupts. */
|
||||
@@ -4844,7 +4844,7 @@ static void hppa_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs)
|
||||
if (ctx->base.singlestep_enabled) {
|
||||
gen_excp_1(EXCP_DEBUG);
|
||||
} else if (is_jmp == DISAS_IAQ_N_STALE_EXIT) {
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
} else {
|
||||
tcg_gen_lookup_and_goto_ptr();
|
||||
}
|
||||
|
||||
@@ -2193,7 +2193,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((uintptr_t)s->base.tb + tb_num);
|
||||
tcg_gen_exit_tb(s->base.tb, tb_num);
|
||||
s->base.is_jmp = DISAS_NORETURN;
|
||||
} else {
|
||||
/* jump to another page */
|
||||
@@ -2572,13 +2572,13 @@ do_gen_eob_worker(DisasContext *s, bool inhibit, bool recheck_tf, bool jr)
|
||||
gen_helper_debug(cpu_env);
|
||||
} else if (recheck_tf) {
|
||||
gen_helper_rechecking_single_step(cpu_env);
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
} else if (s->tf) {
|
||||
gen_helper_single_step(cpu_env);
|
||||
} else if (jr) {
|
||||
tcg_gen_lookup_and_goto_ptr();
|
||||
} else {
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
}
|
||||
s->base.is_jmp = DISAS_NORETURN;
|
||||
}
|
||||
@@ -7402,7 +7402,7 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu)
|
||||
gen_jmp_im(pc_start - s->cs_base);
|
||||
gen_helper_vmrun(cpu_env, tcg_const_i32(s->aflag - 1),
|
||||
tcg_const_i32(s->pc - pc_start));
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
s->base.is_jmp = DISAS_NORETURN;
|
||||
break;
|
||||
|
||||
|
||||
@@ -159,13 +159,13 @@ static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest)
|
||||
if (use_goto_tb(dc, dest)) {
|
||||
tcg_gen_goto_tb(n);
|
||||
tcg_gen_movi_tl(cpu_pc, dest);
|
||||
tcg_gen_exit_tb((uintptr_t)dc->tb + n);
|
||||
tcg_gen_exit_tb(dc->tb, n);
|
||||
} else {
|
||||
tcg_gen_movi_tl(cpu_pc, dest);
|
||||
if (dc->singlestep_enabled) {
|
||||
t_gen_raise_exception(dc, EXCP_DEBUG);
|
||||
}
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1137,7 +1137,7 @@ void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb)
|
||||
case DISAS_UPDATE:
|
||||
/* indicate that the hash table must be used
|
||||
to find the next TB */
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
break;
|
||||
case DISAS_TB_JUMP:
|
||||
/* nothing more to generate */
|
||||
|
||||
@@ -1491,10 +1491,10 @@ static void gen_jmp_tb(DisasContext *s, int n, uint32_t dest)
|
||||
} else if (use_goto_tb(s, dest)) {
|
||||
tcg_gen_goto_tb(n);
|
||||
tcg_gen_movi_i32(QREG_PC, dest);
|
||||
tcg_gen_exit_tb((uintptr_t)s->tb + n);
|
||||
tcg_gen_exit_tb(s->tb, n);
|
||||
} else {
|
||||
gen_jmp_im(s, dest);
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
}
|
||||
s->is_jmp = DISAS_TB_JUMP;
|
||||
}
|
||||
@@ -6147,7 +6147,7 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb)
|
||||
case DISAS_UPDATE:
|
||||
update_cc_op(dc);
|
||||
/* indicate that the hash table must be used to find the next TB */
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
break;
|
||||
case DISAS_TB_JUMP:
|
||||
/* nothing more to generate */
|
||||
|
||||
@@ -143,10 +143,10 @@ static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest)
|
||||
if (use_goto_tb(dc, dest)) {
|
||||
tcg_gen_goto_tb(n);
|
||||
tcg_gen_movi_i64(cpu_SR[SR_PC], dest);
|
||||
tcg_gen_exit_tb((uintptr_t)dc->tb + n);
|
||||
tcg_gen_exit_tb(dc->tb, n);
|
||||
} else {
|
||||
tcg_gen_movi_i64(cpu_SR[SR_PC], dest);
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1766,7 +1766,7 @@ void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb)
|
||||
case DISAS_UPDATE:
|
||||
/* indicate that the hash table must be used
|
||||
to find the next TB */
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
break;
|
||||
case DISAS_TB_JUMP:
|
||||
/* nothing more to generate */
|
||||
|
||||
@@ -4291,7 +4291,7 @@ static inline void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest)
|
||||
if (use_goto_tb(ctx, dest)) {
|
||||
tcg_gen_goto_tb(n);
|
||||
gen_save_pc(dest);
|
||||
tcg_gen_exit_tb((uintptr_t)ctx->base.tb + n);
|
||||
tcg_gen_exit_tb(ctx->base.tb, n);
|
||||
} else {
|
||||
gen_save_pc(dest);
|
||||
if (ctx->base.singlestep_enabled) {
|
||||
@@ -20344,7 +20344,7 @@ static void mips_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs)
|
||||
gen_goto_tb(ctx, 0, ctx->base.pc_next);
|
||||
break;
|
||||
case DISAS_EXIT:
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
break;
|
||||
case DISAS_NORETURN:
|
||||
break;
|
||||
|
||||
@@ -132,13 +132,13 @@ static inline void gen_goto_tb(CPUMoxieState *env, DisasContext *ctx,
|
||||
if (use_goto_tb(ctx, dest)) {
|
||||
tcg_gen_goto_tb(n);
|
||||
tcg_gen_movi_i32(cpu_pc, dest);
|
||||
tcg_gen_exit_tb((uintptr_t)ctx->tb + n);
|
||||
tcg_gen_exit_tb(ctx->tb, n);
|
||||
} else {
|
||||
tcg_gen_movi_i32(cpu_pc, dest);
|
||||
if (ctx->singlestep_enabled) {
|
||||
gen_helper_debug(cpu_env);
|
||||
}
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ static int decode_opc(MoxieCPU *cpu, DisasContext *ctx)
|
||||
tcg_temp_free_i32(t1);
|
||||
|
||||
/* Jump... */
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
|
||||
ctx->bstate = BS_BRANCH;
|
||||
}
|
||||
@@ -472,14 +472,14 @@ static int decode_opc(MoxieCPU *cpu, DisasContext *ctx)
|
||||
tcg_gen_mov_i32(cpu_pc, REG(fnreg));
|
||||
tcg_temp_free_i32(t1);
|
||||
tcg_temp_free_i32(t2);
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
ctx->bstate = BS_BRANCH;
|
||||
}
|
||||
break;
|
||||
case 0x1a: /* jmpa */
|
||||
{
|
||||
tcg_gen_movi_i32(cpu_pc, cpu_ldl_code(env, ctx->pc+2));
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
ctx->bstate = BS_BRANCH;
|
||||
length = 6;
|
||||
}
|
||||
@@ -584,7 +584,7 @@ static int decode_opc(MoxieCPU *cpu, DisasContext *ctx)
|
||||
{
|
||||
int reg = (opcode >> 4) & 0xf;
|
||||
tcg_gen_mov_i32(cpu_pc, REG(reg));
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
ctx->bstate = BS_BRANCH;
|
||||
}
|
||||
break;
|
||||
@@ -878,7 +878,7 @@ void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb)
|
||||
gen_goto_tb(env, &ctx, 0, ctx.pc);
|
||||
break;
|
||||
case BS_EXCP:
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
break;
|
||||
case BS_BRANCH:
|
||||
default:
|
||||
|
||||
@@ -171,10 +171,10 @@ static void gen_goto_tb(DisasContext *dc, int n, uint32_t dest)
|
||||
if (use_goto_tb(dc, dest)) {
|
||||
tcg_gen_goto_tb(n);
|
||||
tcg_gen_movi_tl(dc->cpu_R[R_PC], dest);
|
||||
tcg_gen_exit_tb((uintptr_t)tb + n);
|
||||
tcg_gen_exit_tb(tb, n);
|
||||
} else {
|
||||
tcg_gen_movi_tl(dc->cpu_R[R_PC], dest);
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -880,14 +880,14 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb)
|
||||
case DISAS_NEXT:
|
||||
/* Save the current PC back into the CPU register */
|
||||
tcg_gen_movi_tl(cpu_R[R_PC], dc->pc);
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
case DISAS_JUMP:
|
||||
case DISAS_UPDATE:
|
||||
/* The jump will already have updated the PC register */
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
break;
|
||||
|
||||
case DISAS_TB_JUMP:
|
||||
|
||||
@@ -183,13 +183,13 @@ static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest)
|
||||
if (use_goto_tb(dc, dest)) {
|
||||
tcg_gen_movi_tl(cpu_pc, dest);
|
||||
tcg_gen_goto_tb(n);
|
||||
tcg_gen_exit_tb((uintptr_t)dc->base.tb + n);
|
||||
tcg_gen_exit_tb(dc->base.tb, n);
|
||||
} else {
|
||||
tcg_gen_movi_tl(cpu_pc, dest);
|
||||
if (dc->base.singlestep_enabled) {
|
||||
gen_exception(dc, EXCP_DEBUG);
|
||||
}
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1473,7 +1473,7 @@ static void openrisc_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs)
|
||||
case DISAS_UPDATE:
|
||||
/* indicate that the hash table must be used
|
||||
to find the next TB */
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
|
||||
@@ -3422,7 +3422,7 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest)
|
||||
if (use_goto_tb(ctx, dest)) {
|
||||
tcg_gen_goto_tb(n);
|
||||
tcg_gen_movi_tl(cpu_nip, dest & ~3);
|
||||
tcg_gen_exit_tb((uintptr_t)ctx->base.tb + n);
|
||||
tcg_gen_exit_tb(ctx->base.tb, n);
|
||||
} else {
|
||||
tcg_gen_movi_tl(cpu_nip, dest & ~3);
|
||||
if (unlikely(ctx->singlestep_enabled)) {
|
||||
@@ -7410,7 +7410,7 @@ static void ppc_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs)
|
||||
gen_debug_exception(ctx);
|
||||
}
|
||||
/* Generate the return instruction */
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -129,13 +129,13 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest)
|
||||
/* chaining is only allowed when the jump is to the same page */
|
||||
tcg_gen_goto_tb(n);
|
||||
tcg_gen_movi_tl(cpu_pc, dest);
|
||||
tcg_gen_exit_tb((uintptr_t)ctx->base.tb + n);
|
||||
tcg_gen_exit_tb(ctx->base.tb, n);
|
||||
} else {
|
||||
tcg_gen_movi_tl(cpu_pc, dest);
|
||||
if (ctx->base.singlestep_enabled) {
|
||||
gen_exception_debug();
|
||||
} else {
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -548,7 +548,7 @@ static void gen_jalr(CPURISCVState *env, DisasContext *ctx, uint32_t opc,
|
||||
if (rd != 0) {
|
||||
tcg_gen_movi_tl(cpu_gpr[rd], ctx->pc_succ_insn);
|
||||
}
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
|
||||
if (misaligned) {
|
||||
gen_set_label(misaligned);
|
||||
@@ -1303,12 +1303,12 @@ static void gen_system(CPURISCVState *env, DisasContext *ctx, uint32_t opc,
|
||||
case 0x0: /* ECALL */
|
||||
/* always generates U-level ECALL, fixed in do_interrupt handler */
|
||||
generate_exception(ctx, RISCV_EXCP_U_ECALL);
|
||||
tcg_gen_exit_tb(0); /* no chaining */
|
||||
tcg_gen_exit_tb(NULL, 0); /* no chaining */
|
||||
ctx->base.is_jmp = DISAS_NORETURN;
|
||||
break;
|
||||
case 0x1: /* EBREAK */
|
||||
generate_exception(ctx, RISCV_EXCP_BREAKPOINT);
|
||||
tcg_gen_exit_tb(0); /* no chaining */
|
||||
tcg_gen_exit_tb(NULL, 0); /* no chaining */
|
||||
ctx->base.is_jmp = DISAS_NORETURN;
|
||||
break;
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
@@ -1318,7 +1318,7 @@ static void gen_system(CPURISCVState *env, DisasContext *ctx, uint32_t opc,
|
||||
case 0x102: /* SRET */
|
||||
if (riscv_has_ext(env, RVS)) {
|
||||
gen_helper_sret(cpu_pc, cpu_env, cpu_pc);
|
||||
tcg_gen_exit_tb(0); /* no chaining */
|
||||
tcg_gen_exit_tb(NULL, 0); /* no chaining */
|
||||
ctx->base.is_jmp = DISAS_NORETURN;
|
||||
} else {
|
||||
gen_exception_illegal(ctx);
|
||||
@@ -1329,7 +1329,7 @@ static void gen_system(CPURISCVState *env, DisasContext *ctx, uint32_t opc,
|
||||
break;
|
||||
case 0x302: /* MRET */
|
||||
gen_helper_mret(cpu_pc, cpu_env, cpu_pc);
|
||||
tcg_gen_exit_tb(0); /* no chaining */
|
||||
tcg_gen_exit_tb(NULL, 0); /* no chaining */
|
||||
ctx->base.is_jmp = DISAS_NORETURN;
|
||||
break;
|
||||
case 0x7b2: /* DRET */
|
||||
@@ -1378,7 +1378,7 @@ static void gen_system(CPURISCVState *env, DisasContext *ctx, uint32_t opc,
|
||||
gen_set_gpr(rd, dest);
|
||||
/* end tb since we may be changing priv modes, to get mmu_index right */
|
||||
tcg_gen_movi_tl(cpu_pc, ctx->pc_succ_insn);
|
||||
tcg_gen_exit_tb(0); /* no chaining */
|
||||
tcg_gen_exit_tb(NULL, 0); /* no chaining */
|
||||
ctx->base.is_jmp = DISAS_NORETURN;
|
||||
break;
|
||||
}
|
||||
@@ -1771,7 +1771,7 @@ static void decode_RV32_64G(CPURISCVState *env, DisasContext *ctx)
|
||||
/* FENCE_I is a no-op in QEMU,
|
||||
* however we need to end the translation block */
|
||||
tcg_gen_movi_tl(cpu_pc, ctx->pc_succ_insn);
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
ctx->base.is_jmp = DISAS_NORETURN;
|
||||
} else {
|
||||
/* FENCE is a full memory barrier. */
|
||||
@@ -1872,7 +1872,7 @@ static void riscv_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
|
||||
if (ctx->base.singlestep_enabled) {
|
||||
gen_exception_debug();
|
||||
} else {
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
}
|
||||
break;
|
||||
case DISAS_NORETURN:
|
||||
|
||||
@@ -1159,7 +1159,7 @@ static DisasJumpType help_goto_direct(DisasContext *s, uint64_t dest)
|
||||
per_breaking_event(s);
|
||||
tcg_gen_goto_tb(0);
|
||||
tcg_gen_movi_i64(psw_addr, dest);
|
||||
tcg_gen_exit_tb((uintptr_t)s->base.tb);
|
||||
tcg_gen_exit_tb(s->base.tb, 0);
|
||||
return DISAS_GOTO_TB;
|
||||
} else {
|
||||
tcg_gen_movi_i64(psw_addr, dest);
|
||||
@@ -1220,14 +1220,14 @@ static DisasJumpType help_branch(DisasContext *s, DisasCompare *c,
|
||||
/* Branch not taken. */
|
||||
tcg_gen_goto_tb(0);
|
||||
tcg_gen_movi_i64(psw_addr, s->pc_tmp);
|
||||
tcg_gen_exit_tb((uintptr_t)s->base.tb + 0);
|
||||
tcg_gen_exit_tb(s->base.tb, 0);
|
||||
|
||||
/* Branch taken. */
|
||||
gen_set_label(lab);
|
||||
per_breaking_event(s);
|
||||
tcg_gen_goto_tb(1);
|
||||
tcg_gen_movi_i64(psw_addr, dest);
|
||||
tcg_gen_exit_tb((uintptr_t)s->base.tb + 1);
|
||||
tcg_gen_exit_tb(s->base.tb, 1);
|
||||
|
||||
ret = DISAS_GOTO_TB;
|
||||
} else {
|
||||
@@ -1250,7 +1250,7 @@ static DisasJumpType help_branch(DisasContext *s, DisasCompare *c,
|
||||
update_cc_op(s);
|
||||
tcg_gen_goto_tb(0);
|
||||
tcg_gen_movi_i64(psw_addr, s->pc_tmp);
|
||||
tcg_gen_exit_tb((uintptr_t)s->base.tb + 0);
|
||||
tcg_gen_exit_tb(s->base.tb, 0);
|
||||
|
||||
gen_set_label(lab);
|
||||
if (is_imm) {
|
||||
@@ -6240,7 +6240,7 @@ static void s390x_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs)
|
||||
gen_exception(EXCP_DEBUG);
|
||||
} else if (use_exit_tb(dc) ||
|
||||
dc->base.is_jmp == DISAS_PC_STALE_NOCHAIN) {
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
} else {
|
||||
tcg_gen_lookup_and_goto_ptr();
|
||||
}
|
||||
|
||||
@@ -242,13 +242,13 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest)
|
||||
if (use_goto_tb(ctx, dest)) {
|
||||
tcg_gen_goto_tb(n);
|
||||
tcg_gen_movi_i32(cpu_pc, dest);
|
||||
tcg_gen_exit_tb((uintptr_t)ctx->base.tb + n);
|
||||
tcg_gen_exit_tb(ctx->base.tb, n);
|
||||
} else {
|
||||
tcg_gen_movi_i32(cpu_pc, dest);
|
||||
if (ctx->base.singlestep_enabled) {
|
||||
gen_helper_debug(cpu_env);
|
||||
} else if (use_exit_tb(ctx)) {
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
} else {
|
||||
tcg_gen_lookup_and_goto_ptr();
|
||||
}
|
||||
@@ -266,7 +266,7 @@ static void gen_jump(DisasContext * ctx)
|
||||
if (ctx->base.singlestep_enabled) {
|
||||
gen_helper_debug(cpu_env);
|
||||
} else if (use_exit_tb(ctx)) {
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
} else {
|
||||
tcg_gen_lookup_and_goto_ptr();
|
||||
}
|
||||
@@ -2343,7 +2343,7 @@ static void sh4_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs)
|
||||
if (ctx->base.singlestep_enabled) {
|
||||
gen_helper_debug(cpu_env);
|
||||
} else {
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
}
|
||||
break;
|
||||
case DISAS_NEXT:
|
||||
|
||||
@@ -360,12 +360,12 @@ static inline void gen_goto_tb(DisasContext *s, int tb_num,
|
||||
tcg_gen_goto_tb(tb_num);
|
||||
tcg_gen_movi_tl(cpu_pc, pc);
|
||||
tcg_gen_movi_tl(cpu_npc, npc);
|
||||
tcg_gen_exit_tb((uintptr_t)s->base.tb + tb_num);
|
||||
tcg_gen_exit_tb(s->base.tb, tb_num);
|
||||
} else {
|
||||
/* jump to another page: currently not optimized */
|
||||
tcg_gen_movi_tl(cpu_pc, pc);
|
||||
tcg_gen_movi_tl(cpu_npc, npc);
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4329,7 +4329,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
|
||||
/* End TB to notice changed ASI. */
|
||||
save_state(dc);
|
||||
gen_op_next_insn();
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
dc->base.is_jmp = DISAS_NORETURN;
|
||||
break;
|
||||
case 0x6: /* V9 wrfprs */
|
||||
@@ -4338,7 +4338,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
|
||||
dc->fprs_dirty = 0;
|
||||
save_state(dc);
|
||||
gen_op_next_insn();
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
dc->base.is_jmp = DISAS_NORETURN;
|
||||
break;
|
||||
case 0xf: /* V9 sir, nop if user */
|
||||
@@ -4466,7 +4466,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
|
||||
dc->cc_op = CC_OP_FLAGS;
|
||||
save_state(dc);
|
||||
gen_op_next_insn();
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
dc->base.is_jmp = DISAS_NORETURN;
|
||||
#endif
|
||||
}
|
||||
@@ -4622,7 +4622,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
|
||||
hpstate));
|
||||
save_state(dc);
|
||||
gen_op_next_insn();
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
dc->base.is_jmp = DISAS_NORETURN;
|
||||
break;
|
||||
case 1: // htstate
|
||||
@@ -5793,7 +5793,7 @@ static bool sparc_tr_breakpoint_check(DisasContextBase *dcbase, CPUState *cs,
|
||||
save_state(dc);
|
||||
}
|
||||
gen_helper_debug(cpu_env);
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
dc->base.is_jmp = DISAS_NORETURN;
|
||||
/* update pc_next so that the current instruction is included in tb->size */
|
||||
dc->base.pc_next += 4;
|
||||
@@ -5832,7 +5832,7 @@ static void sparc_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs)
|
||||
tcg_gen_movi_tl(cpu_pc, dc->pc);
|
||||
}
|
||||
save_npc(dc);
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2362,7 +2362,7 @@ static void translate_one_bundle(DisasContext *dc, uint64_t bundle)
|
||||
tcg_temp_free_i64(next);
|
||||
}
|
||||
tcg_temp_free_i64(dc->jmp.dest);
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
dc->exit_tb = true;
|
||||
} else if (dc->atomic_excp != TILEGX_EXCP_NONE) {
|
||||
gen_exception(dc, dc->atomic_excp);
|
||||
@@ -2419,7 +2419,7 @@ void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb)
|
||||
|| tcg_op_buf_full()) {
|
||||
/* Ending the TB due to TB size or page boundary. Set PC. */
|
||||
tcg_gen_movi_tl(cpu_pc, dc->pc);
|
||||
tcg_gen_exit_tb(0);
|
||||
tcg_gen_exit_tb(NULL, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user