diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-03-09 20:31:03 +0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-03-30 10:52:32 -0300 |
commit | ec07242c45ef8b24836c2089b0466b48f8ba2d1c (patch) | |
tree | 4e10f8afc6a80628b72d0d510a81172204765d9a /sysdeps/sparc/fpu/fenv_private.h | |
parent | 4a30b6109c119feeb95cf154382057fbf757d4da (diff) | |
download | glibc-ec07242c45ef8b24836c2089b0466b48f8ba2d1c.tar.gz glibc-ec07242c45ef8b24836c2089b0466b48f8ba2d1c.tar.xz glibc-ec07242c45ef8b24836c2089b0466b48f8ba2d1c.zip |
sparc: Move __fenv_{ld,st}fsr to fenv-private.h
These should not be exported on installed headers. Checked on sparc64-linux-gnu and sparcv9-linux-gnu.
Diffstat (limited to 'sysdeps/sparc/fpu/fenv_private.h')
-rw-r--r-- | sysdeps/sparc/fpu/fenv_private.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sysdeps/sparc/fpu/fenv_private.h b/sysdeps/sparc/fpu/fenv_private.h index dbd1001ccb..da7c7fe332 100644 --- a/sysdeps/sparc/fpu/fenv_private.h +++ b/sysdeps/sparc/fpu/fenv_private.h @@ -3,6 +3,15 @@ #include <fenv.h> +/* For internal use only: access the fp state register. */ +#if __WORDSIZE == 64 +# define __fenv_stfsr(X) __asm__ __volatile__ ("stx %%fsr,%0" : "=m" (X)) +# define __fenv_ldfsr(X) __asm__ __volatile__ ("ldx %0,%%fsr" : : "m" (X)) +#else +# define __fenv_stfsr(X) __asm__ __volatile__ ("st %%fsr,%0" : "=m" (X)) +# define __fenv_ldfsr(X) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (X)) +#endif + static __always_inline void libc_feholdexcept (fenv_t *e) { |