about summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64/mpsqrt.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-10-25 00:56:33 -0400
committerUlrich Drepper <drepper@gmail.com>2011-10-25 00:56:33 -0400
commit31d3cc00b0cc5205b4b4efd73c911cfddff444c6 (patch)
tree89e95646d591fee083d62642085da77a01127292 /sysdeps/ieee754/dbl-64/mpsqrt.c
parent202c9deb15ee43bcbe70b36fa9bae050b8633c27 (diff)
downloadglibc-31d3cc00b0cc5205b4b4efd73c911cfddff444c6.tar.gz
glibc-31d3cc00b0cc5205b4b4efd73c911cfddff444c6.tar.xz
glibc-31d3cc00b0cc5205b4b4efd73c911cfddff444c6.zip
Cleanup FMA4 patch
Move the FMA4 code into its own section.  Avoid some of the duplication
of data resulting from the double use of source files.
Diffstat (limited to 'sysdeps/ieee754/dbl-64/mpsqrt.c')
-rw-r--r--sysdeps/ieee754/dbl-64/mpsqrt.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/sysdeps/ieee754/dbl-64/mpsqrt.c b/sysdeps/ieee754/dbl-64/mpsqrt.c
index bea623296b..d1a80f9091 100644
--- a/sysdeps/ieee754/dbl-64/mpsqrt.c
+++ b/sysdeps/ieee754/dbl-64/mpsqrt.c
@@ -32,6 +32,12 @@
 #include "endian.h"
 #include "mpa.h"
 
+#ifndef SECTION
+# define SECTION
+#endif
+
+#include "mpsqrt.h"
+
 /****************************************************************************/
 /* Multi-Precision square root function subroutine for precision p >= 4.    */
 /* The relative error is bounded by 3.501*r**(1-p), where r=2**24.          */
@@ -42,9 +48,9 @@
 
 static double fastiroot(double);
 
-void __mpsqrt(mp_no *x, mp_no *y, int p) {
-#include "mpsqrt.h"
-
+void
+SECTION
+__mpsqrt(mp_no *x, mp_no *y, int p) {
   int i,m,ex,ey;
   double dx,dy;
   mp_no
@@ -64,7 +70,7 @@ void __mpsqrt(mp_no *x, mp_no *y, int p) {
   __mp_dbl(&mpxn,&dx,p);   dy=fastiroot(dx);    __dbl_mp(dy,&mpu,p);
   __mul(&mpxn,&mphalf,&mpz,p);
 
-  m=mp[p];
+  m=__mpsqrt_mp[p];
   for (i=0; i<m; i++) {
     __mul(&mpu,&mpu,&mpt1,p);
     __mul(&mpt1,&mpz,&mpt2,p);
@@ -81,7 +87,9 @@ void __mpsqrt(mp_no *x, mp_no *y, int p) {
 /* Compute a double precision approximation for 1/sqrt(x)  */
 /* with the relative error bounded by 2**-51.              */
 /***********************************************************/
-static double fastiroot(double x) {
+static double
+SECTION
+fastiroot(double x) {
   union {int i[2]; double d;} p,q;
   double y,z, t;
   int n;