mirror of git://sourceware.org/git/glibc.git
math: Add feclearexcept 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
1fdb73fb3c
commit
2eb8836de7
|
|
@ -33,6 +33,7 @@ libm_hidden_proto (feupdateenv)
|
||||||
libm_hidden_proto (__feupdateenv)
|
libm_hidden_proto (__feupdateenv)
|
||||||
libm_hidden_proto (fetestexcept)
|
libm_hidden_proto (fetestexcept)
|
||||||
libm_hidden_proto (feclearexcept)
|
libm_hidden_proto (feclearexcept)
|
||||||
|
libm_hidden_proto (__feclearexcept)
|
||||||
|
|
||||||
/* Rounding mode context. This allows functions to set/restore rounding mode
|
/* Rounding mode context. This allows functions to set/restore rounding mode
|
||||||
only when the desired rounding mode is different from the current rounding
|
only when the desired rounding mode is different from the current rounding
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ __feclearexcept (int excepts)
|
||||||
/* This always fails unless nothing needs to be done. */
|
/* This always fails unless nothing needs to be done. */
|
||||||
return (excepts != 0);
|
return (excepts != 0);
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
|
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
|
||||||
strong_alias (__feclearexcept, __old_feclearexcept)
|
strong_alias (__feclearexcept, __old_feclearexcept)
|
||||||
compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
|
compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
#include <fpu_control.h>
|
#include <fpu_control.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
feclearexcept (int excepts)
|
__feclearexcept (int excepts)
|
||||||
{
|
{
|
||||||
fpu_fpsr_t fpsr;
|
fpu_fpsr_t fpsr;
|
||||||
fpu_fpsr_t fpsr_new;
|
fpu_fpsr_t fpsr_new;
|
||||||
|
|
@ -35,4 +35,6 @@ feclearexcept (int excepts)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
weak_alias (__feclearexcept, feclearexcept)
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
libm_hidden_def (feclearexcept)
|
libm_hidden_def (feclearexcept)
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ __feclearexcept (int excepts)
|
||||||
/* Success. */
|
/* Success. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
|
|
||||||
#include <shlib-compat.h>
|
#include <shlib-compat.h>
|
||||||
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
|
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
#include <fpu_control.h>
|
#include <fpu_control.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
feclearexcept (int excepts)
|
__feclearexcept (int excepts)
|
||||||
{
|
{
|
||||||
unsigned int fpsr;
|
unsigned int fpsr;
|
||||||
|
|
||||||
|
|
@ -33,4 +33,6 @@ feclearexcept (int excepts)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
|
weak_alias (__feclearexcept, feclearexcept)
|
||||||
libm_hidden_def (feclearexcept)
|
libm_hidden_def (feclearexcept)
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
feclearexcept (int excepts)
|
__feclearexcept (int excepts)
|
||||||
{
|
{
|
||||||
fpu_control_t fpscr, new_fpscr;
|
fpu_control_t fpscr, new_fpscr;
|
||||||
|
|
||||||
|
|
@ -40,4 +40,6 @@ feclearexcept (int excepts)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
|
weak_alias (__feclearexcept, feclearexcept)
|
||||||
libm_hidden_def (feclearexcept)
|
libm_hidden_def (feclearexcept)
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
#include <fpu_control.h>
|
#include <fpu_control.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
feclearexcept (int excepts)
|
__feclearexcept (int excepts)
|
||||||
{
|
{
|
||||||
int fpsr;
|
int fpsr;
|
||||||
|
|
||||||
|
|
@ -39,4 +39,6 @@ feclearexcept (int excepts)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
|
weak_alias (__feclearexcept, feclearexcept)
|
||||||
libm_hidden_def (feclearexcept)
|
libm_hidden_def (feclearexcept)
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
#include <fenv.h>
|
#include <fenv.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
feclearexcept (int excepts)
|
__feclearexcept (int excepts)
|
||||||
{
|
{
|
||||||
union { unsigned long long l; unsigned int sw[2]; } s;
|
union { unsigned long long l; unsigned int sw[2]; } s;
|
||||||
|
|
||||||
|
|
@ -32,4 +32,6 @@ feclearexcept (int excepts)
|
||||||
/* Success. */
|
/* Success. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
|
weak_alias (__feclearexcept, feclearexcept)
|
||||||
libm_hidden_def (feclearexcept)
|
libm_hidden_def (feclearexcept)
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ __feclearexcept (int excepts)
|
||||||
/* Success. */
|
/* Success. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
|
|
||||||
#include <shlib-compat.h>
|
#include <shlib-compat.h>
|
||||||
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
|
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
#include <fpu_control.h>
|
#include <fpu_control.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
feclearexcept (int excepts)
|
__feclearexcept (int excepts)
|
||||||
{
|
{
|
||||||
int cw;
|
int cw;
|
||||||
|
|
||||||
|
|
@ -43,4 +43,6 @@ feclearexcept (int excepts)
|
||||||
/* Success. */
|
/* Success. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
|
weak_alias (__feclearexcept, feclearexcept)
|
||||||
libm_hidden_def (feclearexcept)
|
libm_hidden_def (feclearexcept)
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ __feclearexcept (int excepts)
|
||||||
/* Success. */
|
/* Success. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
|
|
||||||
#include <shlib-compat.h>
|
#include <shlib-compat.h>
|
||||||
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
|
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
#include <fpu_control.h>
|
#include <fpu_control.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
feclearexcept (int excepts)
|
__feclearexcept (int excepts)
|
||||||
{
|
{
|
||||||
int cw;
|
int cw;
|
||||||
|
|
||||||
|
|
@ -43,4 +43,6 @@ feclearexcept (int excepts)
|
||||||
/* Success. */
|
/* Success. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
|
weak_alias (__feclearexcept, feclearexcept)
|
||||||
libm_hidden_def (feclearexcept)
|
libm_hidden_def (feclearexcept)
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
#include <fpu_control.h>
|
#include <fpu_control.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
feclearexcept (int excepts)
|
__feclearexcept (int excepts)
|
||||||
{
|
{
|
||||||
fpu_control_t cw;
|
fpu_control_t cw;
|
||||||
fpu_control_t cw_new;
|
fpu_control_t cw_new;
|
||||||
|
|
@ -41,4 +41,6 @@ feclearexcept (int excepts)
|
||||||
/* Success. */
|
/* Success. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
|
weak_alias (__feclearexcept, feclearexcept)
|
||||||
libm_hidden_def (feclearexcept)
|
libm_hidden_def (feclearexcept)
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ __feclearexcept (int excepts)
|
||||||
/* Success. */
|
/* Success. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
|
|
||||||
#include <shlib-compat.h>
|
#include <shlib-compat.h>
|
||||||
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
|
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ __feclearexcept (int x)
|
||||||
SIM_SET_GLOBAL (__sim_exceptions_global, __sim_exceptions_thread);
|
SIM_SET_GLOBAL (__sim_exceptions_global, __sim_exceptions_thread);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
|
|
||||||
#include <shlib-compat.h>
|
#include <shlib-compat.h>
|
||||||
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
|
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,11 @@
|
||||||
#include <fpu_control.h>
|
#include <fpu_control.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
feclearexcept (int excepts)
|
__feclearexcept (int excepts)
|
||||||
{
|
{
|
||||||
asm volatile ("csrc fflags, %0" : : "r" (excepts));
|
asm volatile ("csrc fflags, %0" : : "r" (excepts));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
|
weak_alias (__feclearexcept, feclearexcept)
|
||||||
libm_hidden_def (feclearexcept)
|
libm_hidden_def (feclearexcept)
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
#include <fpu_control.h>
|
#include <fpu_control.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
feclearexcept (int excepts)
|
__feclearexcept (int excepts)
|
||||||
{
|
{
|
||||||
fexcept_t temp;
|
fexcept_t temp;
|
||||||
|
|
||||||
|
|
@ -42,4 +42,6 @@ feclearexcept (int excepts)
|
||||||
/* Success. */
|
/* Success. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
|
weak_alias (__feclearexcept, feclearexcept)
|
||||||
libm_hidden_def (feclearexcept)
|
libm_hidden_def (feclearexcept)
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
#include <fpu_control.h>
|
#include <fpu_control.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
feclearexcept (int excepts)
|
__feclearexcept (int excepts)
|
||||||
{
|
{
|
||||||
fpu_control_t cw;
|
fpu_control_t cw;
|
||||||
|
|
||||||
|
|
@ -38,4 +38,6 @@ feclearexcept (int excepts)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
|
weak_alias (__feclearexcept, feclearexcept)
|
||||||
libm_hidden_def (feclearexcept)
|
libm_hidden_def (feclearexcept)
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ __feclearexcept (int excepts)
|
||||||
/* Success. */
|
/* Success. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
|
|
||||||
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
|
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
|
||||||
strong_alias (__feclearexcept, __old_feclearexcept)
|
strong_alias (__feclearexcept, __old_feclearexcept)
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
#include <fenv.h>
|
#include <fenv.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
feclearexcept (int excepts)
|
__feclearexcept (int excepts)
|
||||||
{
|
{
|
||||||
fenv_t temp;
|
fenv_t temp;
|
||||||
unsigned int mxcsr;
|
unsigned int mxcsr;
|
||||||
|
|
@ -49,4 +49,6 @@ feclearexcept (int excepts)
|
||||||
/* Success. */
|
/* Success. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libm_hidden_def (__feclearexcept)
|
||||||
|
weak_alias (__feclearexcept, feclearexcept)
|
||||||
libm_hidden_def (feclearexcept)
|
libm_hidden_def (feclearexcept)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue