public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] sim-cpu: move cpu_data inside arch-specific cpu state
@ 2022-11-01 15:13 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2022-11-01 15:13 UTC (permalink / raw)
  To: cgen

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-01 16:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-01 15:13 [PATCH] sim-cpu: move cpu_data inside arch-specific cpu state Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).