sim: namespace sim_machs
[deliverable/binutils-gdb.git] / sim / common / genmloop.sh
old mode 100644 (file)
new mode 100755 (executable)
index 88bd16d..fa4e7b9
@@ -1,6 +1,5 @@
 # Generate the main loop of the simulator.
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
 # Contributed by Cygnus Support.
 #
 # This file is part of the GNU simulators.
 #
 #      Specify the suffix to append to output files.
 #
+# -shell <shell>
+#
+#      Specify the shell to use to execute <input-file>
+#
 # Only one of -scache/-pbb may be selected.
 # -simple is the default.
 #
@@ -160,6 +163,7 @@ do
        -switch) shift ; switch=$1 ;;
        -cpu) shift ; cpu=$1 ;;
        -infile) shift ; infile=$1 ;;
+       -shell) shift ; SHELL=$1 ;;
        *) echo "unknown option: $1" >&2 ; exit 1 ;;
        esac
        shift
@@ -297,6 +301,9 @@ exec 1>tmp-mloop-$$.cin
 cat << EOF
 /* This file is generated by the genmloop script.  DO NOT EDIT! */
 
+/* This must come before any other includes.  */
+#include "defs.h"
+
 /* Enable switch() support in cgen headers.  */
 #define SEM_IN_SWITCH
 
@@ -1108,7 +1115,7 @@ void
            }
        }
 
-      TRACE_INSN_FINI (current_cpu, cur_abuf, 0 /*last_p*/);
+      CGEN_TRACE_INSN_FINI (current_cpu, cur_abuf, 0 /*last_p*/);
     }
 
   /* FIXME: Later make cover macros: PROFILE_INSN_{INIT,FINI}.  */
@@ -1116,8 +1123,8 @@ void
       && ARGBUF_PROFILE_P (cur_abuf))
     @prefix@_model_insn_before (current_cpu, first_p);
 
-  TRACE_INSN_INIT (current_cpu, cur_abuf, first_p);
-  TRACE_INSN (current_cpu, cur_idesc->idata, cur_abuf, pc);
+  CGEN_TRACE_INSN_INIT (current_cpu, cur_abuf, first_p);
+  CGEN_TRACE_INSN (current_cpu, cur_idesc->idata, cur_abuf, pc);
 }
 
 /* x-after handler.
@@ -1142,7 +1149,7 @@ void
       cycles = (*prev_idesc->timing->model_fn) (current_cpu, prev_sem_arg);
       @prefix@_model_insn_after (current_cpu, 1 /*last_p*/, cycles);
     }
-  TRACE_INSN_FINI (current_cpu, prev_abuf, 1 /*last_p*/);
+  CGEN_TRACE_INSN_FINI (current_cpu, prev_abuf, 1 /*last_p*/);
 }
 
 #define FAST_P 0
This page took 0.023973 seconds and 4 git commands to generate.