glibc/sysdeps/arc/fpu
Pavel Kozlov dab6344279 ARC:fpu: add extra capability check before use of sqrt and fma builtins
Add extra check for compiler definitions to ensure that compiler provides
sqrt and fma hw fpu instructions else use software implementation.

As divide/sqrt and FMA hw support from CPU side is optional,
the compiler can be configured by options to generate hw FPU instructions,
but without use of FDDIV, FDSQRT, FSDIV, FSSQRT, FDMADD and FSMADD
instructions. In this case __builtin_sqrt and __builtin_sqrtf provided by
compiler can't be used inside the glibc code, as these builtins are used
in implementations of sqrt() and sqrtf() functions but at the same time
these builtins unfold to sqrt() and sqrtf(). So it is possible to receive
code like that:

0001c4b4 <__ieee754_sqrtf>:
   1c4b4:    0001 0000      b     0         ;1c4b4 <__ieee754_sqrtf>

The same is also true for __builtin_fma and __builtin_fmaf.
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2023-02-17 16:17:58 -03:00
..
fclrexcpt.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fegetenv.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fegetmode.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fegetround.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
feholdexcpt.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fesetenv.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fesetexcept.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fesetmode.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fesetround.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
feupdateenv.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fgetexcptflg.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fraiseexcpt.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fsetexcptflg.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ftestexcept.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
libm-test-ulps ARC: Update ulps 2021-04-14 09:24:45 -07:00
libm-test-ulps-name
math-use-builtins-fma.h ARC:fpu: add extra capability check before use of sqrt and fma builtins 2023-02-17 16:17:58 -03:00
math-use-builtins-sqrt.h ARC:fpu: add extra capability check before use of sqrt and fma builtins 2023-02-17 16:17:58 -03:00