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
This commit is contained in:
Justin Hibbits 2022-05-13 17:18:25 -05:00
parent 20917cac7b
commit 448c505c33
3 changed files with 10 additions and 4 deletions

View File

@ -11,3 +11,8 @@ FBSD_1.3 {
feholdexcept;
feupdateenv;
};
FBSD_1.7 {
feenableexcept;
fedisableexcept;
};

View File

@ -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

View File

@ -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)
{