sim: model: constify sim_machs storage
[binutils-gdb.git] / sim / iq2000 / mloop.in
index 2c0ce066a70038dbe4b8985b212d949a0271db63..7d3a9b5e9a1aa283e696245dc391b7d7d7cea0db 100644 (file)
@@ -1,6 +1,5 @@
 # Simulator main loop for IQ2000. -*- C -*-
-# Copyright (C) 1998, 1999, 2007, 2008, 2009, 2010
-  Free Software Foundation, Inc.
+# Copyright (C) 1998-2021 Free Software Foundation, Inc.
 # Contributed by Cygnus Solutions.
 #
 # This file is part of the GNU Simulators.
@@ -41,6 +40,7 @@ case "x$1" in
 xsupport)
 
 cat <<EOF
+#include <stdlib.h>
 
 static INLINE const IDESC *
 extract (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn, ARGBUF *abuf,
@@ -97,8 +97,8 @@ execute (SIM_CPU *current_cpu, SCACHE *sc, int fast_p)
          if (PROFILE_MODEL_P (current_cpu)
              && ARGBUF_PROFILE_P (abuf))
            @cpu@_model_insn_before (current_cpu, 1 /*first_p*/);
-         TRACE_INSN_INIT (current_cpu, abuf, 1);
-         TRACE_INSN (current_cpu, idesc->idata,
+         CGEN_TRACE_INSN_INIT (current_cpu, abuf, 1);
+         CGEN_TRACE_INSN (current_cpu, idesc->idata,
                      (const struct argbuf *) abuf, abuf->addr);
        }
 #if WITH_SCACHE
@@ -117,7 +117,7 @@ execute (SIM_CPU *current_cpu, SCACHE *sc, int fast_p)
              cycles = (*idesc->timing->model_fn) (current_cpu, sc);
              @cpu@_model_insn_after (current_cpu, 1 /*last_p*/, cycles);
            }
-         TRACE_INSN_FINI (current_cpu, abuf, 1);
+         CGEN_TRACE_INSN_FINI (current_cpu, abuf, 1);
        }
 #else
       abort ();