From nobody Thu Mar 21 23:50:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V12JR330Lz5F5Vj; Thu, 21 Mar 2024 23:50:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V12JR2dH7z4r90; Thu, 21 Mar 2024 23:50:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711065015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LvixxFduTqsY5TaCP7ftD0aDhEYR8gzzlp9sMMaL3KQ=; b=H3y5xdK0M4CxgBcDIhgPMnDBSrXS2l8wErPRSBmSd23RtBsi1UC1KJqqKo2N5Jj/4NN6yy K6GCwKtC73cyL9aTjK2rmPgl+tyShjWLOg75WtS+mZ+aN34FFFzz06tWwp4hPSg9rUKXYO RhM0vtRPWOumHtuUd2jIs9gmSx4w+hVE8sVt4neNp6S5fPoDilkB9BweIwfaIBo62mQ6+n PFNLlA2CYNB2fB7+2As+pF2DdXWr0Lf8pQgi1vn46ei2hTlgm/a8LzoDKh0YcUAQ9LqBiM m+FaiCqAReXAg0ws22m7h7HLY2sl1q2veU4pfRuTK64kmVYEpwjcPcpcdrybhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711065015; a=rsa-sha256; cv=none; b=DpFfe41WAnB6ViAarlhXmc9hxdjhSPfYoaNNOcUuTaejYojDIRGg+7EfcgHxWebDxD7sz/ qeB0v3BGdvnx6pEc6NwCgkJDrSwRUjpcEtl3eS9ZQ4catzmDEntpLbD2XdC36A65cyAK+k VI31dgaQ7EWof6qZlnvnut3iQvDT8frMMlrzJ1ep9p026mBjzdcyWcg/r8phMa2B52rSbI 0+7pd5H2U/ooaGSjfduzPK7Ddq50R/avkCafUL04HoAJ3YT3xkk1BWNAnK+rla6naajiK3 git49DDDBBg5mLeacTBLM6ImQwXjIcTxF34grfDPbSMi2MJBMJ7q6ubqOQM+wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711065015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LvixxFduTqsY5TaCP7ftD0aDhEYR8gzzlp9sMMaL3KQ=; b=nkY9Znngip0hDWVSFmBw8g2W0C3+nfqLhiNYwf2iVBoMatBn+G34cE60Q5tpDomW5czatP 1s1rTBALhJIurWbISedcYOhQqASjdgrVtpagyeRqBu945VhWZJVotpCRGviVk2AlT60Pki Dtdv3bjQYi+krPPk2cXzydsCj36O35TfroIoRFd3OCVbRBn+aQ433jiRH0G5SqalIEZMSA 5oxTpSjzHhT02XGH4kqXUajYa7xEamzsWZdntDz8SgIauubRx1ERuJwoFFC5MfvqAwICek o+grrj3J2Yk+waONTGa1KBTHVgnJ9DzEfGcK7/ieiuoXCA6In2IeCo7sQPrAtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V12JR2DWhzwnw; Thu, 21 Mar 2024 23:50:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42LNoFe5008730; Thu, 21 Mar 2024 23:50:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42LNoFYj008722; Thu, 21 Mar 2024 23:50:15 GMT (envelope-from git) Date: Thu, 21 Mar 2024 23:50:15 GMT Message-Id: <202403212350.42LNoFYj008722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 312a05c39e5f - main - riscv: remove more riscv64sf support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 312a05c39e5fd79b37ee6f922462232797f56a2a Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=312a05c39e5fd79b37ee6f922462232797f56a2a commit 312a05c39e5fd79b37ee6f922462232797f56a2a Author: Brooks Davis AuthorDate: 2024-03-21 23:46:28 +0000 Commit: Brooks Davis CommitDate: 2024-03-21 23:48:37 +0000 riscv: remove more riscv64sf support Remove a few more bits of riscv64sf support in libc and libm. Reduce floating point ABI checks to requiring double hard float. Reviewed by: imp, jhb Fixes: 1ca12bd927d7 Remove the riscv64sf architecture. Differential Revision: https://reviews.freebsd.org/D44334 --- lib/libc/riscv/gen/flt_rounds.c | 10 ---------- lib/msun/riscv/Symbol.map | 1 - lib/msun/riscv/fenv.c | 8 -------- lib/msun/riscv/fenv.h | 30 ++---------------------------- 4 files changed, 2 insertions(+), 47 deletions(-) diff --git a/lib/libc/riscv/gen/flt_rounds.c b/lib/libc/riscv/gen/flt_rounds.c index 5d3771ea6cd3..bccd7d8baa44 100644 --- a/lib/libc/riscv/gen/flt_rounds.c +++ b/lib/libc/riscv/gen/flt_rounds.c @@ -37,22 +37,12 @@ #include #include -#ifdef __riscv_float_abi_soft -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" -#endif - int __flt_rounds(void) { uint64_t mode; -#ifdef __riscv_float_abi_soft - mode = __softfloat_float_rounding_mode; -#else __asm __volatile("csrr %0, fcsr" : "=r" (mode)); -#endif switch (mode & _ROUND_MASK) { case FE_TOWARDZERO: diff --git a/lib/msun/riscv/Symbol.map b/lib/msun/riscv/Symbol.map index c3d72443cb2c..65157d0de9c1 100644 --- a/lib/msun/riscv/Symbol.map +++ b/lib/msun/riscv/Symbol.map @@ -4,7 +4,6 @@ FBSD_1.3 { fegetenv; feholdexcept; feupdateenv; - fegetexcept; }; FBSD_1.8 { diff --git a/lib/msun/riscv/fenv.c b/lib/msun/riscv/fenv.c index 9d7ae3d3fdaf..a4dde02a6ddc 100644 --- a/lib/msun/riscv/fenv.c +++ b/lib/msun/riscv/fenv.c @@ -37,14 +37,6 @@ */ const fenv_t __fe_dfl_env = 0; -#ifdef __riscv_float_abi_soft -#define __set_env(env, flags, mask, rnd) env = ((flags) | (rnd) << 5) -#define __env_flags(env) ((env) & FE_ALL_EXCEPT) -#define __env_mask(env) (0) /* No exception traps. */ -#define __env_round(env) (((env) >> 5) & _ROUND_MASK) -#include "fenv-softfloat.h" -#endif - extern inline int feclearexcept(int __excepts); extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts); diff --git a/lib/msun/riscv/fenv.h b/lib/msun/riscv/fenv.h index 36abb7b00b7d..cc50f0659248 100644 --- a/lib/msun/riscv/fenv.h +++ b/lib/msun/riscv/fenv.h @@ -71,32 +71,13 @@ __BEGIN_DECLS extern const fenv_t __fe_dfl_env; #define FE_DFL_ENV (&__fe_dfl_env) -#if !defined(__riscv_float_abi_soft) && !defined(__riscv_float_abi_double) -#if defined(__riscv_float_abi_single) -#error single precision floating point ABI not supported -#else -#error compiler did not set soft/hard float macros -#endif +#ifndef __riscv_float_abi_double +#error only double hard float ABI supported #endif -#ifndef __riscv_float_abi_soft #define __rfs(__fcsr) __asm __volatile("csrr %0, fcsr" : "=r" (__fcsr)) #define __wfs(__fcsr) __asm __volatile("csrw fcsr, %0" :: "r" (__fcsr)) -#endif -#ifdef __riscv_float_abi_soft -int feclearexcept(int __excepts); -int fegetexceptflag(fexcept_t *__flagp, int __excepts); -int fesetexceptflag(const fexcept_t *__flagp, int __excepts); -int feraiseexcept(int __excepts); -int fetestexcept(int __excepts); -int fegetround(void); -int fesetround(int __round); -int fegetenv(fenv_t *__envp); -int feholdexcept(fenv_t *__envp); -int fesetenv(const fenv_t *__envp); -int feupdateenv(const fenv_t *__envp); -#else __fenv_static inline int feclearexcept(int __excepts) { @@ -212,15 +193,9 @@ feupdateenv(const fenv_t *__envp) return (0); } -#endif /* !__riscv_float_abi_soft */ #if __BSD_VISIBLE -#ifdef __riscv_float_abi_soft -int feenableexcept(int __mask); -int fedisableexcept(int __mask); -int fegetexcept(void); -#else __fenv_static inline int feenableexcept(int __mask __unused) { @@ -248,7 +223,6 @@ fegetexcept(void) return (0); } -#endif /* !__riscv_float_abi_soft */ #endif /* __BSD_VISIBLE */