sim: mips: move fpu bitsize defines to top-level configure
authorMike Frysinger <vapier@gentoo.org>
Fri, 11 Nov 2022 09:15:46 +0000 (16:15 +0700)
committerMike Frysinger <vapier@gentoo.org>
Thu, 22 Dec 2022 03:27:12 +0000 (22:27 -0500)
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.

sim/Makefile.in
sim/arch-subdir.mk.in
sim/configure
sim/mips/Makefile.in
sim/mips/acinclude-top.m4
sim/mips/aclocal.m4
sim/mips/configure
sim/mips/configure.ac

index da5af94988eaa486efb0bfc20d668738634e0b11..817023a2e5b3cf8f04af81dca1a58b63bc5e2af5 100644 (file)
@@ -1107,6 +1107,7 @@ SIM_HW_CFLAGS = @SIM_HW_CFLAGS@
 SIM_HW_SOCKSER = @SIM_HW_SOCKSER@
 SIM_INLINE = @SIM_INLINE@
 SIM_MIPS_BITSIZE = @SIM_MIPS_BITSIZE@
+SIM_MIPS_FPU_BITSIZE = @SIM_MIPS_FPU_BITSIZE@
 SIM_MIPS_SUBTARGET = @SIM_MIPS_SUBTARGET@
 SIM_PRIMARY_TARGET = @SIM_PRIMARY_TARGET@
 SIM_RISCV_BITSIZE = @SIM_RISCV_BITSIZE@
index c98a39ed2d7e47cb68e967e60eaa5a9ffff420c8..8964b1d99329f12a8b4d4058f66c2c7f996d2e8a 100644 (file)
@@ -77,3 +77,4 @@ SIM_HW_OBJS = $(SIM_HW_DEVICES:%=dv-%.o)
 # This can be removed once mips/configure is gone.
 SIM_MIPS_SUBTARGET = @SIM_MIPS_SUBTARGET@
 SIM_MIPS_BITSIZE = -DWITH_TARGET_WORD_BITSIZE=@SIM_MIPS_BITSIZE@ -DWITH_TARGET_WORD_MSB=WITH_TARGET_WORD_BITSIZE-1
+SIM_MIPS_FPU_BITSIZE = @SIM_MIPS_FPU_BITSIZE@
index c818c106111a68e38e0493c0a6a525069c0b0940..ed08f10d57282606a4c77a65dcd813cee924d592 100755 (executable)
@@ -641,6 +641,7 @@ LTLIBOBJS
 include_makefile
 SIM_RX_CYCLE_ACCURATE_FLAGS
 SIM_RISCV_BITSIZE
+SIM_MIPS_FPU_BITSIZE
 SIM_MIPS_BITSIZE
 SIM_MIPS_SUBTARGET
 SIM_FRV_TRAPDUMP_FLAGS
@@ -12433,7 +12434,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12436 "configure"
+#line 12437 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12539,7 +12540,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12542 "configure"
+#line 12543 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -16327,6 +16328,29 @@ esac
 $as_echo "$SIM_MIPS_BITSIZE" >&6; }
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking mips fpu bitsize" >&5
+$as_echo_n "checking mips fpu bitsize... " >&6; }
+SIM_MIPS_FPU_BITSIZE=64
+case ${target} in #(
+  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 ;; #(
+  *) :
+     ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SIM_MIPS_FPU_BITSIZE" >&5
+$as_echo "$SIM_MIPS_FPU_BITSIZE" >&6; }
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking riscv bitsize" >&5
 $as_echo_n "checking riscv bitsize... " >&6; }
 SIM_RISCV_BITSIZE=64
index 328c191507349e88913a9f19de69a82c2e7f9032..fa32aace282b0057422dd4c685192a3e5f4f796f 100644 (file)
@@ -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
index 2d53bee13576a0a50bf3de219a53d12b877dbd9f..612aa92a2b80c601c58632cd0546598e3bd34b90 100644 (file)
@@ -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)
index 6d4e93ea5c6d17756378c0da2f0cc5a2fa59df0c..c9414d4680f1db90e5d5f6f1d4e8f0ee2eeb0f35 100644 (file)
@@ -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])
index 7d80b506482c0fe72b7213f815d22d4e4e270fd3..794c12c737bcf87f69be3f6e13d0b950a6b30ef3 100755 (executable)
@@ -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=$?
@@ -1841,48 +1833,6 @@ test -n "$target_alias" &&
   program_prefix=${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
 #
index d820b816fe0189cd5c46c02b097a7b47c1ce47d5..6d158d7b0559bf80e5931836bfb068035d3f49e1 100644 (file)
@@ -6,22 +6,6 @@ dnl The sim shouldn't be checking $target and changing behavior.  But it is,
 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
 #