Turn on INLINES if using GCC to compile simulator; Print more stuff if requests -t trace; If !WITH_ASSERT, do not check whether illegal bits in instruction are set

This commit is contained in:
Michael Meissner 1995-11-09 19:50:51 +00:00
parent 4a378b13e4
commit ba62bb1c74
6 changed files with 255 additions and 52 deletions

View File

@ -1,3 +1,31 @@
Thu Nov 9 12:22:15 1995 Michael Meissner <meissner@tiktok.cygnus.com>
* configure.in (--enable-sim-alignment): Fix typo in specifing non
string alignment.
(--enable-sim-switch): Make default on.
(--enable-sim-duplicate): Make default on.
(--enable-sim-smp): Make default 0.
(--enable-sim-mon): Don't set sim_float if not set.
(--enable-sim-inline): If gcc is found and --enable-sim-inline is
not specified, define DEFAULT_INLINE to be 2.
(all --enable-sim-* rules): Echo rules set to non empty to file
descriptor 6.
* configure: Regenerate.
* options.c (options_env): Fix typo if WITH_ENV is 0.
(print_options): Print GCC compiler version if available and
date/time options was compiled. If OPCODE_RULES, IGEN_FLAGS,
and/or DGEN_FLAGS are defined, print them.
* Makefile.in (all link actions): Pass SIM_CFLAGS as well as
CFLAGS.
(options.o): Compile options.o with OPCODE_RULES, IGEN_FLAGS, and
DGEN_FLAGS defined, so they can be printed out.
* igen.c (lf_print_c_validate): Check for WITH_ASSERT, so that
this test can be compiled away if the user really wants a fast
simulator by not doing assertion failures.
Wed Nov 8 13:19:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
* options.c: New file to print out all of the WITH_ options.

View File

