mirror of https://github.com/xqemu/xqemu.git
target/arm: Move ss check to init_disas_context
We can check for single-step just once. Reviewed-by: Emilio G. Cota <cota@braap.org> Reviewed-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
dcc3a21209
commit
f7708456aa
|
@ -11883,6 +11883,11 @@ static int arm_tr_init_disas_context(DisasContextBase *dcbase,
|
||||||
dc->next_page_start =
|
dc->next_page_start =
|
||||||
(dc->base.pc_first & TARGET_PAGE_MASK) + TARGET_PAGE_SIZE;
|
(dc->base.pc_first & TARGET_PAGE_MASK) + TARGET_PAGE_SIZE;
|
||||||
|
|
||||||
|
/* If architectural single step active, limit to 1. */
|
||||||
|
if (is_singlestepping(dc)) {
|
||||||
|
max_insns = 1;
|
||||||
|
}
|
||||||
|
|
||||||
cpu_F0s = tcg_temp_new_i32();
|
cpu_F0s = tcg_temp_new_i32();
|
||||||
cpu_F1s = tcg_temp_new_i32();
|
cpu_F1s = tcg_temp_new_i32();
|
||||||
cpu_F0d = tcg_temp_new_i64();
|
cpu_F0d = tcg_temp_new_i64();
|
||||||
|
@ -12037,10 +12042,8 @@ static void arm_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu)
|
||||||
* Also stop translation when a page boundary is reached. This
|
* Also stop translation when a page boundary is reached. This
|
||||||
* ensures prefetch aborts occur at the right place. */
|
* ensures prefetch aborts occur at the right place. */
|
||||||
|
|
||||||
if (is_singlestepping(dc)) {
|
if (dc->pc >= dc->next_page_start ||
|
||||||
dc->base.is_jmp = DISAS_TOO_MANY;
|
(dc->pc >= dc->next_page_start - 3 &&
|
||||||
} else if ((dc->pc >= dc->next_page_start) ||
|
|
||||||
((dc->pc >= dc->next_page_start - 3) &&
|
|
||||||
insn_crosses_page(env, dc))) {
|
insn_crosses_page(env, dc))) {
|
||||||
/* We want to stop the TB if the next insn starts in a new page,
|
/* We want to stop the TB if the next insn starts in a new page,
|
||||||
* or if it spans between this page and the next. This means that
|
* or if it spans between this page and the next. This means that
|
||||||
|
|
Loading…
Reference in New Issue