2012-05-30 Richard Henderson <rth@twiddle.net>
+ * sysdeps/alpha/alphaev6/fpu/e_sqrt.S: Use dynamic rounding.
+ * sysdeps/alpha/alphaev6/fpu/e_sqrtf.S: Likewise.
+ * sysdeps/alpha/fpu/math_private.h (__ieee754_sqrt): New.
+ (__ieee754_sqrtf): New.
+
* sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c: Replace
_internal alias by hidden_def.
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 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
.align 4
#ifdef _IEEE_FP_INEXACT
- sqrtt/sui $f16, $f0
+ sqrtt/suid $f16, $f0
#else
- sqrtt/su $f16, $f0
+ sqrtt/sud $f16, $f0
#endif
ret
nop
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 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
.align 4
#ifdef _IEEE_FP_INEXACT
- sqrts/sui $f16, $f0
+ sqrts/suid $f16, $f0
#else
- sqrts/su $f16, $f0
+ sqrts/sud $f16, $f0
#endif
ret
nop
#include_next <math_private.h>
+#ifdef __alpha_fix__
+extern __always_inline double
+__ieee754_sqrt (double d)
+{
+ double ret;
+# ifdef _IEEE_FP_INEXACT
+ asm ("sqrtt/suid %1,%0" : "=f"(ret) : "f"(d));
+# else
+ asm ("sqrtt/sud %1,%0" : "=f"(ret) : "f"(d));
+# endif
+ return ret;
+}
+
+extern __always_inline float
+__ieee754_sqrtf (float d)
+{
+ float ret;
+# ifdef _IEEE_FP_INEXACT
+ asm ("sqrts/suid %1,%0" : "=f"(ret) : "f"(d));
+# else
+ asm ("sqrts/sud %1,%0" : "=f"(ret) : "f"(d));
+# endif
+ return ret;
+}
+#endif /* FIX */
+
#endif /* ALPHA_MATH_PRIVATE_H */