@ -100,6 +100,9 @@ CONFIG_CFLAGS = $(BSWAP_CFLAGS) \
$(FUNC_CFLAGS) \
$(MODEL_CFLAGS)
STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES)
NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES)
CONFIG_FILE = @sim_config@
IGEN_OPCODE_RULES = @sim_opcode@
IGEN_DUPLICATE = @sim_dup@
@ -127,7 +130,7 @@ TARGETLIB = libsim.a
all: run $(TARGETLIB) $(GDB_OBJ)
.c.o:
$(CC) -c $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $<
$(CC) -c $(STD_CFLAGS) $<
@ -254,7 +257,7 @@ GDB_OBJ = sim_calls.o
psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBS)
$(CC) $(CFLAGS) $(LDFLAGS) -o psim main.o $(TARGETLIB) $(BFD_LIB) $(LIBIBERTY_LIB) $(LIBS)
$(CC) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o psim main.o $(TARGETLIB) $(BFD_LIB) $(LIBIBERTY_LIB) $(LIBS)
run: psim
rm -f run
@ -268,7 +271,7 @@ $(TARGETLIB): tmp-igen tmp-dgen $(LIB_OBJ) $(GDB_OBJ)
# Given that inlines are turned on now, rebuild psim whenever
# anything changes.
psim.o: psim.c psim.h $(CPU_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC)
$(CC) -c $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $<
$(CC) -c $(NOWARN_CFLAGS) $<
bits.o: bits.c $(BASICS_H)
@ -288,7 +291,7 @@ cpu.o: cpu.c $(CPU_H) $(IDECODE_H)
interrupts.o: interrupts.c $(CPU_H) $(IDECODE_H) os_emul.h
idecode.o: idecode.c $(CPU_H) $(IDECODE_H) semantics.h
$(CC) -c $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $<
$(CC) -c $(NOWARN_CFLAGS) $<
# double.o: double.c dp-bit.c
@ -313,13 +316,15 @@ devices.o: devices.c devices.h $(BASICS_H) \
device_tree.o: device_tree.c device_tree.h devices.h $(BASICS_H)
semantics.o: semantics.c semantics.h $(CPU_H) $(IDECODE_H)
$(CC) -c $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $<
$(CC) -c $(NOWARN_CFLAGS) $<
itable.o: itable.c itable.h
mon.o: mon.c $(CPU_H)
options.o: options.c $(BASICS_H)
# Rebuild options whenever something changes so the date/time is up to date.
options.o: options.c $(BASICS_H) $(CPU_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile
$(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' '-DDGEN_FLAGS="$(DGEN_FLAGS)"' $<
#
# Rules to create the built c source code files
@ -368,10 +373,10 @@ itable.h itable.c icache.h idecode.h idecode.c semantics.h semantics.c: tmp-igen
spreg.h spreg.c: tmp-dgen
dgen: dgen.o table.o lf.o misc.o filter_filename.o
$(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o dgen dgen.o table.o lf.o misc.o filter_filename.o $(LIBIBERTY_LIB) $(LIBS)
$(CC_FOR_BUILD) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o dgen dgen.o table.o lf.o misc.o filter_filename.o $(LIBIBERTY_LIB) $(LIBS)
igen: igen.o table.o lf.o misc.o filter_filename.o
$(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o igen igen.o table.o lf.o misc.o filter_filename.o $(LIBIBERTY_LIB) $(LIBS)
$(CC_FOR_BUILD) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o igen igen.o table.o lf.o misc.o filter_filename.o $(LIBIBERTY_LIB) $(LIBS)
table.o: misc.h filter_filename.h lf.h table.h
lf.o: misc.h filter_filename.h lf.h

106
sim/ppc/configure vendored
View File

@ -457,6 +457,9 @@ if test -n "$enableval"; then
no) sim_cflags="";;
*) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$sim_cflags" != x""; then
echo "Setting sim cflags = $sim_cflags" 6>&1
fi
else
sim_cflags=""
fi
@ -469,6 +472,9 @@ if test -n "$enableval"; then
no) sim_warnings="-w";;
*) sim_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$sim_warnings" != x""; then
echo "Setting warning flags = $sim_warnings" 6>&1
fi
else
sim_warnings=""
fi
@ -481,8 +487,11 @@ if test -n "$enableval"; then
no) sim_config="std-config.h";;
*) sim_config="${enableval}";;
esac
if test x"$sim_config" != x""; then
echo "Setting config flags = $sim_config" 6>&1
fi
else
sim_config="std-config.h"
sim_config="std-config.h"; echo "Setting config flags = $sim_config" 6>&1
fi
# Check whether --enable-sim-opcode or --disable-sim-opcode was given.
@ -493,8 +502,11 @@ if test -n "$enableval"; then
no) sim_opcode="ppc-opcode-simple";;
*) sim_opcode="ppc-opcode-${enableval}";;
esac
if test x"$sim_opcode" != x""; then
echo "Setting opcode flags = $sim_opcode" 6>&1
fi
else
sim_opcode="ppc-opcode-simple"
sim_opcode="ppc-opcode-simple"; echo "Setting opcode flags = $sim_opcode"
fi
# Check whether --enable-sim-switch or --disable-sim-switch was given.
@ -504,8 +516,11 @@ if test -n "$enableval"; then
yes) sim_switch="-s";;
*) sim_switch="";;
esac
if test x"$sim_switch" != x""; then
echo "Setting switch flags = $sim_switch" 6>&1
fi
else
sim_switch=""
sim_switch="-s"; echo "Setting switch flags = $sim_switch" 6>&1
fi
# Check whether --enable-sim-duplicate or --disable-sim-duplicate was given.
@ -515,8 +530,11 @@ if test -n "$enableval"; then
yes) sim_dup="-e";;
*) sim_dup="";;
esac
if test x"$sim_dup" != x""; then
echo "Setting duplicate flags = $sim_dup" 6>&1
fi
else
sim_dup=""
sim_dup="-e"; echo "Setting duplicate flags = $sim_dup" 6>&1
fi
# Check whether --enable-sim-filter or --disable-sim-filter was given.
@ -526,8 +544,11 @@ if test -n "$enableval"; then
yes) sim_filter="";;
*) sim_filter="-f $enableval";;
esac
if test x"$sim_filter" != x""; then
echo "Setting filter flags = $sim_filter" 6>&1
fi
else
sim_filter="-f 64"
sim_filter="-f 64"; echo "Setting filter flags = $sim_filter" 6>&1
fi
# Check whether --enable-sim-icache or --disable-sim-icache was given.
@ -565,9 +586,16 @@ case "$enableval" in
fi
done;;
esac
if test x"$sim_inline" != x""; then
echo "Setting inline flags = $sim_inline" 6>&1
fi
else
if test x"$GCC" != ""; then
sim_inline="-DDEFAULT_INLINE=2"; echo "Setting inline flags = $sim_inline" 6>&1
else
sim_inline=""
fi
fi
# Check whether --enable-sim-bswap or --disable-sim-bswap was given.
enableval="$enable_sim_bswap"
@ -577,6 +605,9 @@ if test -n "$enableval"; then
no) sim_bswap="-DWITH_BSWAP=0";;
*) sim_bswap="";;
esac
if test x"$sim_bswap" != x""; then
echo "Setting bswap flags = $sim_bswap" 6>&1
fi
else
sim_bswap=""
fi
@ -595,6 +626,9 @@ if test -n "$enableval"; then
l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
*) sim_endian="";;
esac
if test x"$sim_endian" != x""; then
echo "Setting endian flags = $sim_endian" 6>&1
fi
else
sim_endian=""
fi
@ -608,6 +642,9 @@ if test -n "$enableval"; then
l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
*) sim_hostendian="";;
esac
if test x"$sim_hostendian" != x""; then
echo "Setting hostendian flags = $sim_hostendian" 6>&1
fi
else
sim_hostendian=""
fi
@ -620,8 +657,11 @@ if test -n "$enableval"; then
no) sim_smp="-DWITH_SMP=0";;
*) sim_smp="-DWITH_SMP=$enableval";;
esac
if test x"$sim_smp" != x""; then
echo "Setting smp flags = $sim_smp" 6>&1
fi
else
sim_smp=""
sim_smp="-DWITH_SMP=0"; echo "Setting smp flags = $sim_smp" 6>&1
fi
# Check whether --enable-sim-bitsize or --disable-sim-bitsize was given.
@ -632,6 +672,9 @@ if test -n "$enableval"; then
no) sim_bitsize="";;
*) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";;
esac
if test x"$sim_bitsize" != x""; then
echo "Setting bitsize flags = $sim_bitsize" 6>&1
fi
else
sim_bitsize=""
fi
@ -644,6 +687,9 @@ if test -n "$enableval"; then
no) sim_hostbitsize="";;
*) sim_hostbitsize="-DWITH_HOST_WORD_BITSIZE=$enableval";;
esac
if test x"$sim_hostbitsize" != x""; then
echo "Setting hostbitsize flags = $sim_hostbitsize" 6>&1
fi
else
sim_hostbitsize=""
fi
@ -657,6 +703,9 @@ if test -n "$enableval"; then
user | uea) sim_env="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";;
*) sim_env="";;
esac
if test x"$sim_env" != x""; then
echo "Setting env flags = $sim_env" 6>&1
fi
else
sim_env=""
fi
@ -669,6 +718,9 @@ if test -n "$enableval"; then
no) sim_timebase="-DWITH_TIME_BASE=0";;
*) sim_timebase="";;
esac
if test x"$sim_timebase" != x""; then
echo "Setting timebase flags = $sim_timebase" 6>&1
fi
else
sim_timebase=""
fi
@ -678,9 +730,12 @@ enableval="$enable_sim_alignment"
if test -n "$enableval"; then
case "${enableval}" in
yes | strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
no | nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NOSTRICT_ALIGNMENT";;
no | nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
*) sim_alignment="-DWITH_ALIGNMENT=$enableval";;
esac
if test x"$sim_alignment" != x""; then
echo "Setting alignment flags = $sim_alignment" 6>&1
fi
else
sim_alignment=""
fi
@ -693,6 +748,9 @@ if test -n "$enableval"; then
no) sim_trace="-DWITH_TRACE=0";;
*) sim_trace="";;
esac
if test x"$sim_trace" != x""; then
echo "Setting trace flags = $sim_trace" 6>&1
fi
else
sim_trace=""
fi
@ -705,6 +763,9 @@ if test -n "$enableval"; then
no) sim_assert="-DWITH_ASSERT=0";;
*) sim_assert="";;
esac
if test x"$sim_assert" != x""; then
echo "Setting assert flags = $sim_assert" 6>&1
fi
else
sim_assert=""
fi
@ -717,6 +778,9 @@ if test -n "$enableval"; then
no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
*) sim_float="";;
esac
if test x"$sim_float" != x""; then
echo "Setting float flags = $sim_float" 6>&1
fi
else
sim_float=""
fi
@ -731,8 +795,11 @@ if test -n "$enableval"; then
memory) sim_mon="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";;
*) sim_mon="-DWITH_MON='$enableval'";;
esac
if test x"$sim_mon" != x""; then
echo "Setting monitor flags = $sim_mon" 6>&1
fi
else
sim_float=""
sim_mon=""
fi
# Check whether --enable-sim-function-unit or --disable-sim-function-unit was given.
@ -743,6 +810,9 @@ if test -n "$enableval"; then
no) sim_func="-DWITH_FUNCTION_UNIT=0";;
*) sim_func="";;
esac
if test x"$sim_func" != x""; then
echo "Setting function-unit flags = $sim_func" 6>&1
fi
else
sim_func=""
fi
@ -755,6 +825,9 @@ if test -n "$enableval"; then
no) sim_model="";;
*) sim_model="-DWITH_PPC_MODEL=${enableval}";;
esac
if test x"$sim_model" != x""; then
echo "Setting model flags = $sim_model" 6>&1
fi
else
sim_model=""
fi
@ -767,12 +840,13 @@ if test -n "$enableval"; then
no) sim_default_model="";;
*) sim_default_model="-DWITH_DEFAULT_PPC_MODEL=${enableval}";;
esac
if test x"$sim_default_model" != x""; then
echo "Setting default-model flags = $sim_default_model" 6>&1
fi
else
sim_model=""
fi
ac_aux_dir=
for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
if test -f $ac_dir/install-sh; then
@ -898,6 +972,8 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
. ${srcdir}/../../bfd/configure.host
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
@ -1036,7 +1112,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1040 "configure"
#line 1116 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -1091,7 +1167,7 @@ else
ac_cv_c_cross=yes
else
cat > conftest.$ac_ext <<EOF
#line 1095 "configure"
#line 1171 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
@ -1129,7 +1205,7 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 1133 "configure"
#line 1209 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
@ -1143,7 +1219,7 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 1147 "configure"
#line 1223 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
@ -1176,7 +1252,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1180 "configure"
#line 1256 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF

