remove(): slight readabability tweak, no code changes
[uclibc-ng.git] / libm / sh / feholdexcpt.c
blob70b51e8ddd348a5f35961301b693b76d85b7d45f
1 /*
3 * Copyright (c) 2007 STMicroelectronics Ltd
4 * Filippo Arcidiacono (filippo.arcidiacono@st.com)
6 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8 * Taken from glibc 2.6
12 #include <fenv.h>
13 #include <fpu_control.h>
15 int
16 feholdexcept (fenv_t *envp)
18 unsigned long int temp;
20 /* Store the environment. */
21 _FPU_GETCW (temp);
22 envp->__fpscr = temp;
24 /* Now set all exceptions to non-stop. */
25 temp &= ~FE_ALL_EXCEPT;
26 _FPU_SETCW (temp);
28 return 1;