diff options
author | Stefan Liebler <stli@linux.ibm.com> | 2019-12-11 15:09:32 +0100 |
---|---|---|
committer | Stefan Liebler <stli@linux.ibm.com> | 2019-12-11 15:12:25 +0100 |
commit | 238adf59db85646ebae47876819bd896dae597bc (patch) | |
tree | bc11e42ee2928d1549b9dfd405fbaee17c9cabfd /sysdeps/s390/fpu/feholdexcpt.c | |
parent | 7c94d036c17dfd352d11e9bf98e5d84122c1f95e (diff) | |
download | glibc-238adf59db85646ebae47876819bd896dae597bc.tar glibc-238adf59db85646ebae47876819bd896dae597bc.tar.gz glibc-238adf59db85646ebae47876819bd896dae597bc.tar.bz2 glibc-238adf59db85646ebae47876819bd896dae597bc.zip |
S390: Use libc_fe* macros in fe* functions.
This patch updates the s390 specific functions fegetround,
fesetround, feholdexcept, fesetenv, feupdateenv, fegetexceptflag,
fetestexcept, fesetexceptflag, fetestexceptflag.
Now those functions are using the libc_fe* macros if possible.
Furthermore fegetexceptflag is now returning the exception from
dxc field shifted to the usual exception-flags.
Thus a special fetestexceptflag implementation is not needed anymore.
Diffstat (limited to 'sysdeps/s390/fpu/feholdexcpt.c')
-rw-r--r-- | sysdeps/s390/fpu/feholdexcpt.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sysdeps/s390/fpu/feholdexcpt.c b/sysdeps/s390/fpu/feholdexcpt.c index 8ad7d530bd..e2eb5d2a77 100644 --- a/sysdeps/s390/fpu/feholdexcpt.c +++ b/sysdeps/s390/fpu/feholdexcpt.c @@ -17,19 +17,11 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ -#include <fenv_libc.h> -#include <fpu_control.h> +#include <fenv_private.h> int __feholdexcept (fenv_t *envp) { - fexcept_t fpc; - /* Store the environment. */ - __fegetenv (envp); - /* Clear the current sticky bits as more than one exception - may be generated. */ - fpc = envp->__fpc & ~(FPC_FLAGS_MASK | FPC_DXC_MASK); - /* Hold from generating fpu exceptions temporarily. */ - _FPU_SETCW ((fpc & ~(FE_ALL_EXCEPT << FPC_EXCEPTION_MASK_SHIFT))); + libc_feholdexcept_s390 (envp); return 0; } libm_hidden_def (__feholdexcept) |