diff options
author | Michael Meissner <gnu@the-meissners.org> | 1995-11-10 22:49:05 +0000 |
---|---|---|
committer | Michael Meissner <gnu@the-meissners.org> | 1995-11-10 22:49:05 +0000 |
commit | a31140524a0771e27cd25af1648d32b3ceaa36ed (patch) | |
tree | fb05853d32fca4a28d9462b2b476920c7a59a363 /sim/ppc/configure | |
parent | aa917e719d60206457ee4fbde8b3b070c5a119d4 (diff) | |
download | gdb-a31140524a0771e27cd25af1648d32b3ceaa36ed.zip gdb-a31140524a0771e27cd25af1648d32b3ceaa36ed.tar.gz gdb-a31140524a0771e27cd25af1648d32b3ceaa36ed.tar.bz2 |
Tons of changes to allow model specific information in the instruction file.
Diffstat (limited to 'sim/ppc/configure')
-rwxr-xr-x | sim/ppc/configure | 128 |
1 files changed, 83 insertions, 45 deletions
diff --git a/sim/ppc/configure b/sim/ppc/configure index 841c6a3..aaa176b 100755 --- a/sim/ppc/configure +++ b/sim/ppc/configure @@ -40,7 +40,7 @@ ac_help="$ac_help ac_help="$ac_help --enable-sim-bitsize=n Specify target bitsize (32 or 64)." ac_help="$ac_help - --enable-sim-hostbitsize=n Specify host bitsize (32 or 64)." + --enable-sim-hostbitsize=32|64 Specify host bitsize (32 or 64)." ac_help="$ac_help --enable-sim-env=env Specify target environment (operating, virtual, user)." ac_help="$ac_help @@ -52,6 +52,8 @@ ac_help="$ac_help ac_help="$ac_help --enable-sim-assert Specify whether to perform random assertions." ac_help="$ac_help + --enable-sim-reserved-bits Specify whether to check reserved bits in instruction." +ac_help="$ac_help --enable-sim-float Specify whether to use host floating point or simulate." ac_help="$ac_help --enable-sim-monitor=mon Specify whether to enable monitoring events." @@ -483,30 +485,48 @@ fi enableval="$enable_sim_config" if test -n "$enableval"; then case "${enableval}" in - yes) sim_config="std-config.h";; - no) sim_config="std-config.h";; - *) sim_config="${enableval}";; + yes|no) { echo "configure: error: "No value supplied for --enable-sim-config=file"" 1>&2; exit 1; };; + *) if test -f "${enableval}"; then + sim_config="${enableval}"; + elif test -f "${enableval}-config.h"; then + sim_config="${enableval}-config.h" + else + { echo "configure: error: "Config file $enableval was not found"" 1>&2; exit 1; }; + sim_config=std-config.h + fi;; esac if test x"$silent" != x"yes" && test x"$sim_config" != x""; then echo "Setting config flags = $sim_config" 6>&1 fi else - sim_config="std-config.h"; echo "Setting config flags = $sim_config" 6>&1 + sim_config="std-config.h" +if test x"$silent" != x"yes"; then + echo "Setting config flags = $sim_config" 6>&1 +fi fi # Check whether --enable-sim-opcode or --disable-sim-opcode was given. enableval="$enable_sim_opcode" if test -n "$enableval"; then case "${enableval}" in - yes) sim_opcode="ppc-opcode-simple";; - no) sim_opcode="ppc-opcode-simple";; - *) sim_opcode="ppc-opcode-${enableval}";; + yes|no) { echo "configure: error: "No value supplied for --enable-sim-opcode=file"" 1>&2; exit 1; };; + *) if test -f "${enableval}"; then + sim_opcode="${enableval}" + elif test -f "ppc-opcode-${enableval}"; then + sim_opcode="ppc-opcode-${enableval}" + else + { echo "configure: error: "File $enableval is not an opcode rules file"" 1>&2; exit 1; }; + sim_opcode="ppc-opcode-complex" + fi;; esac if test x"$silent" != x"yes" && test x"$sim_opcode" != x""; then echo "Setting opcode flags = $sim_opcode" 6>&1 fi else - sim_opcode="ppc-opcode-simple"; echo "Setting opcode flags = $sim_opcode" + sim_opcode="ppc-opcode-complex" +if test x"$silent" != x"yes"; then + echo "Setting opcode flags = $sim_opcode" +fi fi # Check whether --enable-sim-switch or --disable-sim-switch was given. @@ -514,7 +534,8 @@ enableval="$enable_sim_switch" if test -n "$enableval"; then case "${enableval}" in yes) sim_switch="-s";; - *) sim_switch="";; + no) sim_switch="";; + *) { echo "configure: error: "--enable-sim-switch does not take a value"" 1>&2; exit 1; }; sim_switch="";; esac if test x"$silent" != x"yes" && test x"$sim_switch" != x""; then echo "Setting switch flags = $sim_switch" 6>&1 @@ -530,8 +551,9 @@ fi enableval="$enable_sim_duplicate" if test -n "$enableval"; then case "${enableval}" in - yes) sim_dup="-e";; - *) sim_dup="";; + yes) sim_dup="-e";; + no) sim_dup="";; + *) { echo "configure: error: "--enable-sim-duplicate does not take a value"" 1>&2; exit 1; }; sim_dup="";; esac if test x"$silent" != x"yes" && test x"$sim_dup" != x""; then echo "Setting duplicate flags = $sim_dup" 6>&1 @@ -547,8 +569,9 @@ fi enableval="$enable_sim_filter" if test -n "$enableval"; then case "${enableval}" in - yes) sim_filter="";; - *) sim_filter="-f $enableval";; + yes) { echo "configure: error: "--enable-sim-filter must be specified with a rule to filter or no"" 1>&2; exit 1; }; sim_filter="";; + no) sim_filter="";; + *) sim_filter="-f $enableval";; esac if test x"$silent" != x"yes" && test x"$sim_filter" != x""; then echo "Setting filter flags = $sim_filter" 6>&1 @@ -564,11 +587,12 @@ fi enableval="$enable_sim_icache" if test -n "$enableval"; then case "${enableval}" in - yes) sim_icache="-r 1024";; - *) sim_icache="";; + yes) sim_icache="-r 1024";; + no) sim_icache="";; + *) sim_icache="-r ${enableval}";; esac else - sim_icache="" + sim_icache="-r 1024" fi # Check whether --enable-sim-inline or --disable-sim-inline was given. @@ -615,7 +639,7 @@ if test -n "$enableval"; then case "${enableval}" in yes) sim_bswap="-DWITH_BSWAP=1";; no) sim_bswap="-DWITH_BSWAP=0";; - *) sim_bswap="";; + *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";; esac if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then echo "Setting bswap flags = $sim_bswap" 6>&1 @@ -636,7 +660,7 @@ if test -n "$enableval"; then no) sim_endian="-DWITH_TARGET_BYTE_ORDER=0";; b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; - *) sim_endian="";; + *) { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";; esac if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then echo "Setting endian flags = $sim_endian" 6>&1 @@ -652,7 +676,7 @@ if test -n "$enableval"; then no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; - *) sim_hostendian="";; + *) { echo "configure: error: "Unknown value $enableval for --enable-sim-hostendian"" 1>&2; exit 1; }; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then echo "Setting hostendian flags = $sim_hostendian" 6>&1 @@ -683,9 +707,8 @@ fi enableval="$enable_sim_bitsize" if test -n "$enableval"; then case "${enableval}" in - yes) sim_bitsize="";; - no) sim_bitsize="";; - *) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";; + 32|64) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";; + *) { echo "configure: error: "--enable-sim-bitsize was given $enableval" 1>&2; exit 1; }; sim_bitsize="";; esac if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then echo "Setting bitsize flags = $sim_bitsize" 6>&1 @@ -698,9 +721,8 @@ fi enableval="$enable_sim_hostbitsize" if test -n "$enableval"; then case "${enableval}" in - yes) sim_hostbitsize="";; - no) sim_hostbitsize="";; - *) sim_hostbitsize="-DWITH_HOST_WORD_BITSIZE=$enableval";; + 32|64) sim_hostbitsize="-DWITH_HOST_WORD_BITSIZE=$enableval";; + *) { echo "configure: error: "--enable-sim-hostbitsize was given $enableval" 1>&2; exit 1; }; sim_hostbitsize="";; esac if test x"$silent" != x"yes" && test x"$sim_hostbitsize" != x""; then echo "Setting hostbitsize flags = $sim_hostbitsize" 6>&1 @@ -716,7 +738,8 @@ if test -n "$enableval"; then operating | os | oea) sim_env="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT";; virtual | vea) sim_env="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";; user | uea) sim_env="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";; - *) sim_env="";; + no) sim_env="-DWITH_ENVIRONMENT=0";; + *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-env"" 1>&2; exit 1; }; sim_env="";; esac if test x"$silent" != x"yes" && test x"$sim_env" != x""; then echo "Setting env flags = $sim_env" 6>&1 @@ -731,7 +754,7 @@ if test -n "$enableval"; then case "${enableval}" in yes) sim_timebase="-DWITH_TIME_BASE=1";; no) sim_timebase="-DWITH_TIME_BASE=0";; - *) sim_timebase="";; + *) { echo "configure: error: "--enable-sim-timebase does not take a value"" 1>&2; exit 1; }; sim_timebase="";; esac if test x"$silent" != x"yes" && test x"$sim_timebase" != x""; then echo "Setting timebase flags = $sim_timebase" 6>&1 @@ -746,7 +769,7 @@ if test -n "$enableval"; then case "${enableval}" in yes | strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; no | nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - *) sim_alignment="-DWITH_ALIGNMENT=$enableval";; + *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";; esac if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then echo "Setting alignment flags = $sim_alignment" 6>&1 @@ -761,7 +784,7 @@ if test -n "$enableval"; then case "${enableval}" in yes) sim_trace="-DWITH_TRACE=1";; no) sim_trace="-DWITH_TRACE=0";; - *) sim_trace="";; + *) { echo "configure: error: "--enable-sim-trace does not take a value"" 1>&2; exit 1; }; sim_trace="";; esac if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then echo "Setting trace flags = $sim_trace" 6>&1 @@ -776,7 +799,7 @@ if test -n "$enableval"; then case "${enableval}" in yes) sim_assert="-DWITH_ASSERT=1";; no) sim_assert="-DWITH_ASSERT=0";; - *) sim_assert="";; + *) { echo "configure: error: "--enable-sim-assert does not take a value"" 1>&2; exit 1; }; sim_assert="";; esac if test x"$silent" != x"yes" && test x"$sim_assert" != x""; then echo "Setting assert flags = $sim_assert" 6>&1 @@ -785,13 +808,28 @@ else sim_assert="" fi +# Check whether --enable-sim-reserved-bits or --disable-sim-reserved-bits was given. +enableval="$enable_sim_reserved_bits" +if test -n "$enableval"; then + case "${enableval}" in + yes) sim_reserved="-DWITH_RESERVED_BITS=1";; + no) sim_reserved="-DWITH_RESERVED_BITS=0";; + *) { echo "configure: error: "--enable-sim-reserved-bits does not take a value"" 1>&2; exit 1; }; sim_reserved="";; +esac +if test x"$silent" != x"yes" && test x"$sim_reserved" != x""; then + echo "Setting reserved flags = $sim_reserved" 6>&1 +fi +else + sim_reserved="" +fi + # Check whether --enable-sim-float or --disable-sim-float was given. enableval="$enable_sim_float" if test -n "$enableval"; then case "${enableval}" in yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";; no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";; - *) sim_float="";; + *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-float"" 1>&2; exit 1; }; sim_float="";; esac if test x"$silent" != x"yes" && test x"$sim_float" != x""; then echo "Setting float flags = $sim_float" 6>&1 @@ -808,7 +846,7 @@ if test -n "$enableval"; then no) sim_mon="-DWITH_MON=0";; instruction) sim_mon="-DWITH_MON=MONITOR_INSTRUCTION_ISSUE";; memory) sim_mon="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";; - *) sim_mon="-DWITH_MON='$enableval'";; + *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-mon"" 1>&2; exit 1; }; sim_env="";; esac if test x"$silent" != x"yes" && test x"$sim_mon" != x""; then echo "Setting monitor flags = $sim_mon" 6>&1 @@ -823,7 +861,7 @@ if test -n "$enableval"; then case "${enableval}" in yes) sim_func="-DWITH_FUNCTION_UNIT=1";; no) sim_func="-DWITH_FUNCTION_UNIT=0";; - *) sim_func="";; + *) { echo "configure: error: "--enable-sim-function-unit does not take a value"" 1>&2; exit 1; }; sim_func="";; esac if test x"$silent" != x"yes" && test x"$sim_func" != x""; then echo "Setting function-unit flags = $sim_func" 6>&1 @@ -836,9 +874,8 @@ fi enableval="$enable_sim_model" if test -n "$enableval"; then case "${enableval}" in - yes) sim_model="";; - no) sim_model="";; - *) sim_model="-DWITH_PPC_MODEL=${enableval}";; + yes|no) { echo "configure: error: "No value supplied for --enable-sim-model=model"" 1>&2; exit 1; };; + *) sim_model="-DWITH_MODEL=${enableval}";; esac if test x"$silent" != x"yes" && test x"$sim_model" != x""; then echo "Setting model flags = $sim_model" 6>&1 @@ -851,9 +888,8 @@ fi enableval="$enable_sim_default_model" if test -n "$enableval"; then case "${enableval}" in - yes) sim_default_model="";; - no) sim_default_model="";; - *) sim_default_model="-DWITH_DEFAULT_PPC_MODEL=${enableval}";; + yes|no) { echo "configure: error: "No value supplied for --enable-sim-default-model=model"" 1>&2; exit 1; };; + *) sim_default_model="-DWITH_DEFAULT_MODEL=${enableval}";; esac if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then echo "Setting default-model flags = $sim_default_model" 6>&1 @@ -1120,6 +1156,7 @@ fi + for ac_func in getrusage do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 @@ -1127,7 +1164,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 1131 "configure" +#line 1168 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1182,7 +1219,7 @@ else ac_cv_c_cross=yes else cat > conftest.$ac_ext <<EOF -#line 1186 "configure" +#line 1223 "configure" #include "confdefs.h" main(){return(0);} EOF @@ -1220,7 +1257,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 1224 "configure" +#line 1261 "configure" #include "confdefs.h" #include <assert.h> Syntax Error @@ -1234,7 +1271,7 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 1238 "configure" +#line 1275 "configure" #include "confdefs.h" #include <assert.h> Syntax Error @@ -1267,7 +1304,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 1271 "configure" +#line 1308 "configure" #include "confdefs.h" #include <$ac_hdr> EOF @@ -1438,6 +1475,7 @@ s%@sim_alignment@%$sim_alignment%g s%@sim_float@%$sim_float%g s%@sim_trace@%$sim_trace%g s%@sim_assert@%$sim_assert%g +s%@sim_reserved@%$sim_reserved%g s%@sim_monitor@%$sim_monitor%g s%@sim_func@%$sim_func%g s%@sim_model@%$sim_model%g |