Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156924013
D44334.id135681.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D44334.id135681.diff
View Options
diff --git a/lib/libc/riscv/gen/flt_rounds.c b/lib/libc/riscv/gen/flt_rounds.c
--- a/lib/libc/riscv/gen/flt_rounds.c
+++ b/lib/libc/riscv/gen/flt_rounds.c
@@ -37,22 +37,12 @@
#include <fenv.h>
#include <float.h>
-#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
--- a/lib/msun/riscv/Symbol.map
+++ b/lib/msun/riscv/Symbol.map
@@ -4,9 +4,6 @@
fegetenv;
feholdexcept;
feupdateenv;
-#ifdef __riscv_float_abi_soft
- fegetexcept;
-#endif
};
FBSD_1.8 {
diff --git a/lib/msun/riscv/fenv.h b/lib/msun/riscv/fenv.h
--- a/lib/msun/riscv/fenv.h
+++ b/lib/msun/riscv/fenv.h
@@ -71,32 +71,20 @@
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)
+#ifdef __riscv_float_abi_soft
+#error soft float ABI is not supported
+#endif
+#if !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
+#error compiler did not set float macros
#endif
#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 +200,9 @@
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 +230,6 @@
return (0);
}
-#endif /* !__riscv_float_abi_soft */
#endif /* __BSD_VISIBLE */
diff --git a/lib/msun/riscv/fenv.c b/lib/msun/riscv/fenv.c
--- 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);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, May 18, 9:39 AM (6 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33242562
Default Alt Text
D44334.id135681.diff (3 KB)
Attached To
Mode
D44334: riscv: remove more riscv64sf support
Attached
Detach File
Event Timeline
Log In to Comment