View File

@ -8,7 +8,10 @@ AC_ARG_ENABLE(sim-cflags,
yes) sim_cflags="-O2 -fomit-frame-pointer";;
no) sim_cflags="";;
*) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac],[sim_cflags=""])dnl
esac
if test x"$sim_cflags" != x""; then
echo "Setting sim cflags = $sim_cflags" 6>&1
fi],[sim_cflags=""])dnl
AC_ARG_ENABLE(sim-warnings,
[ --enable-sim-warnings=opts Extra CFLAGS for turning on compiler warnings except for idecode.o, semantics.o and psim.o],
@ -16,7 +19,10 @@ AC_ARG_ENABLE(sim-warnings,
yes) sim_warnings="-Wall -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations";;
no) sim_warnings="-w";;
*) sim_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac],[sim_warnings=""])dnl
esac
if test x"$sim_warnings" != x""; then
echo "Setting warning flags = $sim_warnings" 6>&1
fi],[sim_warnings=""])dnl
AC_ARG_ENABLE(sim-config,
[ --enable-sim-config=file Override default config file],
@ -24,7 +30,10 @@ AC_ARG_ENABLE(sim-config,
yes) sim_config="std-config.h";;
no) sim_config="std-config.h";;
*) sim_config="${enableval}";;
esac],[sim_config="std-config.h]")dnl
esac
if test x"$sim_config" != x""; then
echo "Setting config flags = $sim_config" 6>&1
fi],[sim_config="std-config.h"; echo "Setting config flags = $sim_config" 6>&1])dnl
AC_ARG_ENABLE(sim-opcode,
[ --enable-sim-opcode=which Override default opcode lookup.],
@ -32,28 +41,40 @@ AC_ARG_ENABLE(sim-opcode,
yes) sim_opcode="ppc-opcode-simple";;
no) sim_opcode="ppc-opcode-simple";;
*) sim_opcode="ppc-opcode-${enableval}";;
esac],[sim_opcode="ppc-opcode-simple"])dnl
esac
if test x"$sim_opcode" != x""; then
echo "Setting opcode flags = $sim_opcode" 6>&1
fi],[sim_opcode="ppc-opcode-simple"; echo "Setting opcode flags = $sim_opcode"])dnl
AC_ARG_ENABLE(sim-switch,
[ --enable-sim-switch Use a switch instead of a table for instruction call.],
[case "${enableval}" in
yes) sim_switch="-s";;
*) sim_switch="";;
esac],[sim_switch=""])dnl
esac
if test x"$sim_switch" != x""; then
echo "Setting switch flags = $sim_switch" 6>&1
fi],[sim_switch="-s"; echo "Setting switch flags = $sim_switch" 6>&1])dnl
AC_ARG_ENABLE(sim-duplicate,
[ --enable-sim-duplicate Expand (duplicate) semantic functions.],
[case "${enableval}" in
yes) sim_dup="-e";;
*) sim_dup="";;
esac],[sim_dup=""])dnl
esac
if test x"$sim_dup" != x""; then
echo "Setting duplicate flags = $sim_dup" 6>&1
fi],[sim_dup="-e"; echo "Setting duplicate flags = $sim_dup" 6>&1])dnl
AC_ARG_ENABLE(sim-filter,
[ --enable-sim-filter=rule Specify filter rules.],
[case "${enableval}" in
yes) sim_filter="";;
*) sim_filter="-f $enableval";;
esac],[sim_filter="-f 64"])dnl
esac
if test x"$sim_filter" != x""; then
echo "Setting filter flags = $sim_filter" 6>&1
fi],[sim_filter="-f 64"; echo "Setting filter flags = $sim_filter" 6>&1])dnl
AC_ARG_ENABLE(sim-icache,
[ --enable-sim-icache=size Specify instruction cache size.],
@ -84,7 +105,14 @@ case "$enableval" in
sim_inline="$flags $new_flag"
fi
done;;
esac],[sim_inline=""])dnl
esac
if test x"$sim_inline" != x""; then
echo "Setting inline flags = $sim_inline" 6>&1
fi],[if test x"$GCC" != ""; then
sim_inline="-DDEFAULT_INLINE=2"; echo "Setting inline flags = $sim_inline" 6>&1
else
sim_inline=""
fi])dnl
AC_ARG_ENABLE(sim-bswap,
[ --enable-sim-bswap Use the BSWAP instruction on Intel 486s and Pentiums.],
@ -92,7 +120,10 @@ AC_ARG_ENABLE(sim-bswap,
yes) sim_bswap="-DWITH_BSWAP=1";;
no) sim_bswap="-DWITH_BSWAP=0";;
*) sim_bswap="";;
esac],[sim_bswap=""])dnl
esac
if test x"$sim_bswap" != x""; then
echo "Setting bswap flags = $sim_bswap" 6>&1
fi],[sim_bswap=""])dnl
AC_ARG_ENABLE(sim-endian,
[ --enable-sim-endian=endian Specify target byte endian orientation.],
@ -106,7 +137,10 @@ AC_ARG_ENABLE(sim-endian,
b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
*) sim_endian="";;
esac],[sim_endian=""])dnl
esac
if test x"$sim_endian" != x""; then
echo "Setting endian flags = $sim_endian" 6>&1
fi],[sim_endian=""])dnl
AC_ARG_ENABLE(sim-hostendian,
[ --enable-sim-hostendain=end Specify host byte endian orientation.],
@ -115,7 +149,10 @@ AC_ARG_ENABLE(sim-hostendian,
b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
*) sim_hostendian="";;
esac],[sim_hostendian=""])dnl
esac
if test x"$sim_hostendian" != x""; then
echo "Setting hostendian flags = $sim_hostendian" 6>&1
fi],[sim_hostendian=""])dnl
AC_ARG_ENABLE(sim-smp,
[ --enable-sim-smp=n Specify number of processors to configure for.],
@ -123,7 +160,10 @@ AC_ARG_ENABLE(sim-smp,
yes) sim_smp="-DWITH_SMP=2";;
no) sim_smp="-DWITH_SMP=0";;
*) sim_smp="-DWITH_SMP=$enableval";;
esac],[sim_smp=""])dnl
esac
if test x"$sim_smp" != x""; then
echo "Setting smp flags = $sim_smp" 6>&1
fi],[sim_smp="-DWITH_SMP=0"; echo "Setting smp flags = $sim_smp" 6>&1])dnl
AC_ARG_ENABLE(sim-bitsize,
[ --enable-sim-bitsize=n Specify target bitsize (32 or 64).],
@ -131,7 +171,10 @@ AC_ARG_ENABLE(sim-bitsize,
yes) sim_bitsize="";;
no) sim_bitsize="";;
*) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";;
esac],[sim_bitsize=""])dnl
esac
if test x"$sim_bitsize" != x""; then
echo "Setting bitsize flags = $sim_bitsize" 6>&1
fi],[sim_bitsize=""])dnl
AC_ARG_ENABLE(sim-hostbitsize,
[ --enable-sim-hostbitsize=n Specify host bitsize (32 or 64).],
@ -139,7 +182,10 @@ AC_ARG_ENABLE(sim-hostbitsize,
yes) sim_hostbitsize="";;
no) sim_hostbitsize="";;
*) sim_hostbitsize="-DWITH_HOST_WORD_BITSIZE=$enableval";;
esac],[sim_hostbitsize=""])dnl
esac
if test x"$sim_hostbitsize" != x""; then
echo "Setting hostbitsize flags = $sim_hostbitsize" 6>&1
fi],[sim_hostbitsize=""])dnl
AC_ARG_ENABLE(sim-env,
[ --enable-sim-env=env Specify target environment (operating, virtual, user).],
@ -148,7 +194,10 @@ AC_ARG_ENABLE(sim-env,
virtual | vea) sim_env="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";;
user | uea) sim_env="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";;
*) sim_env="";;
esac],[sim_env=""])dnl
esac
if test x"$sim_env" != x""; then
echo "Setting env flags = $sim_env" 6>&1
fi],[sim_env=""])dnl
AC_ARG_ENABLE(sim-timebase,
[ --enable-sim-timebase Specify whether the PPC timebase is supported.],
@ -156,15 +205,21 @@ AC_ARG_ENABLE(sim-timebase,
yes) sim_timebase="-DWITH_TIME_BASE=1";;
no) sim_timebase="-DWITH_TIME_BASE=0";;
*) sim_timebase="";;
esac],[sim_timebase=""])dnl
esac
if test x"$sim_timebase" != x""; then
echo "Setting timebase flags = $sim_timebase" 6>&1
fi],[sim_timebase=""])dnl
AC_ARG_ENABLE(sim-alignment,
[ --enable-sim-alignment=align Specify strict or nonstrict alignment.],
[case "${enableval}" in
yes | strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
no | nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NOSTRICT_ALIGNMENT";;
no | nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
*) sim_alignment="-DWITH_ALIGNMENT=$enableval";;
esac],[sim_alignment=""])dnl
esac
if test x"$sim_alignment" != x""; then
echo "Setting alignment flags = $sim_alignment" 6>&1
fi],[sim_alignment=""])dnl
AC_ARG_ENABLE(sim-trace,
[ --enable-sim-trace Specify whether tracing is supported.],
@ -172,7 +227,10 @@ AC_ARG_ENABLE(sim-trace,
yes) sim_trace="-DWITH_TRACE=1";;
no) sim_trace="-DWITH_TRACE=0";;
*) sim_trace="";;
esac],[sim_trace=""])dnl
esac
if test x"$sim_trace" != x""; then
echo "Setting trace flags = $sim_trace" 6>&1
fi],[sim_trace=""])dnl
AC_ARG_ENABLE(sim-assert,
[ --enable-sim-assert Specify whether to perform random assertions.],
@ -180,7 +238,10 @@ AC_ARG_ENABLE(sim-assert,
yes) sim_assert="-DWITH_ASSERT=1";;
no) sim_assert="-DWITH_ASSERT=0";;
*) sim_assert="";;
esac],[sim_assert=""])dnl
esac
if test x"$sim_assert" != x""; then
echo "Setting assert flags = $sim_assert" 6>&1
fi],[sim_assert=""])dnl
AC_ARG_ENABLE(sim-float,
[ --enable-sim-float Specify whether to use host floating point or simulate.],
@ -188,7 +249,10 @@ AC_ARG_ENABLE(sim-float,
yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
*) sim_float="";;
esac],[sim_float=""])dnl
esac
if test x"$sim_float" != x""; then
echo "Setting float flags = $sim_float" 6>&1
fi],[sim_float=""])dnl
AC_ARG_ENABLE(sim-monitor,
[ --enable-sim-monitor=mon Specify whether to enable monitoring events.],
@ -198,7 +262,10 @@ AC_ARG_ENABLE(sim-monitor,
instruction) sim_mon="-DWITH_MON=MONITOR_INSTRUCTION_ISSUE";;
memory) sim_mon="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";;
*) sim_mon="-DWITH_MON='$enableval'";;
esac],[sim_float=""])dnl
esac
if test x"$sim_mon" != x""; then
echo "Setting monitor flags = $sim_mon" 6>&1
fi],[sim_mon=""])dnl
AC_ARG_ENABLE(sim-function-unit,
[ --enable-sim-function-unit Specify whether detailed functional unit support is built.],
@ -206,7 +273,10 @@ AC_ARG_ENABLE(sim-function-unit,
yes) sim_func="-DWITH_FUNCTION_UNIT=1";;
no) sim_func="-DWITH_FUNCTION_UNIT=0";;
*) sim_func="";;
esac],[sim_func=""])dnl
esac
if test x"$sim_func" != x""; then
echo "Setting function-unit flags = $sim_func" 6>&1
fi],[sim_func=""])dnl
AC_ARG_ENABLE(sim-model,
[ --enable-sim-model=which Specify PowerPC to model.],
@ -214,7 +284,10 @@ AC_ARG_ENABLE(sim-model,
yes) sim_model="";;
no) sim_model="";;
*) sim_model="-DWITH_PPC_MODEL=${enableval}";;
esac],[sim_model=""])dnl
esac
if test x"$sim_model" != x""; then
echo "Setting model flags = $sim_model" 6>&1
fi],[sim_model=""])dnl
AC_ARG_ENABLE(sim-default-model,
[ --enable-sim-default-model=which Specify default PowerPC to model.],
@ -222,9 +295,10 @@ AC_ARG_ENABLE(sim-default-model,
yes) sim_default_model="";;
no) sim_default_model="";;
*) sim_default_model="-DWITH_DEFAULT_PPC_MODEL=${enableval}";;
esac],[sim_model=""])dnl
AC_CONFIG_HEADER(config.h:config.in)
esac
if test x"$sim_default_model" != x""; then
echo "Setting default-model flags = $sim_default_model" 6>&1
fi],[sim_model=""])dnl
AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..)
AC_CANONICAL_SYSTEM
@ -232,6 +306,8 @@ AC_ARG_PROGRAM
. ${srcdir}/../../bfd/configure.host
AC_CONFIG_HEADER(config.h:config.in)
AC_PROG_CC
AC_SUBST(CFLAGS)
AC_SUBST(HDEFINES)

