[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 03/10] target/sparc: Move sparc_restore_state_to_opc() to cpu
From: |
Peter Maydell |
Subject: |
Re: [PATCH 03/10] target/sparc: Move sparc_restore_state_to_opc() to cpu.c |
Date: |
Fri, 15 Nov 2024 15:42:42 +0000 |
On Fri, 15 Nov 2024 at 15:22, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Most targets define their restore_state_to_opc() handler in cpu.c.
> In order to keep SPARC aligned, move sparc_restore_state_to_opc()
> from translate.c to cpu.c.
>
> Suggested-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> target/sparc/cpu.h | 11 ++++++++---
> target/sparc/cpu.c | 23 +++++++++++++++++++++++
> target/sparc/translate.c | 32 --------------------------------
> 3 files changed, 31 insertions(+), 35 deletions(-)
>
> diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h
> index f517e5a383..bcb3566a92 100644
> --- a/target/sparc/cpu.h
> +++ b/target/sparc/cpu.h
> @@ -607,12 +607,17 @@ int sparc_cpu_memory_rw_debug(CPUState *cpu, vaddr addr,
> uint8_t *buf, int len, bool is_write);
> #endif
>
> +/* Dynamic PC, must exit to main loop. */
> +#define DYNAMIC_PC 1
> +/* Dynamic PC, one of two values according to jump_pc[T2]. */
> +#define JUMP_PC 2
> +/* Dynamic PC, may lookup next TB. */
> +#define DYNAMIC_PC_LOOKUP 3
> +
> +#define DISAS_EXIT DISAS_TARGET_0
Why move the definition of DISAS_EXIT ?
sparc_restore_state_to_opc() doesn't use it, and
the DISAS_ constants are a translate-time-only concept.
Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
- [PATCH 00/10] accel/tcg: API prototype cleanups, Philippe Mathieu-Daudé, 2024/11/15
- [PATCH 01/10] target/mips: Drop left-over comment about Jazz machine, Philippe Mathieu-Daudé, 2024/11/15
- [PATCH 02/10] target/loongarch: Declare loongarch_cpu_dump_state() locally, Philippe Mathieu-Daudé, 2024/11/15
- [PATCH 03/10] target/sparc: Move sparc_restore_state_to_opc() to cpu.c, Philippe Mathieu-Daudé, 2024/11/15
- [PATCH 04/10] accel/tcg: Ensure frontends define restore_state_to_opc handler, Philippe Mathieu-Daudé, 2024/11/15
- [PATCH 06/10] accel/tcg: Remove cpu_unwind_state_data() unused CPUState argument, Philippe Mathieu-Daudé, 2024/11/15
- [PATCH 05/10] accel/tcg: Move cpu_unwind_state_data() declaration, Philippe Mathieu-Daudé, 2024/11/15
- [PATCH 07/10] accel/tcg: Reduce log_pc() declaration scope, Philippe Mathieu-Daudé, 2024/11/15