public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] sim: msp430: move arch-specific settings to internal header
@ 2022-12-23 13:39 Michael Frysinger
0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2022-12-23 13:39 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=dcd1a4d15acf510952ab7f188c14ae4f13fdb511
commit dcd1a4d15acf510952ab7f188c14ae4f13fdb511
Author: Mike Frysinger <vapier@gentoo.org>
Date: Thu Dec 22 22:47:10 2022 -0500
sim: msp430: move arch-specific settings to internal header
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.
Diff:
---
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 a13a0fe044a..d402be77eb4 100644
--- a/sim/msp430/msp430-sim.c
+++ b/sim/msp430/msp430-sim.c
@@ -30,8 +30,10 @@
#include <assert.h>
#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 96af91d4416..e0933e58d1d 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 5603d411df7..92fce3cfbb9 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_ */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-23 13:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-23 13:39 [binutils-gdb] sim: msp430: move arch-specific settings to internal header Michael 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).