aboutsummaryrefslogtreecommitdiff
path: root/sim/m4
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-07-01 01:04:48 -0400
committerMike Frysinger <vapier@gentoo.org>2021-07-01 20:53:00 -0400
commit7eb1f99adaa3515463b6082e4a911d8b334e852f (patch)
tree914ebe6a8f134e179355d95dd07814b01e11c020 /sim/m4
parent313c332ff2d5cb2a681149254ca73ba041aa8630 (diff)
downloadgdb-7eb1f99adaa3515463b6082e4a911d8b334e852f.zip
gdb-7eb1f99adaa3515463b6082e4a911d8b334e852f.tar.gz
gdb-7eb1f99adaa3515463b6082e4a911d8b334e852f.tar.bz2
sim: unify reserved instruction bits settings
Move these options up to the common dir so we only test & export them once across all ports. The setting only affects igen based ports, and they were turning this on by default, so keep the default in place.
Diffstat (limited to 'sim/m4')
-rw-r--r--sim/m4/sim_ac_option_reserved_bits.m423
-rw-r--r--sim/m4/sim_ac_output.m41
2 files changed, 13 insertions, 11 deletions
diff --git a/sim/m4/sim_ac_option_reserved_bits.m4 b/sim/m4/sim_ac_option_reserved_bits.m4
index 8147ed8..c65f87b 100644
--- a/sim/m4/sim_ac_option_reserved_bits.m4
+++ b/sim/m4/sim_ac_option_reserved_bits.m4
@@ -13,18 +13,21 @@ 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_RESERVED_BITS],
-[
-default_sim_reserved_bits="ifelse([$1],,1,[$1])"
+[dnl
+AC_MSG_CHECKING([whether to check reserved bits in instruction])
AC_ARG_ENABLE(sim-reserved-bits,
[AS_HELP_STRING([--enable-sim-reserved-bits],
[Specify whether to check reserved bits in instruction])],
[case "${enableval}" in
- yes) sim_reserved_bits="-DWITH_RESERVED_BITS=1";;
- no) sim_reserved_bits="-DWITH_RESERVED_BITS=0";;
- *) AC_MSG_ERROR("--enable-sim-reserved-bits does not take a value"); sim_reserved_bits="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_reserved_bits" != x""; then
- echo "Setting reserved flags = $sim_reserved_bits" 6>&1
-fi],[sim_reserved_bits="-DWITH_RESERVED_BITS=${default_sim_reserved_bits}"])dnl
+yes|no) ;;
+*) AC_MSG_ERROR("--enable-sim-reserved-bits does not take a value");;
+esac])
+if test "x${enable_sim_reserved_bits}" != xno; then
+ sim_reserved_bits=1
+ AC_MSG_RESULT([yes])
+else
+ sim_reserved_bits=0
+ AC_MSG_RESULT([no])
+fi
+AC_DEFINE_UNQUOTED([WITH_RESERVED_BITS], [$sim_reserved_bits], [Sim reserved bits setting])
])
-AC_SUBST(sim_reserved_bits)
diff --git a/sim/m4/sim_ac_output.m4 b/sim/m4/sim_ac_output.m4
index 3866213..256187d 100644
--- a/sim/m4/sim_ac_output.m4
+++ b/sim/m4/sim_ac_output.m4
@@ -47,7 +47,6 @@ dnl but always used by common/Make-common.in. So we have to subst here even
dnl when the rest of the code is in the respective macros.
AC_SUBST(sim_bitsize)
AC_SUBST(sim_float)
-AC_SUBST(sim_reserved_bits)
dnl Used by common/Make-common.in to see which configure script created it.
SIM_COMMON_BUILD_TRUE='#'