[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 10/23] target/ppc: Move page crossing check to ppc_tr_tran
From: |
David Gibson |
Subject: |
Re: [PATCH v5 10/23] target/ppc: Move page crossing check to ppc_tr_translate_insn |
Date: |
Tue, 18 May 2021 10:23:07 +1000 |
On Mon, May 17, 2021 at 05:50:12PM -0300, matheus.ferst@eldorado.org.br wrote:
> 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>
Applied to ppc-for-6.1, thanks.
> ---
> 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 dc0f5fafc2..b1873d2dcc 100644
> --- a/target/ppc/translate.c
> +++ b/target/ppc/translate.c
> @@ -9060,9 +9060,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);
> }
> }
>
> @@ -9117,6 +9114,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);
> }
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- Re: [PATCH v5 05/23] target/ppc: Move single-step check to ppc_tr_tb_stop, (continued)
- [PATCH v5 06/23] target/ppc: Tidy exception vs exit_tb, matheus . ferst, 2021/05/17
- [PATCH v5 07/23] target/ppc: Mark helper_raise_exception* as noreturn, matheus . ferst, 2021/05/17
- [PATCH v5 08/23] target/ppc: Use translator_loop_temp_check, matheus . ferst, 2021/05/17
- [PATCH v5 09/23] target/ppc: Introduce macros to check isa extensions, matheus . ferst, 2021/05/17
- [PATCH v5 10/23] target/ppc: Move page crossing check to ppc_tr_translate_insn, matheus . ferst, 2021/05/17
- Re: [PATCH v5 10/23] target/ppc: Move page crossing check to ppc_tr_translate_insn,
David Gibson <=
- [PATCH v5 11/23] target/ppc: Add infrastructure for prefixed insns, matheus . ferst, 2021/05/17
- [PATCH v5 12/23] target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI, matheus . ferst, 2021/05/17
- [PATCH v5 13/23] target/ppc: Implement PNOP, matheus . ferst, 2021/05/17
- [PATCH v5 14/23] TCG: add tcg_constant_tl, matheus . ferst, 2021/05/17
- [PATCH v5 15/23] target/ppc: Move D/DS/X-form integer loads to decodetree, matheus . ferst, 2021/05/17