[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 24/30] target/ppc: Move page crossing check to ppc_tr_translat
From: |
Richard Henderson |
Subject: |
[PATCH v3 24/30] target/ppc: Move page crossing check to ppc_tr_translate_insn |
Date: |
Thu, 29 Apr 2021 18:15:37 -0700 |
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>
---
target/ppc/translate.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index 65848463ea..d782a13d27 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -8019,9 +8019,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);
}
}
@@ -8098,6 +8095,11 @@ static void ppc_tr_translate_insn(DisasContextBase
*dcbase, CPUState *cs)
handler->count++;
#endif
+ /* End the TB when crossing a page boundary. */
+ if (ctx->base.is_jmp == DISAS_NEXT && !(pc & ~TARGET_PAGE_MASK)) {
+ ctx->base.is_jmp = DISAS_TOO_MANY;
+ }
+
translator_loop_temp_check(&ctx->base);
}
--
2.25.1
- [PATCH v3 11/30] target/ppc: Introduce DISAS_{EXIT,CHAIN}{,_UPDATE}, (continued)
- [PATCH v3 11/30] target/ppc: Introduce DISAS_{EXIT,CHAIN}{,_UPDATE}, Richard Henderson, 2021/04/29
- [PATCH v3 17/30] target/ppc: Remove DisasContext.exception, Richard Henderson, 2021/04/29
- [PATCH v3 22/30] target/ppc: Introduce macros to check isa extensions, Richard Henderson, 2021/04/29
- [PATCH v3 18/30] target/ppc: Move single-step check to ppc_tr_tb_stop, Richard Henderson, 2021/04/29
- [PATCH v3 20/30] target/ppc: Mark helper_raise_exception* as noreturn, Richard Henderson, 2021/04/29
- [PATCH v3 07/30] target/ppc: Move DISAS_NORETURN setting into gen_exception*, Richard Henderson, 2021/04/29
- [PATCH v3 23/30] target/ppc: Add infrastructure for prefixed insns, Richard Henderson, 2021/04/29
- [PATCH v3 21/30] target/ppc: Use translator_loop_temp_check, Richard Henderson, 2021/04/29
- [PATCH v3 19/30] target/ppc: Tidy exception vs exit_tb, Richard Henderson, 2021/04/29
- [PATCH v3 24/30] target/ppc: Move page crossing check to ppc_tr_translate_insn,
Richard Henderson <=
- [PATCH v3 28/30] target/ppc: Implement prefixed integer load instructions, Richard Henderson, 2021/04/29
- [PATCH v3 29/30] target/ppc: Move D/DS/X-form integer stores to decodetree, Richard Henderson, 2021/04/29
- [PATCH v3 27/30] target/ppc: Move D/DS/X-form integer loads to decodetree, Richard Henderson, 2021/04/29
- [PATCH v3 25/30] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI, Richard Henderson, 2021/04/29