[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 19/31] target/ppc: Move page crossing check to ppc_tr_translat
From: |
matheus . ferst |
Subject: |
[PATCH v4 19/31] target/ppc: Move page crossing check to ppc_tr_translate_insn |
Date: |
Wed, 12 May 2021 15:54:29 -0300 |
From: Richard Henderson <richard.henderson@linaro.org>
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>
---
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 153c61e8ec..dec2ff1886 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -9251,9 +9251,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);
}
}
@@ -9308,6 +9305,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
- Re: [PATCH v4 10/31] target/ppc: Introduce gen_icount_io_start, (continued)
- [PATCH v4 11/31] target/ppc: Replace POWERPC_EXCP_STOP with DISAS_EXIT_UPDATE, matheus . ferst, 2021/05/12
- [PATCH v4 12/31] target/ppc: Replace POWERPC_EXCP_BRANCH with DISAS_NORETURN, matheus . ferst, 2021/05/12
- [PATCH v4 13/31] target/ppc: Remove DisasContext.exception, matheus . ferst, 2021/05/12
- [PATCH v4 14/31] target/ppc: Move single-step check to ppc_tr_tb_stop, matheus . ferst, 2021/05/12
- [PATCH v4 15/31] target/ppc: Tidy exception vs exit_tb, matheus . ferst, 2021/05/12
- [PATCH v4 16/31] target/ppc: Mark helper_raise_exception* as noreturn, matheus . ferst, 2021/05/12
- [PATCH v4 17/31] target/ppc: Use translator_loop_temp_check, matheus . ferst, 2021/05/12
- [PATCH v4 18/31] target/ppc: Introduce macros to check isa extensions, matheus . ferst, 2021/05/12
- [PATCH v4 19/31] target/ppc: Move page crossing check to ppc_tr_translate_insn,
matheus . ferst <=
- [PATCH v4 20/31] target/ppc: Add infrastructure for prefixed insns, matheus . ferst, 2021/05/12
- [PATCH v4 21/31] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI, matheus . ferst, 2021/05/12
- [PATCH v4 22/31] target/ppc: Implement PNOP, matheus . ferst, 2021/05/12
- [PATCH v4 23/31] TCG: add tcg_constant_tl, matheus . ferst, 2021/05/12
- [PATCH v4 24/31] target/ppc: Move D/DS/X-form integer loads to decodetree, matheus . ferst, 2021/05/12
- [PATCH v4 25/31] target/ppc: Implement prefixed integer load instructions, matheus . ferst, 2021/05/12
- [PATCH v4 26/31] target/ppc: Move D/DS/X-form integer stores to decodetree, matheus . ferst, 2021/05/12