summaryrefslogtreecommitdiff
path: root/sim/common
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-12-04 21:09:23 -0500
committerMike Frysinger <vapier@gentoo.org>2021-12-04 22:10:04 -0500
commit843bf75416dd11d91a5d617f7a49f6e9e5025b42 (patch)
tree9c38ee66660ea7438c727dd330fce45520e0ee11 /sim/common
parent33bbd5e8dd0d0967da4a86007ef1e8d268367492 (diff)
sim: include ansidecl.h when needed
Avoid implicit include deps with this to help untangle sim headers so we can get rid of arch-specific sim-main.h.
Diffstat (limited to 'sim/common')
-rw-r--r--sim/common/cgen-trace.h2
-rwxr-xr-xsim/common/genmloop.sh1
-rw-r--r--sim/common/hw-device.h2
-rw-r--r--sim/common/hw-events.h2
-rw-r--r--sim/common/hw-tree.h2
-rw-r--r--sim/common/sim-basics.h1
-rw-r--r--sim/common/sim-engine.h2
-rw-r--r--sim/common/sim-events.h2
-rw-r--r--sim/common/sim-hw.h2
-rw-r--r--sim/common/sim-inline.h1
-rw-r--r--sim/common/sim-io.h2
-rw-r--r--sim/common/sim-profile.c2
-rw-r--r--sim/common/sim-syscall.c2
-rw-r--r--sim/common/sim-trace.c1
-rw-r--r--sim/common/sim-trace.h1
-rw-r--r--sim/common/sim-utils.h2
16 files changed, 26 insertions, 1 deletions
diff --git a/sim/common/cgen-trace.h b/sim/common/cgen-trace.h
index c617e7e21e..96048b906e 100644
--- a/sim/common/cgen-trace.h
+++ b/sim/common/cgen-trace.h
@@ -20,6 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef CGEN_TRACE_H
#define CGEN_TRACE_H
+#include "ansidecl.h"
+
void cgen_trace_insn_init (SIM_CPU *, int);
void cgen_trace_insn_fini (SIM_CPU *, const struct argbuf *, int);
void cgen_trace_insn (SIM_CPU *, const struct cgen_insn *,
diff --git a/sim/common/genmloop.sh b/sim/common/genmloop.sh
index e1eb08c1bd..63e01ec4d9 100755
--- a/sim/common/genmloop.sh
+++ b/sim/common/genmloop.sh
@@ -312,6 +312,7 @@ cat << EOF
#define WANT_CPU @cpu@
#define WANT_CPU_@CPU@
+#include "ansidecl.h"
#include "bfd.h"
#include "sim-main.h"
diff --git a/sim/common/hw-device.h b/sim/common/hw-device.h
index a7e598bb40..711001d13c 100644
--- a/sim/common/hw-device.h
+++ b/sim/common/hw-device.h
@@ -25,6 +25,8 @@
#include <stdarg.h>
+#include "ansidecl.h"
+
/* Introduction:
As explained in earlier sections, the device, device instance,
diff --git a/sim/common/hw-events.h b/sim/common/hw-events.h
index 7d750007c0..0b55542ad3 100644
--- a/sim/common/hw-events.h
+++ b/sim/common/hw-events.h
@@ -22,6 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <stdarg.h>
+#include "ansidecl.h"
+
/* Event manager customized for hardware models.
This interface is discussed further in sim-events.h. */
diff --git a/sim/common/hw-tree.h b/sim/common/hw-tree.h
index 2f717ec8d9..07a95b4177 100644
--- a/sim/common/hw-tree.h
+++ b/sim/common/hw-tree.h
@@ -25,6 +25,8 @@
#include <stdarg.h>
+#include "ansidecl.h"
+
struct hw *hw_tree_create
(SIM_DESC sd,
const char *device);
diff --git a/sim/common/sim-basics.h b/sim/common/sim-basics.h
index f09a4f2672..62d47e4172 100644
--- a/sim/common/sim-basics.h
+++ b/sim/common/sim-basics.h
@@ -111,7 +111,6 @@ typedef enum {
/* Basic definitions - ordered so that nothing calls what comes after it. */
-#include "ansidecl.h"
#include "sim/sim.h"
#include "sim-config.h"
diff --git a/sim/common/sim-engine.h b/sim/common/sim-engine.h
index 159d96bf11..4d77856ef7 100644
--- a/sim/common/sim-engine.h
+++ b/sim/common/sim-engine.h
@@ -22,6 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <stdarg.h>
+#include "ansidecl.h"
+
typedef struct _sim_engine sim_engine;
struct _sim_engine
{
diff --git a/sim/common/sim-events.h b/sim/common/sim-events.h
index 3c30d6489f..b102a959ed 100644
--- a/sim/common/sim-events.h
+++ b/sim/common/sim-events.h
@@ -25,6 +25,8 @@
#include <stdarg.h>
+#include "ansidecl.h"
+
/* Notes:
When scheduling an event, the a delta of zero/one refers to the
diff --git a/sim/common/sim-hw.h b/sim/common/sim-hw.h
index 71dc8378b1..0207aa3e5f 100644
--- a/sim/common/sim-hw.h
+++ b/sim/common/sim-hw.h
@@ -22,6 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <stdarg.h>
+#include "ansidecl.h"
+
/* Parse a hardware definition */
struct hw *sim_hw_parse
diff --git a/sim/common/sim-inline.h b/sim/common/sim-inline.h
index a397e58e10..216f30d2b6 100644
--- a/sim/common/sim-inline.h
+++ b/sim/common/sim-inline.h
@@ -23,6 +23,7 @@
#ifndef SIM_INLINE_H
#define SIM_INLINE_H
+#include "ansidecl.h"
/* INLINE CODE SELECTION:
diff --git a/sim/common/sim-io.h b/sim/common/sim-io.h
index 2fc22f332c..c77b4f8189 100644
--- a/sim/common/sim-io.h
+++ b/sim/common/sim-io.h
@@ -28,6 +28,8 @@
#include <sys/stat.h>
#include <sys/types.h>
+#include "ansidecl.h"
+
/* See the file include/callbacks.h for a description */
int sim_io_init (SIM_DESC sd);
diff --git a/sim/common/sim-profile.c b/sim/common/sim-profile.c
index 393a0b733e..f4cdf40b05 100644
--- a/sim/common/sim-profile.c
+++ b/sim/common/sim-profile.c
@@ -25,6 +25,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <stdlib.h>
#include <string.h>
+#include "ansidecl.h"
+
#include "sim-main.h"
#include "sim-io.h"
#include "sim-options.h"
diff --git a/sim/common/sim-syscall.c b/sim/common/sim-syscall.c
index 1e83db2ae8..26f57f431b 100644
--- a/sim/common/sim-syscall.c
+++ b/sim/common/sim-syscall.c
@@ -22,6 +22,8 @@
#include <errno.h>
+#include "ansidecl.h"
+
#include "sim-main.h"
#include "sim-syscall.h"
#include "sim/callback.h"
diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c
index fbfa27fac6..15816100d5 100644
--- a/sim/common/sim-trace.c
+++ b/sim/common/sim-trace.c
@@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <stdlib.h>
#include <string.h>
+#include "ansidecl.h"
#include "bfd.h"
#include "dis-asm.h"
#include "libiberty.h"
diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h
index f17bbc6342..09e900c9f5 100644
--- a/sim/common/sim-trace.h
+++ b/sim/common/sim-trace.h
@@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <stdarg.h>
+#include "ansidecl.h"
#include "dis-asm.h"
/* Standard traceable entities. */
diff --git a/sim/common/sim-utils.h b/sim/common/sim-utils.h
index 1af4ea206b..20ca9fcfe2 100644
--- a/sim/common/sim-utils.h
+++ b/sim/common/sim-utils.h
@@ -20,6 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef SIM_UTILS_H
#define SIM_UTILS_H
+#include "ansidecl.h"
+
/* Memory management with an allocator that clears memory before use. */
void *zalloc (unsigned long size);