summaryrefslogtreecommitdiffstats
path: root/target/ppc
diff options
context:
space:
mode:
authorRichard Henderson2021-06-01 21:35:16 +0200
committerDavid Gibson2021-06-03 10:10:31 +0200
commit64a0f6448c6b4454c35e5a73e8be7dee0f852ba5 (patch)
tree9145f954403082b7edd641adb231cb467cb103c3 /target/ppc
parenttarget/ppc: Introduce macros to check isa extensions (diff)
downloadqemu-64a0f6448c6b4454c35e5a73e8be7dee0f852ba5.tar.gz
qemu-64a0f6448c6b4454c35e5a73e8be7dee0f852ba5.tar.xz
qemu-64a0f6448c6b4454c35e5a73e8be7dee0f852ba5.zip
target/ppc: Move page crossing check to ppc_tr_translate_insn
With prefixed instructions, the number of instructions remaining until the page crossing is no longer constant. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210601193528.2533031-3-matheus.ferst@eldorado.org.br> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc')
-rw-r--r--target/ppc/translate.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index 11fd3342a0..d2c9fd9dd7 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -8821,9 +8821,6 @@ static void ppc_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs)
if (ctx->singlestep_enabled & (CPU_SINGLE_STEP | GDBSTUB_SINGLE_STEP)) {
ctx->base.max_insns = 1;
- } else {
- int bound = -(ctx->base.pc_first | TARGET_PAGE_MASK) / 4;
- ctx->base.max_insns = MIN(ctx->base.max_insns, bound);
}
}
@@ -8874,6 +8871,12 @@ static void ppc_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs)
gen_invalid(ctx);
}
+ /* End the TB when crossing a page boundary. */
+ if (ctx->base.is_jmp == DISAS_NEXT &&
+ !(ctx->base.pc_next & ~TARGET_PAGE_MASK)) {
+ ctx->base.is_jmp = DISAS_TOO_MANY;
+ }
+
translator_loop_temp_check(&ctx->base);
}