/* This file is is generated by the genmloop script. DO NOT EDIT! */
/* Main loop for CGEN-based simulators.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of the GNU simulators.
engine->jmpbuf = &buf;
if (setjmp (buf))
{
+ /* Account for the last insn executed. */
+ ++insn_count;
+
engine->jmpbuf = NULL;
TRACE_INSN_FINI ((sim_cpu *) cpu);
PROFILE_EXEC_TIME (CPU_PROFILE_DATA (cpu))
+= sim_elapsed_time_since (start_time);
PROFILE_TOTAL_INSN_COUNT (CPU_PROFILE_DATA (cpu))
+= insn_count;
+
return;
}
EOF
+##########################################################################
+
if [ x$scache = xyes ] ; then
cat <<EOF
EOF
# Any initialization code before looping starts.
+# Note that this code may declare some locals.
${SHELL} $file init
+if [ x$parallel = xyes ] ; then
+cat << EOF
+
+#if defined (HAVE_PARALLEL_EXEC) && defined (__GNUC__)
+ {
+ static read_init_p = 0;
+ if (! read_init_p)
+ {
+/* ??? Later maybe paste read.c in when building mainloop.c. */
+#define DEFINE_LABELS
+#include "readx.c"
+ read_init_p = 1;
+ }
+ }
+#endif
+
+EOF
+fi
+
cat <<EOF
do
else
{
PROFILE_COUNT_SCACHE_HIT (current_cpu);
+ /* Make core access statistics come out right.
+ The size is a guess, but it's currently not used either. */
+ PROFILE_COUNT_CORE (current_cpu, pc, 2, sim_core_execute_map);
}
/* begin full-exec-scache */
}
EOF
+##########################################################################
+
else # ! WITH_SCACHE
cat <<EOF
EOF
# Any initialization code before looping starts.
+# Note that this code may declare some locals.
${SHELL} $file init
+if [ x$parallel = xyes ] ; then
+cat << EOF
+
+#if defined (HAVE_PARALLEL_EXEC) && defined (__GNUC__)
+ {
+ static read_init_p = 0;
+ if (! read_init_p)
+ {
+/* ??? Later maybe paste read.c in when building mainloop.c. */
+#define DEFINE_LABELS
+#include "readx.c"
+ read_init_p = 1;
+ }
+ }
+#endif
+
+EOF
+fi
+
cat <<EOF
do
EOF
fi # ! WITH_SCACHE
+##########################################################################
+
if [ x$fast = xyes ] ; then
if [ x$scache = xyes ] ; then
cat <<EOF
EOF
# Any initialization code before looping starts.
+# Note that this code may declare some locals.
${SHELL} $file init
+if [ x$parallel = xyes ] ; then
+cat << EOF
+
+#if defined (HAVE_PARALLEL_EXEC) && defined (__GNUC__)
+ {
+ static read_init_p = 0;
+ if (! read_init_p)
+ {
+/* ??? Later maybe paste read.c in when building mainloop.c. */
+#define DEFINE_LABELS
+#include "readx.c"
+ read_init_p = 1;
+ }
+ }
+#endif
+
+EOF
+fi
+
cat <<EOF
#if defined (WITH_SEM_SWITCH_FAST) && defined (__GNUC__)
EOF
+##########################################################################
+
else # ! WITH_SCACHE
cat <<EOF
EOF
# Any initialization code before looping starts.
+# Note that this code may declare some locals.
${SHELL} $file init
+if [ x$parallel = xyes ] ; then
+cat << EOF
+
+#if defined (HAVE_PARALLEL_EXEC) && defined (__GNUC__)
+ {
+ static read_init_p = 0;
+ if (! read_init_p)
+ {
+/* ??? Later maybe paste read.c in when building mainloop.c. */
+#define DEFINE_LABELS
+#include "readx.c"
+ read_init_p = 1;
+ }
+ }
+#endif
+
+EOF
+fi
+
cat <<EOF
do