]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/m4/sim_ac_option_reserved_bits.m4
sim: common: split up acinclude.m4 into individual m4 files
[thirdparty/binutils-gdb.git] / sim / m4 / sim_ac_option_reserved_bits.m4
1 dnl Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 dnl
3 dnl This program is free software; you can redistribute it and/or modify
4 dnl it under the terms of the GNU General Public License as published by
5 dnl the Free Software Foundation; either version 3 of the License, or
6 dnl (at your option) any later version.
7 dnl
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 dnl GNU General Public License for more details.
12 dnl
13 dnl You should have received a copy of the GNU General Public License
14 dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
15 AC_DEFUN([SIM_AC_OPTION_RESERVED_BITS],
16 [
17 default_sim_reserved_bits="ifelse([$1],,1,[$1])"
18 AC_ARG_ENABLE(sim-reserved-bits,
19 [AS_HELP_STRING([--enable-sim-reserved-bits],
20 [Specify whether to check reserved bits in instruction])],
21 [case "${enableval}" in
22 yes) sim_reserved_bits="-DWITH_RESERVED_BITS=1";;
23 no) sim_reserved_bits="-DWITH_RESERVED_BITS=0";;
24 *) AC_MSG_ERROR("--enable-sim-reserved-bits does not take a value"); sim_reserved_bits="";;
25 esac
26 if test x"$silent" != x"yes" && test x"$sim_reserved_bits" != x""; then
27 echo "Setting reserved flags = $sim_reserved_bits" 6>&1
28 fi],[sim_reserved_bits="-DWITH_RESERVED_BITS=${default_sim_reserved_bits}"])dnl
29 ])
30 AC_SUBST(sim_reserved_bits)