1 dnl Copyright (C) 1997-2024 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 dnl 16 dnl --enable-sim-float is for developers of the simulator 17 dnl It specifies the presence of hardware floating point 18 dnl And optionally the bitsize of the floating point register. 19 dnl arg[1] specifies the presence (or absence) of floating point hardware 20 dnl arg[2] specifies the number of bits in a floating point register 21 AC_DEFUN([SIM_AC_OPTION_FLOAT], 22 [ 23 default_sim_float="[$1]" 24 default_sim_float_bitsize="[$2]" 25 AC_ARG_ENABLE(sim-float, 26 [AS_HELP_STRING([--enable-sim-float], 27 [Specify that the target processor has floating point hardware])], 28 [case "${enableval}" in 29 yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";; 30 no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";; 31 32) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=32";; 32 64) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=64";; 33 *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-float"); sim_float="";; 34 esac 35 if test x"$silent" != x"yes" && test x"$sim_float" != x""; then 36 echo "Setting float flags = $sim_float" 6>&1 37 fi],[ 38 sim_float= 39 if test x"${default_sim_float}" != x""; then 40 sim_float="-DWITH_FLOATING_POINT=${default_sim_float}" 41 fi 42 if test x"${default_sim_float_bitsize}" != x""; then 43 sim_float="$sim_float -DWITH_TARGET_FLOATING_POINT_BITSIZE=${default_sim_float_bitsize}" 44 fi 45 ])dnl 46 ]) 47 AC_SUBST(sim_float) 48