View File

@ -1854,7 +1854,7 @@ lf_print_c_validate(lf *file,
lf_printf(file, "\n");
lf_printf(file, "/* validate: %s */\n",
instruction->file_entry->fields[insn_format]);
lf_printf(file, "if ((instruction & 0x%x) != 0x%x)\n",
lf_printf(file, "if (WITH_ASSERT && (instruction & 0x%x) != 0x%x)\n",
check_mask, check_val);
lf_indent(file, +2);
lf_print_idecode_illegal(file);

View File

@ -43,7 +43,7 @@ options_env (int env)
case OPERATING_ENVIRONMENT: return "OPERATING";
case VIRTUAL_ENVIRONMENT: return "VIRTUAL";
case USER_ENVIRONMENT: return "USER";
case 0: return 0;
case 0: return "0";
}
return "UNKNOWN";
@ -107,6 +107,12 @@ options_ppc (ppc_model ppc)
void
print_options (void)
{
#if defined(_GNUC_) && defined(__VERSION__)
printf_filtered ("Compiled by GCC %s on %s %s\n", __VERSION__, __DATE__, __TIME__);
#else
printf_filtered ("Compiled on %s %s\n", __DATE__, __TIME__);
#endif
printf_filtered ("WITH_HOST_BYTE_ORDER = %s\n", options_byte_order (WITH_HOST_BYTE_ORDER));
printf_filtered ("WITH_TARGET_BYTE_ORDER = %s\n", options_byte_order (WITH_TARGET_BYTE_ORDER));
printf_filtered ("WITH_BSWAP = %d\n", WITH_BSWAP);
@ -141,6 +147,18 @@ print_options (void)
printf_filtered ("SEMANTICS_INLINE = %d\n", SEMANTICS_INLINE);
printf_filtered ("IDECODE_INLINE = %d\n", IDECODE_INLINE);
printf_filtered ("FUNCTION_UNIT_INLINE = %d\n", FUNCTION_UNIT_INLINE);
#ifdef OPCODE_RULES
printf_filtered ("OPCODE rules = %s\n", OPCODE_RULES);
#endif
#ifdef IGEN_FLAGS
printf_filtered ("IGEN_FLAGS = %s\n", IGEN_FLAGS);
#endif
#ifdef DGEN_FLAGS
printf_filtered ("DGEN_FLAGS = %s\n", DGEN_FLAGS);
#endif
}
#endif /* _OPTIONS_C_ */