$(top_srcdir)/m4/sim_ac_option_profile.m4 \
$(top_srcdir)/m4/sim_ac_option_reserved_bits.m4 \
$(top_srcdir)/m4/sim_ac_option_scache.m4 \
+ $(top_srcdir)/m4/sim_ac_option_smp.m4 \
$(top_srcdir)/m4/sim_ac_option_stdio.m4 \
$(top_srcdir)/m4/sim_ac_option_trace.m4 \
$(top_srcdir)/m4/sim_ac_option_warnings.m4 \
m4_include([m4/sim_ac_option_profile.m4])
m4_include([m4/sim_ac_option_reserved_bits.m4])
m4_include([m4/sim_ac_option_scache.m4])
+m4_include([m4/sim_ac_option_smp.m4])
m4_include([m4/sim_ac_option_stdio.m4])
m4_include([m4/sim_ac_option_trace.m4])
m4_include([m4/sim_ac_option_warnings.m4])
/* Sim cache szie */
#undef WITH_SCACHE
+/* Sim SMP settings */
+#undef WITH_SMP
+
/* How to route I/O */
#undef WITH_STDIO
enable_sim_profile
enable_sim_reserved_bits
enable_sim_scache
+enable_sim_smp
enable_sim_stdio
enable_sim_trace
enable_werror
instruction
--enable-sim-scache=size
Specify simulator execution cache size
+ --enable-sim-smp=n Specify number of processors to configure for
+ (default 1)
--enable-sim-stdio Specify whether to use stdio for console
input/output
--enable-sim-trace=opts Enable tracing of simulated programs
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12445 "configure"
+#line 12448 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12551 "configure"
+#line 12554 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_scache" >&5
$as_echo "$sim_scache" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of sim cpus to support" >&5
+$as_echo_n "checking number of sim cpus to support... " >&6; }
+default_sim_smp="0"
+sim_smp="$default_sim_smp"
+# Check whether --enable-sim-smp was given.
+if test "${enable_sim_smp+set}" = set; then :
+ enableval=$enable_sim_smp; case "${enableval}" in
+ yes) sim_smp="5";;
+ no) sim_smp="0";;
+ *) sim_smp="$enableval";;
+esac
+fi
+sim_igen_smp="-N ${sim_smp}"
+if test "x$sim_smp" = x0; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define WITH_SMP $sim_smp
+_ACEOF
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_smp" >&5
+$as_echo "$sim_smp" >&6; }
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim stdio debug behavior" >&5
$as_echo_n "checking for sim stdio debug behavior... " >&6; }
sim_stdio="0"
SIM_AC_OPTION_PROFILE
SIM_AC_OPTION_RESERVED_BITS
SIM_AC_OPTION_SCACHE
+SIM_AC_OPTION_SMP
SIM_AC_OPTION_STDIO
SIM_AC_OPTION_TRACE
SIM_AC_OPTION_WARNINGS
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
-AC_DEFUN([SIM_AC_OPTION_SMP],
-[
+AC_DEFUN([SIM_AC_OPTION_SMP], [dnl
AC_MSG_CHECKING([number of sim cpus to support])
-default_sim_smp="ifelse([$1],,5,[$1])"
-sim_smp="$default_sim_smp""
+dnl TODO: We should increase the default to use smp at some point. When we do,
+dnl the ppc/configure sim-smp option should be merged. See the WITH_SMP check
+dnl below for more cleanups too.
+default_sim_smp="0"
+sim_smp="$default_sim_smp"
AC_ARG_ENABLE(sim-smp,
[AS_HELP_STRING([--enable-sim-smp=n],
- [Specify number of processors to configure for (default ${default_sim_smp})])],
+ [Specify number of processors to configure for (default 1)])],
[case "${enableval}" in
yes) sim_smp="5";;
no) sim_smp="0";;
*) sim_smp="$enableval";;
esac])dnl
sim_igen_smp="-N ${sim_smp}"
-AC_DEFINE_UNQUOTED([WITH_SMP], [$sim_smp], [Sim SMP settings])
+dnl NB: The ppc code uses a diff default because its smp works. That is why
+dnl we don't unconditionally enable WITH_SMP here. Once we unify ppc, we can
+dnl make this unconditional.
+AS_VAR_IF([sim_smp], [0], [], [dnl
+ AC_DEFINE_UNQUOTED([WITH_SMP], [$sim_smp], [Sim SMP settings])])
AC_MSG_RESULT($sim_smp)
])