sim: include ansidecl.h when needed
authorMike Frysinger <vapier@gentoo.org>
Sun, 5 Dec 2021 02:09:23 +0000 (21:09 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sun, 5 Dec 2021 03:10:04 +0000 (22:10 -0500)
Avoid implicit include deps with this to help untangle sim headers
so we can get rid of arch-specific sim-main.h.

16 files changed:
sim/common/cgen-trace.h
sim/common/genmloop.sh
sim/common/hw-device.h
sim/common/hw-events.h
sim/common/hw-tree.h
sim/common/sim-basics.h
sim/common/sim-engine.h
sim/common/sim-events.h
sim/common/sim-hw.h
sim/common/sim-inline.h
sim/common/sim-io.h
sim/common/sim-profile.c
sim/common/sim-syscall.c
sim/common/sim-trace.c
sim/common/sim-trace.h
sim/common/sim-utils.h

index c617e7e21e121111e8d6d972b0cdbe7184d2e622..96048b906e2089128010643e1922237c2ef1d037 100644 (file)
@@ -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 *,
index e1eb08c1bdfd8a33bfaefe51c127971a0c6d59ac..63e01ec4d98c67a2e5bc6bd6eb6b64aeef31a9c1 100755 (executable)
@@ -312,6 +312,7 @@ cat << EOF
 #define WANT_CPU @cpu@
 #define WANT_CPU_@CPU@
 
+#include "ansidecl.h"
 #include "bfd.h"
 
 #include "sim-main.h"
index a7e598bb40e9b910a5f09ad7136f13adb81fe084..711001d13c9a80ccca73705f8ad029ca26b92a49 100644 (file)
@@ -25,6 +25,8 @@
 
 #include <stdarg.h>
 
+#include "ansidecl.h"
+
 /* Introduction:
 
    As explained in earlier sections, the device, device instance,
index 7d750007c0950e7094e7ddbd92597fc6a6c64d5f..0b55542ad32ab85e9842d7c1771f8794f386466d 100644 (file)
@@ -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. */
index 2f717ec8d9f453c0ffdb7d50670ff3c1ccec8a69..07a95b4177dcfb145b002c8217768cbdb2126823 100644 (file)
@@ -25,6 +25,8 @@
 
 #include <stdarg.h>
 
+#include "ansidecl.h"
+
 struct hw *hw_tree_create
 (SIM_DESC sd,
  const char *device);
index f09a4f26720586ee5ea7b8e35f9dc031d13aafdd..62d47e41726157016dcf632710f005f261fa8a67 100644 (file)
@@ -111,7 +111,6 @@ typedef enum {
 \f
 /* Basic definitions - ordered so that nothing calls what comes after it.  */
 
-#include "ansidecl.h"
 #include "sim/sim.h"
 
 #include "sim-config.h"
index 159d96bf119e710c7345e7c4044df64fa2599ecc..4d77856ef7e4b3b28f8917e1d3620e94b0bd0afb 100644 (file)
@@ -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
 {
index 3c30d6489f8d586d5dee1308ad8904ec862cb02d..b102a959ede417388b54d66b7ba0b4168658dd15 100644 (file)
@@ -25,6 +25,8 @@
 
 #include <stdarg.h>
 
+#include "ansidecl.h"
+
 /* Notes:
 
    When scheduling an event, the a delta of zero/one refers to the
index 71dc8378b1d47b51190d2c99b75b6b8389187775..0207aa3e5fc3c6bf81f145dc1ea02488c20558f9 100644 (file)
@@ -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
index a397e58e10f2d450fbc5892d5fd81561eabbb5a6..216f30d2b638bf1c1a4969b17e98f708d1fff455 100644 (file)
@@ -23,6 +23,7 @@
 #ifndef SIM_INLINE_H
 #define SIM_INLINE_H
 
+#include "ansidecl.h"
 
 /* INLINE CODE SELECTION:
 
index 2fc22f332cccd691a100594ae4c55e089b87e798..c77b4f8189dc9b081a017cf1ca9b4ee72286d13b 100644 (file)
@@ -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);
index 393a0b733ed2b369ab8d37c985abca9db1f8bd33..f4cdf40b05b157d8197fe41a695a1096ccdfb7ef 100644 (file)
@@ -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"
index 1e83db2ae8a4720743b353688a654b63fdfed3bb..26f57f431bfba6d3f3e336464c52ec739633e2e4 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <errno.h>
 
+#include "ansidecl.h"
+
 #include "sim-main.h"
 #include "sim-syscall.h"
 #include "sim/callback.h"
index fbfa27fac6f43760657fa38447f9503caa24e482..15816100d56173e0179d76b937d57273215c465c 100644 (file)
@@ -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"
index f17bbc6342093a37f962997e4a3961aaf70456f2..09e900c9f57156ca33eef8b8c7b9775082f21bce 100644 (file)
@@ -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.  */
index 1af4ea206b82f5f5106f50c87aaf5488f38c9801..20ca9fcfe2310da08d4627d67ffce485346f46ac 100644 (file)
@@ -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);