qemu-devel
[Top][All Lists]
Advanced

[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: Richard Henderson
Subject: Re: [PATCH 03/10] target/sparc: Move sparc_restore_state_to_opc() to cpu.c
Date: Fri, 15 Nov 2024 09:17:38 -0800
User-agent: Mozilla Thunderbird

On 11/15/24 07:20, Philippe Mathieu-Daudé 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

Keep these out of cpu.h.
But frankly, moving the sparc_restore_state_to_opc to an "internal.h" kind of header is just as effective and keeps all of the private-to-translate.c things contained.

+
+#define DISAS_EXIT  DISAS_TARGET_0

Definitely shouldn't be moved.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]