mirror of git://sourceware.org/git/glibc.git
math: Add fetestexcept internal alias
To avoid linknamespace issues on old standards. It is required if the fallback fma implementation is used if/when it is also used internally for other implementation. Reviewed-by: DJ Delorie <dj@redhat.com>
This commit is contained in:
parent
41c2f1d9a3
commit
63ba1a1509
|
@ -16,6 +16,7 @@ extern int __feupdateenv (const fenv_t *__envp);
|
|||
extern __typeof (fegetround) __fegetround __attribute_pure__;
|
||||
extern __typeof (feholdexcept) __feholdexcept;
|
||||
extern __typeof (fesetround) __fesetround;
|
||||
extern __typeof (fetestexcept) __fetestexcept;
|
||||
|
||||
libm_hidden_proto (feraiseexcept)
|
||||
libm_hidden_proto (__feraiseexcept)
|
||||
|
@ -32,6 +33,7 @@ libm_hidden_proto (__feholdexcept)
|
|||
libm_hidden_proto (feupdateenv)
|
||||
libm_hidden_proto (__feupdateenv)
|
||||
libm_hidden_proto (fetestexcept)
|
||||
libm_hidden_proto (__fetestexcept)
|
||||
libm_hidden_proto (feclearexcept)
|
||||
libm_hidden_proto (__feclearexcept)
|
||||
|
||||
|
|
|
@ -19,9 +19,11 @@
|
|||
#include <fenv.h>
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
stub_warning (fetestexcept)
|
||||
|
|
|
@ -20,8 +20,10 @@
|
|||
#include <fenv_private.h>
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
return libc_fetestexcept_aarch64 (excepts);
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <fenv_libc.h>
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
unsigned long tmp;
|
||||
|
||||
|
@ -28,4 +28,6 @@ fetestexcept (int excepts)
|
|||
|
||||
return tmp & excepts & SWCR_STATUS_MASK;
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
unsigned int fpsr;
|
||||
|
||||
|
@ -30,4 +30,6 @@ fetestexcept (int excepts)
|
|||
|
||||
return fpsr & excepts;
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
/* Return no exception flags if a VFP unit isn't present. */
|
||||
if (!ARM_HAVE_VFP)
|
||||
|
@ -29,4 +29,6 @@ fetestexcept (int excepts)
|
|||
|
||||
return libc_fetestexcept_vfp (excepts);
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
|
@ -23,8 +23,10 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
return libc_fetestexcept_vfp (excepts);
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
|
@ -82,13 +82,13 @@ default_libc_feholdexcept_setround (fenv_t *e, int r)
|
|||
#endif
|
||||
|
||||
#ifndef libc_fetestexcept
|
||||
# define libc_fetestexcept fetestexcept
|
||||
# define libc_fetestexcept __fetestexcept
|
||||
#endif
|
||||
#ifndef libc_fetestexceptf
|
||||
# define libc_fetestexceptf fetestexcept
|
||||
# define libc_fetestexceptf __fetestexcept
|
||||
#endif
|
||||
#ifndef libc_fetestexceptl
|
||||
# define libc_fetestexceptl fetestexcept
|
||||
# define libc_fetestexceptl __fetestexcept
|
||||
#endif
|
||||
|
||||
static __always_inline void
|
||||
|
@ -130,7 +130,7 @@ default_libc_feupdateenv (fenv_t *e)
|
|||
static __always_inline int
|
||||
default_libc_feupdateenv_test (fenv_t *e, int ex)
|
||||
{
|
||||
int ret = fetestexcept (ex);
|
||||
int ret = __fetestexcept (ex);
|
||||
__feupdateenv (e);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <fenv.h>
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
union { unsigned long long l; unsigned int sw[2]; } s;
|
||||
|
||||
|
@ -30,4 +30,6 @@ fetestexcept (int excepts)
|
|||
|
||||
return (s.sw[0] >> 27) & excepts & FE_ALL_EXCEPT;
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <ldsodefs.h>
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
short temp;
|
||||
int xtemp = 0;
|
||||
|
@ -35,4 +35,6 @@ fetestexcept (int excepts)
|
|||
|
||||
return (temp | xtemp) & excepts & FE_ALL_EXCEPT;
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <fpu_control.h>
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
int cw;
|
||||
|
||||
|
@ -29,4 +29,6 @@ fetestexcept (int excepts)
|
|||
|
||||
return cw & excepts & FE_ALL_EXCEPT;
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <fenv.h>
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
fexcept_t fpsr;
|
||||
|
||||
|
@ -28,4 +28,6 @@ fetestexcept (int excepts)
|
|||
|
||||
return fpsr & excepts & FE_ALL_EXCEPT;
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <fpu_control.h>
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
int cw;
|
||||
|
||||
|
@ -29,4 +29,6 @@ fetestexcept (int excepts)
|
|||
|
||||
return cw & excepts & FE_ALL_EXCEPT;
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
|
@ -20,8 +20,10 @@
|
|||
#include <fenv_private.h>
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
return libc_fetestexcept_or1k (excepts);
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <fenv_libc.h>
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
fenv_union_t u;
|
||||
|
||||
|
@ -30,4 +30,6 @@ fetestexcept (int excepts)
|
|||
just: */
|
||||
return u.l & excepts;
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
|
@ -20,8 +20,10 @@
|
|||
#include "soft-supp.h"
|
||||
|
||||
int
|
||||
fetestexcept (int x)
|
||||
__fetestexcept (int x)
|
||||
{
|
||||
return __sim_exceptions_thread & x;
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
|
@ -20,8 +20,10 @@
|
|||
#include <fenv_private.h>
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
return libc_fetestexcept_riscv (excepts);
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
|
@ -19,8 +19,10 @@
|
|||
#include <fenv_private.h>
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
return libc_fetestexcept_s390 (excepts);
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <fpu_control.h>
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
fpu_control_t temp;
|
||||
|
||||
|
@ -29,4 +29,6 @@ fetestexcept (int excepts)
|
|||
|
||||
return temp & excepts & FE_ALL_EXCEPT;
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <fenv_private.h>
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
fenv_t tmp;
|
||||
|
||||
|
@ -28,4 +28,6 @@ fetestexcept (int excepts)
|
|||
|
||||
return tmp & excepts & FE_ALL_EXCEPT;
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <fenv.h>
|
||||
|
||||
int
|
||||
fetestexcept (int excepts)
|
||||
__fetestexcept (int excepts)
|
||||
{
|
||||
int temp;
|
||||
unsigned int mxscr;
|
||||
|
@ -30,4 +30,6 @@ fetestexcept (int excepts)
|
|||
|
||||
return (temp | mxscr) & excepts & FE_ALL_EXCEPT;
|
||||
}
|
||||
libm_hidden_def (__fetestexcept)
|
||||
weak_alias (__fetestexcept, fetestexcept)
|
||||
libm_hidden_def (fetestexcept)
|
||||
|
|
Loading…
Reference in New Issue