From: Adhemerval Zanella Date: Mon, 9 Mar 2020 17:31:03 +0000 (+0300) Subject: sparc: Move __fenv_{ld,st}fsr to fenv-private.h X-Git-Tag: glibc-2.32~469 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec07242c45ef8b24836c2089b0466b48f8ba2d1c;p=thirdparty%2Fglibc.git 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. --- diff --git a/sysdeps/sparc/fpu/bits/fenv.h b/sysdeps/sparc/fpu/bits/fenv.h index 4935208a41a..d34fcac4c5b 100644 --- a/sysdeps/sparc/fpu/bits/fenv.h +++ b/sysdeps/sparc/fpu/bits/fenv.h @@ -83,15 +83,6 @@ typedef unsigned long int fenv_t; # define FE_NOMASK_ENV ((const fenv_t *) -2) #endif -/* 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 - #if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef unsigned long int femode_t; diff --git a/sysdeps/sparc/fpu/fclrexcpt.c b/sysdeps/sparc/fpu/fclrexcpt.c index b11734f057d..5af20d1f7ac 100644 --- a/sysdeps/sparc/fpu/fclrexcpt.c +++ b/sysdeps/sparc/fpu/fclrexcpt.c @@ -17,6 +17,7 @@ . */ #include +#include #include int diff --git a/sysdeps/sparc/fpu/fedisblxcpt.c b/sysdeps/sparc/fpu/fedisblxcpt.c index 86688ab5336..9b832a82cea 100644 --- a/sysdeps/sparc/fpu/fedisblxcpt.c +++ b/sysdeps/sparc/fpu/fedisblxcpt.c @@ -18,6 +18,7 @@ . */ #include +#include int fedisableexcept (int excepts) diff --git a/sysdeps/sparc/fpu/feenablxcpt.c b/sysdeps/sparc/fpu/feenablxcpt.c index 647093cebc8..06ec14cee56 100644 --- a/sysdeps/sparc/fpu/feenablxcpt.c +++ b/sysdeps/sparc/fpu/feenablxcpt.c @@ -18,6 +18,7 @@ . */ #include +#include int feenableexcept (int excepts) diff --git a/sysdeps/sparc/fpu/fegetenv.c b/sysdeps/sparc/fpu/fegetenv.c index edde6ae5b2a..00c0bc72b50 100644 --- a/sysdeps/sparc/fpu/fegetenv.c +++ b/sysdeps/sparc/fpu/fegetenv.c @@ -17,6 +17,7 @@ . */ #include +#include #include int diff --git a/sysdeps/sparc/fpu/fegetexcept.c b/sysdeps/sparc/fpu/fegetexcept.c index f549a901908..4d9746dd57c 100644 --- a/sysdeps/sparc/fpu/fegetexcept.c +++ b/sysdeps/sparc/fpu/fegetexcept.c @@ -18,6 +18,7 @@ . */ #include +#include int fegetexcept (void) diff --git a/sysdeps/sparc/fpu/fegetmode.c b/sysdeps/sparc/fpu/fegetmode.c index 18c932d520e..aa160bd19a1 100644 --- a/sysdeps/sparc/fpu/fegetmode.c +++ b/sysdeps/sparc/fpu/fegetmode.c @@ -17,6 +17,7 @@ . */ #include +#include int fegetmode (femode_t *modep) diff --git a/sysdeps/sparc/fpu/fegetround.c b/sysdeps/sparc/fpu/fegetround.c index 1eae341fc49..6ca7d5c0dc4 100644 --- a/sysdeps/sparc/fpu/fegetround.c +++ b/sysdeps/sparc/fpu/fegetround.c @@ -17,6 +17,7 @@ . */ #include +#include int __fegetround (void) diff --git a/sysdeps/sparc/fpu/feholdexcpt.c b/sysdeps/sparc/fpu/feholdexcpt.c index 7a1a3e33ed0..bb612402f01 100644 --- a/sysdeps/sparc/fpu/feholdexcpt.c +++ b/sysdeps/sparc/fpu/feholdexcpt.c @@ -17,6 +17,7 @@ . */ #include +#include int __feholdexcept (fenv_t *envp) diff --git a/sysdeps/sparc/fpu/fenv_private.h b/sysdeps/sparc/fpu/fenv_private.h index dbd1001ccb9..da7c7fe332f 100644 --- a/sysdeps/sparc/fpu/fenv_private.h +++ b/sysdeps/sparc/fpu/fenv_private.h @@ -3,6 +3,15 @@ #include +/* 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) { diff --git a/sysdeps/sparc/fpu/fesetenv.c b/sysdeps/sparc/fpu/fesetenv.c index 82c03c67603..d536abd3442 100644 --- a/sysdeps/sparc/fpu/fesetenv.c +++ b/sysdeps/sparc/fpu/fesetenv.c @@ -17,6 +17,7 @@ . */ #include +#include #include int diff --git a/sysdeps/sparc/fpu/fesetexcept.c b/sysdeps/sparc/fpu/fesetexcept.c index 6740ece5b40..fbc21c04771 100644 --- a/sysdeps/sparc/fpu/fesetexcept.c +++ b/sysdeps/sparc/fpu/fesetexcept.c @@ -17,6 +17,7 @@ . */ #include +#include int fesetexcept (int excepts) diff --git a/sysdeps/sparc/fpu/fesetmode.c b/sysdeps/sparc/fpu/fesetmode.c index 6fe5d337ad1..24148e0fd36 100644 --- a/sysdeps/sparc/fpu/fesetmode.c +++ b/sysdeps/sparc/fpu/fesetmode.c @@ -17,6 +17,7 @@ . */ #include +#include #include #define FPU_CONTROL_BITS 0xcfc00000UL diff --git a/sysdeps/sparc/fpu/fesetround.c b/sysdeps/sparc/fpu/fesetround.c index 9a944322d75..b259474d2cb 100644 --- a/sysdeps/sparc/fpu/fesetround.c +++ b/sysdeps/sparc/fpu/fesetround.c @@ -17,6 +17,7 @@ . */ #include +#include int __fesetround (int round) diff --git a/sysdeps/sparc/fpu/feupdateenv.c b/sysdeps/sparc/fpu/feupdateenv.c index 7e2399bfa2f..7721f822ea8 100644 --- a/sysdeps/sparc/fpu/feupdateenv.c +++ b/sysdeps/sparc/fpu/feupdateenv.c @@ -17,6 +17,7 @@ . */ #include +#include #include int diff --git a/sysdeps/sparc/fpu/fgetexcptflg.c b/sysdeps/sparc/fpu/fgetexcptflg.c index f95d9bbf1b3..ab8fa1bb764 100644 --- a/sysdeps/sparc/fpu/fgetexcptflg.c +++ b/sysdeps/sparc/fpu/fgetexcptflg.c @@ -17,6 +17,7 @@ . */ #include +#include #include int diff --git a/sysdeps/sparc/fpu/fsetexcptflg.c b/sysdeps/sparc/fpu/fsetexcptflg.c index 077dfc99531..34eb789a948 100644 --- a/sysdeps/sparc/fpu/fsetexcptflg.c +++ b/sysdeps/sparc/fpu/fsetexcptflg.c @@ -17,6 +17,7 @@ . */ #include +#include #include #include diff --git a/sysdeps/sparc/fpu/ftestexcept.c b/sysdeps/sparc/fpu/ftestexcept.c index a8c8e06ef6c..44367ab4fda 100644 --- a/sysdeps/sparc/fpu/ftestexcept.c +++ b/sysdeps/sparc/fpu/ftestexcept.c @@ -17,6 +17,7 @@ . */ #include +#include int fetestexcept (int excepts)