public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 4/5] sim: mips: move fpu bitsize defines to top-level configure
Date: Wed, 21 Dec 2022 00:13:21 -0500	[thread overview]
Message-ID: <20221221051322.4163-4-vapier@gentoo.org> (raw)
In-Reply-To: <20221221051322.4163-1-vapier@gentoo.org>

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           |  1 +
 sim/arch-subdir.mk.in     |  1 +
 sim/configure             | 28 ++++++++++++++++++--
 sim/mips/Makefile.in      |  1 +
 sim/mips/acinclude-top.m4 | 13 ++++++++++
 sim/mips/aclocal.m4       |  1 -
 sim/mips/configure        | 54 ++-------------------------------------
 sim/mips/configure.ac     | 16 ------------
 8 files changed, 44 insertions(+), 71 deletions(-)

diff --git a/sim/arch-subdir.mk.in b/sim/arch-subdir.mk.in
index 38a18a378fd7..6ac9ab8beb52 100644
--- a/sim/arch-subdir.mk.in
+++ b/sim/arch-subdir.mk.in
@@ -78,3 +78,4 @@ SIM_HW_OBJS = $(SIM_COMMON_HW_OBJS) $(SIM_HW_DEVICES:%=dv-%.o) $(SIM_HW_SOCKSER)
 # 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@
diff --git a/sim/mips/Makefile.in b/sim/mips/Makefile.in
index aa872883ec70..ff9763b720b1 100644
--- a/sim/mips/Makefile.in
+++ b/sim/mips/Makefile.in
@@ -70,6 +70,7 @@ SIM_EXTRA_HW_DEVICES = tx3904cpu tx3904irc tx3904tmr tx3904sio
 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 2d53bee13576..612aa92a2b80 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/configure.ac b/sim/mips/configure.ac
index d820b816fe01..6d158d7b0559 100644
--- a/sim/mips/configure.ac
+++ b/sim/mips/configure.ac
@@ -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
 #
-- 
2.39.0


  parent reply	other threads:[~2022-12-21  5:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-21  5:13 [PATCH 1/5] sim: mips: always resolve active bfd mach dynamically Mike Frysinger
2022-12-21  5:13 ` [PATCH 2/5] sim: mips: move subtarget defines to top-level configure Mike Frysinger
2022-12-21  5:13 ` [PATCH 3/5] sim: mips: move bitsize " Mike Frysinger
2022-12-21  5:13 ` Mike Frysinger [this message]
2022-12-21  5:13 ` [PATCH 5/5] sim: mips: match target on cpu settings Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221221051322.4163-4-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).