sim: m32r: add __linux__ hack for non-Linux hosts
[binutils-gdb.git] / sim / m32r / mloop.in
index 26a6196c777f4a3db79f82633c4a5007a749315e..6b0d0dec61666ad599c4d4466f06bf498a448a49 100644 (file)
@@ -1,6 +1,6 @@
 # Simulator main loop for m32r. -*- C -*-
 #
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Simulators.
 #
@@ -42,6 +42,7 @@ case "x$1" in
 xsupport)
 
 cat <<EOF
+#include <stdlib.h>
 
 static INLINE const IDESC *
 extract16 (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn,
@@ -113,8 +114,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, idata,
+         CGEN_TRACE_INSN_INIT (current_cpu, abuf, 1);
+         CGEN_TRACE_INSN (current_cpu, idata,
                      (const struct argbuf *) abuf, abuf->addr);
        }
 #if WITH_SCACHE
@@ -133,7 +134,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 ();