public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: cgen@sourceware.org
Subject: [PATCH] sim-cpu: move cpu_data inside arch-specific cpu state
Date: Tue,  1 Nov 2022 20:58:10 +0545	[thread overview]
Message-ID: <20221101151310.25593-1-vapier@gentoo.org> (raw)

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


                 reply	other threads:[~2022-11-01 16:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221101151310.25593-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=cgen@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).