From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 6F1EE3851C27 for ; Tue, 1 Nov 2022 16:27:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6F1EE3851C27 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 232BC34101B; Tue, 1 Nov 2022 16:27:32 +0000 (UTC) From: Mike Frysinger 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 Message-Id: <20221101151310.25593-1-vapier@gentoo.org> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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