From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id SJ/aC+FFpWMfsgcAWB0awg (envelope-from ) for ; Fri, 23 Dec 2022 01:08:33 -0500 Received: by simark.ca (Postfix, from userid 112) id 2E5671E222; Fri, 23 Dec 2022 01:08:33 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=vk0wcJMF; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DC5E51E110 for ; Fri, 23 Dec 2022 01:08:32 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6A4F53850F31 for ; Fri, 23 Dec 2022 06:08:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A4F53850F31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1671775711; bh=aAggQRwS2qCgi/NNQvs/UqjlvlhZlVPtJ2rOi6331DU=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=vk0wcJMFTJRv+hgzi9vZpjWEjSByn1B9q8qD6E2tgKVAAX+zt6cyErKOykQorv5gO 0DLatPV8pumgVgIgUi7Y4E0rFBaYbavvR4INpaSgscgmrRavSf3l5PO7j5kJp7lRMu kRIftqMBVrnW0M/cvUDmSxLtsTUoVkziuNIEd8kA= Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id AE2BF385B52F for ; Fri, 23 Dec 2022 06:07:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AE2BF385B52F Received: by smtp.gentoo.org (Postfix, from userid 559) id 461DE3411D4; Fri, 23 Dec 2022 06:07:32 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH 07/20] sim: msp430: move arch-specific settings to internal header Date: Fri, 23 Dec 2022 01:07:00 -0500 Message-Id: <20221223060713.28821-8-vapier@gentoo.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221223060713.28821-1-vapier@gentoo.org> References: <20221223060713.28821-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so drop the msp430-sim.h include and move it to the few files that actually need it. While we're here, drop redundant includes from sim-main.h: * sim-config.h & sim-types.h included by sim-basics.h already * sim-engine.h included by sim-base.h already And move sim-options.h to the one file that needs it. --- sim/msp430/msp430-sim.c | 2 ++ sim/msp430/msp430-sim.h | 2 ++ sim/msp430/sim-main.h | 8 -------- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/sim/msp430/msp430-sim.c b/sim/msp430/msp430-sim.c index a13a0fe044a5..d402be77eb40 100644 --- a/sim/msp430/msp430-sim.c +++ b/sim/msp430/msp430-sim.c @@ -30,8 +30,10 @@ #include #include "opcode/msp430-decode.h" #include "sim-main.h" +#include "sim-options.h" #include "sim-signal.h" #include "sim-syscall.h" +#include "msp430-sim.h" static sim_cia msp430_pc_fetch (SIM_CPU *cpu) diff --git a/sim/msp430/msp430-sim.h b/sim/msp430/msp430-sim.h index 96af91d44163..e0933e58d1df 100644 --- a/sim/msp430/msp430-sim.h +++ b/sim/msp430/msp430-sim.h @@ -46,4 +46,6 @@ struct msp430_cpu_state #define HWMULT(sd, field) MSP430_SIM_CPU (STATE_CPU (sd, 0))->field +#define MSP430_SIM_CPU(cpu) ((struct msp430_cpu_state *) CPU_ARCH_DATA (cpu)) + #endif diff --git a/sim/msp430/sim-main.h b/sim/msp430/sim-main.h index 5603d411df7b..92fce3cfbb9d 100644 --- a/sim/msp430/sim-main.h +++ b/sim/msp430/sim-main.h @@ -22,14 +22,6 @@ #define _MSP430_MAIN_SIM_H_ #include "sim-basics.h" -#include "msp430-sim.h" #include "sim-base.h" -#define MSP430_SIM_CPU(cpu) ((struct msp430_cpu_state *) CPU_ARCH_DATA (cpu)) - -#include "sim-config.h" -#include "sim-types.h" -#include "sim-engine.h" -#include "sim-options.h" - #endif /* _MSP430_MAIN_SIM_H_ */ -- 2.39.0