On Fri, 15 Nov 2024 at 15:22, Philippe Mathieu-Daudé <phi...@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.hender...@linaro.org> > Signed-off-by: Philippe Mathieu-Daudé <phi...@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.mayd...@linaro.org> thanks -- PMM