[PATCH] sim-cpu: move cpu_data inside arch-specific cpu state
Mike Frysinger via Cgen <[email protected]> Tue, 1 Nov 2022 20:58:10 +0545
| Newsgroups | gmane.comp.tools.cgen.devel |
|---|---|
| Message-ID | <[email protected]> |
The cgen ports store their data inside sim_cpu which, currently, is
defined uniquely for every sim arch port. We're changing that in the
sim world so that there is a single common sim_cpu, but this requires
moving the arch-specific data (including this cgen data) into a new
struct that is accessed via the common sim_cpu structure.
That is all hidden behind a new @ARCH@_SIM_CPU macro, so add that call
to the CPU_CGEN_HW macro that is generated here.
---
NB: The GNU Sim patch series is under review here:
https://sourceware.org/pipermail/gdb-patches/2022-November/193293.html
sim-cpu.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sim-cpu.scm b/sim-cpu.scm
index 275a9002c749..dc5b4ab4b037 100644
--- a/sim-cpu.scm
+++ b/sim-cpu.scm
@@ -84,7 +84,7 @@ typedef "
(current-hw-list))
)
" } hardware;\n"
- "#define CPU_CGEN_HW(cpu) (& (cpu)->cpu_data.hardware)\n"
+ "#define CPU_CGEN_HW(cpu) (& @ARCH@_SIM_CPU (cpu)->cpu_data.hardware)\n"
;" /* CPU profiling state information. */\n"
;" struct {\n"
;(string-list-map (lambda (hw) (send hw 'gen-profile-decl))
--
2.37.3