target: e2k: Jump to ctpr_addr if ctpr is return.
This commit is contained in:
parent
c81e20732d
commit
06e789a573
|
@ -39,7 +39,7 @@ static inline void restore_proc_chain_info(CPUE2KState *env, uint64_t buf[4])
|
|||
|
||||
e2k_state_cr1_hi_set(env, buf[3]);
|
||||
e2k_state_cr1_lo_set(env, buf[2]);
|
||||
env->cr0_hi = buf[1];
|
||||
env->cr0_hi = buf[1]; // FIXME: is it necessary to restore ip?
|
||||
env->cr0_lo = buf[0];
|
||||
|
||||
env->wd.psize = env->cr1.wpsz * 2;
|
||||
|
|
|
@ -233,7 +233,6 @@ static inline void gen_goto_ctpr_disp(TCGv_i64 ctpr)
|
|||
|
||||
tcg_gen_extract_i64(t0, ctpr, CTPR_BASE_OFF, CTPR_BASE_LEN);
|
||||
tcg_gen_trunc_i64_tl(t1, t0);
|
||||
// FIXME: save state here?
|
||||
tcg_gen_mov_tl(e2k_cs.pc, t1);
|
||||
tcg_gen_lookup_and_goto_ptr();
|
||||
|
||||
|
@ -366,12 +365,11 @@ static inline void do_branch(DisasContext *ctx, target_ulong pc_next)
|
|||
// TODO: ldisp, sdisp
|
||||
e2k_gen_exception(0);
|
||||
|
||||
gen_set_label(l0);
|
||||
gen_goto_ctpr_disp(ctx->ct.u.ctpr);
|
||||
|
||||
gen_set_label(l1);
|
||||
gen_helper_return(cpu_env);
|
||||
tcg_gen_lookup_and_goto_ptr();
|
||||
|
||||
gen_set_label(l0);
|
||||
gen_goto_ctpr_disp(ctx->ct.u.ctpr);
|
||||
break;
|
||||
}
|
||||
case CT_CALL: {
|
||||
|
|
Loading…
Reference in New Issue