aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2022-05-13 22:18:25 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2022-05-14 01:24:22 +0000
commit448c505c33cc334193590f3844406d6a74f26e2a (patch)
treefc01262491c4871ce9d292734959e18193368053 /lib
parent20917cac7bcf216225a7b66f7b3a56f3764c5acc (diff)
downloadsrc-448c505c33cc334193590f3844406d6a74f26e2a.tar.gz
src-448c505c33cc334193590f3844406d6a74f26e2a.zip
libm: Add feenableexcept and fedisableexcept to library on powerpc
Summary: These functions are missing from the library itself, and exist solely in the header. This breaks a few ports that expect libm to have the symbols in the library itself. Questions on MFC-ability: Can this be MFC'd to 13.2, and how? Reviewers: imp, emaste, kib Reviewed By: kib Differential Revision: https://reviews.freebsd.org/D35204
Diffstat (limited to 'lib')
-rw-r--r--lib/msun/powerpc/Symbol.map5
-rw-r--r--lib/msun/powerpc/fenv.c2
-rw-r--r--lib/msun/powerpc/fenv.h7
3 files changed, 10 insertions, 4 deletions
diff --git a/lib/msun/powerpc/Symbol.map b/lib/msun/powerpc/Symbol.map
index 971112e30c8a..47eca6f99f31 100644
--- a/lib/msun/powerpc/Symbol.map
+++ b/lib/msun/powerpc/Symbol.map
@@ -11,3 +11,8 @@ FBSD_1.3 {
feholdexcept;
feupdateenv;
};
+
+FBSD_1.7 {
+ feenableexcept;
+ fedisableexcept;
+};
diff --git a/lib/msun/powerpc/fenv.c b/lib/msun/powerpc/fenv.c
index 1a5644547958..7dc186a1d9e5 100644
--- a/lib/msun/powerpc/fenv.c
+++ b/lib/msun/powerpc/fenv.c
@@ -58,6 +58,8 @@ extern inline int fegetenv(fenv_t *__envp);
extern inline int feholdexcept(fenv_t *__envp);
extern inline int fesetenv(const fenv_t *__envp);
extern inline int feupdateenv(const fenv_t *__envp);
+extern inline int feenableexcept(int __mask);
+extern inline int fedisableexcept(int __mask);
#ifdef __SPE__
#define PMAX 0x7f7fffff
diff --git a/lib/msun/powerpc/fenv.h b/lib/msun/powerpc/fenv.h
index 21a70df3d104..83ba6b356af5 100644
--- a/lib/msun/powerpc/fenv.h
+++ b/lib/msun/powerpc/fenv.h
@@ -264,9 +264,7 @@ feupdateenv(const fenv_t *__envp)
#if __BSD_VISIBLE
-/* We currently provide no external definitions of the functions below. */
-
-static inline int
+__fenv_static inline int
feenableexcept(int __mask)
{
union __fpscr __r;
@@ -279,7 +277,7 @@ feenableexcept(int __mask)
return ((__oldmask & _ENABLE_MASK) << _FPUSW_SHIFT);
}
-static inline int
+__fenv_static inline int
fedisableexcept(int __mask)
{
union __fpscr __r;
@@ -292,6 +290,7 @@ fedisableexcept(int __mask)
return ((__oldmask & _ENABLE_MASK) << _FPUSW_SHIFT);
}
+/* We currently provide no external definition of fegetexcept(). */
static inline int
fegetexcept(void)
{