diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2015-07-06 12:43:31 +0100 |
---|---|---|
committer | Wilco Dijkstra <wdijkstr@arm.com> | 2015-07-06 12:52:55 +0100 |
commit | 6471190491435c6ee819232f3eb71ad9638563cc (patch) | |
tree | 025c6ff7559986bbf5356b2c50fdeaed842995a2 /sysdeps/aarch64/fpu/math_private.h | |
parent | a1b85e1d6c2fbd815818d50ba7060dd3771888e3 (diff) | |
download | glibc-6471190491435c6ee819232f3eb71ad9638563cc.tar.gz glibc-6471190491435c6ee819232f3eb71ad9638563cc.tar.xz glibc-6471190491435c6ee819232f3eb71ad9638563cc.zip |
Inline __ieee754_sqrt and __ieee754_sqrtf. Also add external definitions.
Diffstat (limited to 'sysdeps/aarch64/fpu/math_private.h')
-rw-r--r-- | sysdeps/aarch64/fpu/math_private.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sysdeps/aarch64/fpu/math_private.h b/sysdeps/aarch64/fpu/math_private.h index 52a6ad98f3..b3c2509961 100644 --- a/sysdeps/aarch64/fpu/math_private.h +++ b/sysdeps/aarch64/fpu/math_private.h @@ -22,6 +22,22 @@ #include <fenv.h> #include <fpu_control.h> +extern __always_inline double +__ieee754_sqrt (double d) +{ + double res; + asm __volatile__ ("fsqrt %d0, %d1" : "=w" (res) : "w" (d)); + return res; +} + +extern __always_inline float +__ieee754_sqrtf (float s) +{ + float res; + asm __volatile__ ("fsqrt %s0, %s1" : "=w" (res) : "w" (s)); + return res; +} + static __always_inline void libc_feholdexcept_aarch64 (fenv_t *envp) { |