summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/fpu/math_private.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/fpu/math_private.h')
-rw-r--r--sysdeps/powerpc/fpu/math_private.h33
1 files changed, 7 insertions, 26 deletions
diff --git a/sysdeps/powerpc/fpu/math_private.h b/sysdeps/powerpc/fpu/math_private.h
index d90327c4af..e642d6c823 100644
--- a/sysdeps/powerpc/fpu/math_private.h
+++ b/sysdeps/powerpc/fpu/math_private.h
@@ -1,5 +1,5 @@
/* Private inline math functions for powerpc.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,38 +23,19 @@
#include <ldsodefs.h>
#include <dl-procinfo.h>
#include <fenv_private.h>
+
#include_next <math_private.h>
-extern double __slow_ieee754_sqrt (double);
-extern __always_inline double
-__ieee754_sqrt (double __x)
+#if defined _ARCH_PWR9 && __HAVE_DISTINCT_FLOAT128
+extern __always_inline _Float128
+__ieee754_sqrtf128 (_Float128 __x)
{
- double __z;
-
-#ifdef _ARCH_PPCSQ
- asm ("fsqrt %0,%1" : "=f" (__z) : "f" (__x));
-#else
- __z = __slow_ieee754_sqrt(__x);
-#endif
-
+ _Float128 __z;
+ asm ("xssqrtqp %0,%1" : "=v" (__z) : "v" (__x));
return __z;
}
-
-extern float __slow_ieee754_sqrtf (float);
-extern __always_inline float
-__ieee754_sqrtf (float __x)
-{
- float __z;
-
-#ifdef _ARCH_PPCSQ
- asm ("fsqrts %0,%1" : "=f" (__z) : "f" (__x));
-#else
- __z = __slow_ieee754_sqrtf(__x);
#endif
- return __z;
-}
-
#if defined _ARCH_PWR5X
# ifndef __round