diff options
author | Pavel Kozlov <pavel.kozlov@synopsys.com> | 2023-01-17 16:12:23 +0400 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-02-17 16:17:58 -0300 |
commit | dab63442791e334d592ce91827ffa9d14ca92ea9 (patch) | |
tree | b92e7c2b9a7a24dbac46883a1e65b827cb5bb469 /sysdeps/arc/fpu/fegetround.c | |
parent | 87abcf9a6e34d64f556b0b9d3ccd2689b2c2e0b6 (diff) | |
download | glibc-dab63442791e334d592ce91827ffa9d14ca92ea9.tar.gz glibc-dab63442791e334d592ce91827ffa9d14ca92ea9.tar.xz glibc-dab63442791e334d592ce91827ffa9d14ca92ea9.zip |
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>
Diffstat (limited to 'sysdeps/arc/fpu/fegetround.c')
0 files changed, 0 insertions, 0 deletions