summaryrefslogtreecommitdiff
path: root/sim/mips
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-11-11 16:15:46 +0700
committerMike Frysinger <vapier@gentoo.org>2022-12-21 22:27:12 -0500
commitd455df988abbc7b8c29a77f2dfe8439a9ffa8881 (patch)
treecef5e3aaa3911670823fa44604d75be60d41e46e /sim/mips
parent19b11256a55c86a6871e1a10308ad7b68119a9c4 (diff)
downloadbinutils-gdb-d455df988abbc7b8c29a77f2dfe8439a9ffa8881.tar.gz
sim: mips: move fpu bitsize defines to top-level configure
This drops support for the --enable-sim-float configure option, but it's not clear anyone ever actually used that. Eventually we'll want this to be a runtime option anyways.
Diffstat (limited to 'sim/mips')
-rw-r--r--sim/mips/Makefile.in1
-rw-r--r--sim/mips/acinclude-top.m413
-rw-r--r--sim/mips/aclocal.m41
-rwxr-xr-xsim/mips/configure54
-rw-r--r--sim/mips/configure.ac16
5 files changed, 16 insertions, 69 deletions
diff --git a/sim/mips/Makefile.in b/sim/mips/Makefile.in
index 328c1915073..fa32aace282 100644
--- a/sim/mips/Makefile.in
+++ b/sim/mips/Makefile.in
@@ -70,6 +70,7 @@ SIM_OBJS = \
SIM_EXTRA_CFLAGS = $(SIM_MIPS_SUBTARGET)
SIM_BITSIZE = $(SIM_MIPS_BITSIZE)
+SIM_FLOAT = -DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=$(SIM_MIPS_FPU_BITSIZE)
SIM_EXTRA_CLEAN = clean-extra
SIM_EXTRA_DISTCLEAN = distclean-extra
diff --git a/sim/mips/acinclude-top.m4 b/sim/mips/acinclude-top.m4
index 2d53bee1357..612aa92a2b8 100644
--- a/sim/mips/acinclude-top.m4
+++ b/sim/mips/acinclude-top.m4
@@ -46,3 +46,16 @@ AS_CASE([${target}],
[mips*-*-*], [SIM_MIPS_BITSIZE=32])
AC_MSG_RESULT([$SIM_MIPS_BITSIZE])
AC_SUBST(SIM_MIPS_BITSIZE)
+
+dnl Select the floating hardware support of the target.
+AC_MSG_CHECKING([mips fpu bitsize])
+SIM_MIPS_FPU_BITSIZE=64
+AS_CASE([${target}],
+ [mips*tx39*], [SIM_MIPS_FPU_BITSIZE=32],
+ [mips*-sde-elf*], [SIM_MIPS_FPU_BITSIZE=64],
+ [mips*-mti-elf*], [SIM_MIPS_FPU_BITSIZE=64],
+ [mipsisa32*-*-*], [SIM_MIPS_FPU_BITSIZE=64],
+ [mipsisa64*-*-*], [SIM_MIPS_FPU_BITSIZE=64],
+ [mips*-*-*], [SIM_MIPS_FPU_BITSIZE=32])
+AC_MSG_RESULT([$SIM_MIPS_FPU_BITSIZE])
+AC_SUBST(SIM_MIPS_FPU_BITSIZE)
diff --git a/sim/mips/aclocal.m4 b/sim/mips/aclocal.m4
index 6d4e93ea5c6..c9414d4680f 100644
--- a/sim/mips/aclocal.m4
+++ b/sim/mips/aclocal.m4
@@ -12,5 +12,4 @@
# PARTICULAR PURPOSE.
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
-m4_include([../m4/sim_ac_option_float.m4])
m4_include([../m4/sim_ac_output.m4])
diff --git a/sim/mips/configure b/sim/mips/configure
index 7d80b506482..794c12c737b 100755
--- a/sim/mips/configure
+++ b/sim/mips/configure
@@ -586,6 +586,7 @@ ac_subst_vars='LTLIBOBJS
LIBOBJS
SIM_COMMON_BUILD_FALSE
SIM_COMMON_BUILD_TRUE
+sim_float
sim_bitsize
sim_multi_obj
sim_multi_src
@@ -645,12 +646,10 @@ PACKAGE_VERSION
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
-SHELL
-sim_float'
+SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
-enable_sim_float
'
ac_precious_vars='build_alias
host_alias
@@ -1263,13 +1262,6 @@ if test -n "$ac_init_help"; then
cat <<\_ACEOF
-Optional Features:
- --disable-option-checking ignore unrecognized --enable/--with options
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-sim-float Specify that the target processor has floating point
- hardware
-
Report bugs to the package provider.
_ACEOF
ac_status=$?
@@ -1842,48 +1834,6 @@ test -n "$target_alias" &&
#
-# Select the floating hardware support of the target
-#
-mips_fpu_bitsize=
-case "${target}" in
- mips*tx39*) mips_fpu_bitsize=32 ;;
- mips*-sde-elf*) mips_fpu_bitsize=64 ;;
- mips*-mti-elf*) mips_fpu_bitsize=64 ;;
- mipsisa32*-*-*) mips_fpu_bitsize=64 ;;
- mipsisa64*-*-*) mips_fpu_bitsize=64 ;;
- mips*-*-*) mips_fpu_bitsize=32 ;;
-esac
-
-default_sim_float="HARD_FLOATING_POINT"
-default_sim_float_bitsize="$mips_fpu_bitsize"
-# Check whether --enable-sim-float was given.
-if test "${enable_sim_float+set}" = set; then :
- enableval=$enable_sim_float; case "${enableval}" in
- yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
- no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
- 32) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=32";;
- 64) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=64";;
- *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-float\"" "$LINENO" 5; sim_float="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_float" != x""; then
- echo "Setting float flags = $sim_float" 6>&1
-fi
-else
-
-sim_float=
-if test x"${default_sim_float}" != x""; then
- sim_float="-DWITH_FLOATING_POINT=${default_sim_float}"
-fi
-if test x"${default_sim_float_bitsize}" != x""; then
- sim_float="$sim_float -DWITH_TARGET_FLOATING_POINT_BITSIZE=${default_sim_float_bitsize}"
-fi
-
-fi
-
-
-
-
-#
# Select the IGEN architecture
#
sim_gen=IGEN
diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac
index d820b816fe0..6d158d7b055 100644
--- a/sim/mips/configure.ac
+++ b/sim/mips/configure.ac
@@ -7,22 +7,6 @@ dnl and until we clean that up, we need to expand --target for use below.
AC_CANONICAL_SYSTEM
#
-# Select the floating hardware support of the target
-#
-mips_fpu_bitsize=
-case "${target}" in
- mips*tx39*) mips_fpu_bitsize=32 ;;
- mips*-sde-elf*) mips_fpu_bitsize=64 ;;
- mips*-mti-elf*) mips_fpu_bitsize=64 ;;
- mipsisa32*-*-*) mips_fpu_bitsize=64 ;;
- mipsisa64*-*-*) mips_fpu_bitsize=64 ;;
- mips*-*-*) mips_fpu_bitsize=32 ;;
-esac
-SIM_AC_OPTION_FLOAT(HARD_FLOATING_POINT,$mips_fpu_bitsize)
-
-
-
-#
# Select the IGEN architecture
#
sim_gen=IGEN