aboutsummaryrefslogtreecommitdiff
path: root/sim/mn10300/sim-main.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-12-22 23:47:50 -0500
committerMike Frysinger <vapier@gentoo.org>2022-12-23 08:32:58 -0500
commit627bdb63949c1766d03ae16536bf9ea15e252c11 (patch)
tree000185d67ad15af275d07cd635f193cd93555857 /sim/mn10300/sim-main.h
parent7790fabeb76850df5ffa36577a8a5cf40541fc37 (diff)
downloadfsf-binutils-gdb-627bdb63949c1766d03ae16536bf9ea15e252c11.zip
fsf-binutils-gdb-627bdb63949c1766d03ae16536bf9ea15e252c11.tar.gz
fsf-binutils-gdb-627bdb63949c1766d03ae16536bf9ea15e252c11.tar.bz2
sim: mn10300: standardize the arch-specific settings a little
Rename mn10300_sim.h to mn10300-sim.h to match other ports, and move most of the arch-specific content out of sim-main.h to it. This isn't a big win though as we still have to include the header in sim-main.h due to the igen interface: it hardcodes including sim-main.h in its files. So until we can fix that, we have to keep bleeding these settings into the common codes. Also take the opportunity to purge a lot of unused headers from these. The local modules should already include the right headers, so there's no need to force everyone to pull them in. A lot of this is a hold over from the pre-igen days of this port.
Diffstat (limited to 'sim/mn10300/sim-main.h')
-rw-r--r--sim/mn10300/sim-main.h34
1 files changed, 7 insertions, 27 deletions
diff --git a/sim/mn10300/sim-main.h b/sim/mn10300/sim-main.h
index 77a7ba8..09887b5 100644
--- a/sim/mn10300/sim-main.h
+++ b/sim/mn10300/sim-main.h
@@ -26,40 +26,20 @@
#include "sim-basics.h"
-#include <signal.h> /* For kill() in insns:do_trap */
-
-#include <errno.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-/* These are generated files. */
-#include "itable.h"
-#include "idecode.h"
-
#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
mn10300_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER), (ERROR))
-
#include "sim-base.h"
-#include "mn10300_sim.h"
-
-/* Bring data in from the cold */
-
-#define IMEM8(EA) \
-(sim_core_read_aligned_1(STATE_CPU(sd, 0), EA, exec_map, (EA)))
-
-#define IMEM8_IMMED(EA, N) \
-(sim_core_read_aligned_1(STATE_CPU(sd, 0), EA, exec_map, (EA) + (N)))
-
-/* For compatibility, until all functions converted to passing
- SIM_DESC as an argument */
-extern SIM_DESC simulator;
+/**
+ * TODO: Move these includes to the igen files that need them.
+ * This requires extending the igen syntax to support header includes.
+ */
+#include "sim-fpu.h"
+#include "sim-signal.h"
-/* (re) initialize the simulator */
+#include "mn10300-sim.h"
-extern void engine_init(SIM_DESC sd);
extern SIM_CORE_SIGNAL_FN mn10300_core_signal;
#endif