diff options
| author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2009-01-14 11:19:09 +0000 |
|---|---|---|
| committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2009-01-14 11:19:09 +0000 |
| commit | b28a9ea22c1a00ec11b847eeaee138a34442e1bf (patch) | |
| tree | 9b0f39f55c5cd8b3e8c509aeefb1844a95120df8 /libm/sh/fesetenv.c | |
| parent | d1d4b5693c65fd9c455ab63135d78f1f2aefb249 (diff) | |
| download | uClibc-alpine-b28a9ea22c1a00ec11b847eeaee138a34442e1bf.tar.bz2 uClibc-alpine-b28a9ea22c1a00ec11b847eeaee138a34442e1bf.tar.xz | |
libm_sh: Re-added sh specific files erroneously removed recently,
and moved under a better folder.
SIgned-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libm/sh/fesetenv.c')
| -rw-r--r-- | libm/sh/fesetenv.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libm/sh/fesetenv.c b/libm/sh/fesetenv.c new file mode 100644 index 000000000..9f9082cf3 --- /dev/null +++ b/libm/sh/fesetenv.c @@ -0,0 +1,27 @@ +/* + * + * Copyright (c) 2007 STMicroelectronics Ltd + * Filippo Arcidiacono (filippo.arcidiacono@st.com) + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + * + * Taken from glibc 2.6 + * + */ + +#include <fenv.h> +#include <fpu_control.h> + +int +fesetenv (const fenv_t *envp) +{ + if (envp == FE_DFL_ENV) + _FPU_SETCW (_FPU_DEFAULT); + else + { + unsigned long int temp = envp->__fpscr; + _FPU_SETCW (temp); + } + return 0; +} +libm_hidden_def (fesetenv) |
