Skip to contentSkip to conversation

ieee754/dbl-64: Reduce the scope of temporary storage variables

PATCH Superseded Vineet Gupta 3 participants 12 messages Nov 11, 2019 – Jun 15, 2020 Synopsys ARC architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ieee754/dbl-64: Reduce the scope of temporary storage variables

This came to light when adding hard-flaot support to ARC glibc port without hardware sqrt support causing glibc build to fail:

| ../sysdeps/ieee754/dbl-64/e_sqrt.c: In function '__ieee754_sqrt':
| ../sysdeps/ieee754/dbl-64/e_sqrt.c:58:54: error: unused variable 'ty' [-Werror=unused-variable]
|   double y, t, del, res, res1, hy, z, zz, p, hx, tx, ty, s;

The reason being EMULV() macro uses the hardware provided __builtin_fma() variant, leaving temporary variables 'p, hx, tx, hy, ty' unused hence compiler warning and ensuing error.

The intent of the patch was to fix that error, but EMULV is pervasive and used fair bit indirectly via othe rmacros, hence this patch. Functionally it should not result in code gen changes and if at all those would be better since the scope of those temporaries is greatly reduced now

---
 sysdeps/ieee754/dbl-64/dla.h      |  30 +++---
 sysdeps/ieee754/dbl-64/doasin.c   |  15 ++-
 sysdeps/ieee754/dbl-64/dosincos.c |  67 +++++++------
 sysdeps/ieee754/dbl-64/e_atan2.c  |  89 +++++++++---------
 sysdeps/ieee754/dbl-64/e_sqrt.c   |   4 +-
 sysdeps/ieee754/dbl-64/s_atan.c   |  56 +++++------
 sysdeps/ieee754/dbl-64/s_tan.c    | 150 ++++++++++++++----------------
 7 files changed, 193 insertions(+), 218 deletions(-)
sysdeps/ieee754/dbl-64/dla.h +17 -13
index 07b18258aaf2..daf08c111820 100644
@@ -67,13 +67,15 @@
 /* storage variables of type double.                                   */
 
 #ifdef DLA_FMS
-# define  EMULV(x, y, z, zz, p, hx, tx, hy, ty)          \
+# define  EMULV(x, y, z, zz)          \
   z = x * y; zz = DLA_FMS (x, y, z);
 #else
-# define  EMULV(x, y, z, zz, p, hx, tx, hy, ty)          \
-  p = CN * (x);  hx = ((x) - p) + p;  tx = (x) - hx; \
-  p = CN * (y);  hy = ((y) - p) + p;  ty = (y) - hy; \
-  z = (x) * (y); zz = (((hx * hy - z) + hx * ty) + tx * hy) + tx * ty;
+# define  EMULV(x, y, z, zz)          \
+    ({  __typeof__ (x) p, hx, tx, hy, ty;          \
+        p = CN * (x);  hx = ((x) - p) + p;  tx = (x) - hx; \
+        p = CN * (y);  hy = ((y) - p) + p;  ty = (y) - hy; \
+        z = (x) * (y); zz = (((hx * hy - z) + hx * ty) + tx * hy) + tx * ty; \
+    })
 #endif
 
 
@@ -83,13 +85,15 @@
 /* storage variables of type double.                                         */
 
 #ifdef DLA_FMS
-# define  MUL12(x,y,z,zz,p,hx,tx,hy,ty,q)        \
-	   EMULV(x,y,z,zz,p,hx,tx,hy,ty)
+# define  MUL12(x, y, z, zz)        \
+	   EMULV(x, y, z, zz)
 #else
-# define  MUL12(x,y,z,zz,p,hx,tx,hy,ty,q)        \
+# define  MUL12(x, y, z, zz)        \
+    ({  __typeof__ (x) p, hx, tx, hy, ty, q;          \
 	   p=CN*(x);  hx=((x)-p)+p;  tx=(x)-hx; \
 	   p=CN*(y);  hy=((y)-p)+p;  ty=(y)-hy; \
-	   p=hx*hy;  q=hx*ty+tx*hy; z=p+q;  zz=((p-z)+q)+tx*ty;
+	   p=hx*hy;  q=hx*ty+tx*hy; z=p+q;  zz=((p-z)+q)+tx*ty; \
+    })
 #endif
 
 
@@ -125,8 +129,8 @@
 /* are assumed to be double-length numbers. p,hx,tx,hy,ty,q,c,cc are         */
 /* temporary storage variables of type double.                               */
 
-#define  MUL2(x, xx, y, yy, z, zz, p, hx, tx, hy, ty, q, c, cc)  \
-  MUL12 (x, y, c, cc, p, hx, tx, hy, ty, q)                      \
+#define  MUL2(x, xx, y, yy, z, zz, c, cc)  \
+  MUL12 (x, y, c, cc)                      \
   cc = ((x) * (yy) + (xx) * (y)) + cc;   z = c + cc;   zz = (c - z) + cc;
 
 
@@ -136,8 +140,8 @@
 /* are assumed to be double-length numbers. p,hx,tx,hy,ty,q,c,cc,u,uu        */
 /* are temporary storage variables of type double.                           */
 
-#define  DIV2(x,xx,y,yy,z,zz,p,hx,tx,hy,ty,q,c,cc,u,uu)  \
-	   c=(x)/(y);   MUL12(c,y,u,uu,p,hx,tx,hy,ty,q)  \
+#define  DIV2(x, xx, y, yy, z, zz, c, cc, u, uu)  \
+	   c=(x)/(y);   MUL12(c,y,u,uu)  \
 	   cc=(((((x)-u)-uu)+(xx))-c*(yy))/(y);   z=c+cc;   zz=(c-z)+cc;
 
 
sysdeps/ieee754/dbl-64/doasin.c +6 -9
index ccb89ed1630c..049751bc502e 100644
@@ -58,9 +58,6 @@ __doasin(double x, double dx, double v[]) {
 
   double xx,p,pp,u,uu,r,s;
   double tc,tcc;
-#ifndef DLA_FMS
-  double hx,tx,hy,ty,tp,tq;
-#endif
 
 
 /* Taylor series for arcsin for Double-Length numbers         */
@@ -68,16 +65,16 @@ __doasin(double x, double dx, double v[]) {
   p = ((((((d11*xx+d10)*xx+d9)*xx+d8)*xx+d7)*xx+d6)*xx+d5)*xx;
   pp = 0;
 
-  MUL2(x,dx,x,dx,u,uu,tp,hx,tx,hy,ty,tq,tc,tcc);
+  MUL2(x,dx,x,dx,u,uu,tc,tcc);
   ADD2(p,pp,c4.x,cc4.x,p,pp,r,s);
-  MUL2(p,pp,u,uu,p,pp,tp,hx,tx,hy,ty,tq,tc,tcc);
+  MUL2(p,pp,u,uu,p,pp,tc,tcc);
   ADD2(p,pp,c3.x,cc3.x,p,pp,r,s);
-  MUL2(p,pp,u,uu,p,pp,tp,hx,tx,hy,ty,tq,tc,tcc);
+  MUL2(p,pp,u,uu,p,pp,tc,tcc);
   ADD2(p,pp,c2.x,cc2.x,p,pp,r,s);
-  MUL2(p,pp,u,uu,p,pp,tp,hx,tx,hy,ty,tq,tc,tcc);
+  MUL2(p,pp,u,uu,p,pp,tc,tcc);
   ADD2(p,pp,c1.x,cc1.x,p,pp,r,s);
-  MUL2(p,pp,u,uu,p,pp,tp,hx,tx,hy,ty,tq,tc,tcc);
-  MUL2(p,pp,x,dx,p,pp,tp,hx,tx,hy,ty,tq,tc,tcc);
+  MUL2(p,pp,u,uu,p,pp,tc,tcc);
+  MUL2(p,pp,x,dx,p,pp,tc,tcc);
   ADD2(p,pp,x,dx,p,pp,r,s);
   v[0]=p;
   v[1]=pp; /* arcsin(x+dx)=v[0]+v[1] */
sysdeps/ieee754/dbl-64/dosincos.c +32 -35

118 lines not on this page · raw message

sysdeps/ieee754/dbl-64/e_atan2.c +43 -46

191 lines not on this page · raw message

sysdeps/ieee754/dbl-64/e_sqrt.c +2 -2
index 20c72d58482c..1a6b2bc88ca1 100644
@@ -55,7 +55,7 @@ __ieee754_sqrt (double x)
     rt2 = 3.75017500867345182581453026130850E-01,
     rt3 = 3.12523626554518656309172508769531E-01;
   static const double big = 134217728.0;
-  double y, t, del, res, res1, hy, z, zz, p, hx, tx, ty, s;
+  double y, t, del, res, res1, hy, z, zz, s;
   mynumber a, c = { { 0, 0 } };
   int4 k;
 
@@ -83,7 +83,7 @@ __ieee754_sqrt (double x)
       else
 	{
 	  res1 = res + 1.5 * ((y - res) + del);
-	  EMULV (res, res1, z, zz, p, hx, tx, hy, ty); /* (z+zz)=res*res1 */
+	  EMULV (res, res1, z, zz); /* (z+zz)=res*res1 */
 	  res = ((((z - s) + zz) < 0) ? max (res, res1) :
 					min (res, res1));
 	  ret = res * c.x;
sysdeps/ieee754/dbl-64/s_atan.c +25 -31

129 lines not on this page · raw message

sysdeps/ieee754/dbl-64/s_tan.c +68 -82

338 lines not on this page · raw message

Signature · 7 lines
2.20.1


_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
#1 lore raw
Quoted 3 lines · Vineet Gupta

Functionally it should not result in code gen changes and if at all those would be better since the scope of those temporaries is greatly reduced now

This feels like the sort of thing where "should not result in code gen changes" should be tested by running build-many-glibcs.py --strip with unmodified glibc sources to build a full set of stripped glibc binaries, saving those binaries and then running build-many-glibcs.py --strip again and comparing the two sets of shared libraries (something I did a lot of when reworking how libm function aliases were defined; static libraries are expected to change because of timestamps, but shared library binaries can be usefully compared like this). If the two sets of stripped binaries are indeed identical, that is strong evidence that the patch is safe; otherwise, review of the patch will require more detailed inspection of the types of the arguments to these macros, and the uses of the temporary variables, at every call site, to make sure that semantics aren't being changed.

(In any case, please specify when submitting a patch how it was tested.)

Signature · 7 lines
Joseph S. Myers
[email protected]

_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
#2 lore raw
Quoted 5 lines · Joseph Myers
Quoted 3 lines · Vineet Gupta

Functionally it should not result in code gen changes and if at all those would be better since the scope of those temporaries is greatly reduced now

Quoted 13 lines

This feels like the sort of thing where "should not result in code gen changes" should be tested by running build-many-glibcs.py --strip with unmodified glibc sources to build a full set of stripped glibc binaries, saving those binaries and then running build-many-glibcs.py --strip again and comparing the two sets of shared libraries (something I did a lot of when reworking how libm function aliases were defined; static libraries are expected to change because of timestamps, but shared library binaries can be usefully compared like this). If the two sets of stripped binaries are indeed identical, that is strong evidence that the patch is safe; otherwise, review of the patch will require more detailed inspection of the types of the arguments to these macros, and the uses of the temporary variables, at every call site, to make sure that semantics aren't being changed.

Ok Understand.  What arch(es) / build options would you want this tested for in aforementioned way to get a reasonable confidence ?

Quoted 1 line

(In any case, please specify when submitting a patch how it was tested.)

I've currently tested this with build-many-glibcs.py for ARC port only with and w/o hard float support being worked on.
_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

#3 lore raw
Quoted 20 lines · Vineet Gupta
Quoted 5 lines · Joseph Myers
Quoted 3 lines · Vineet Gupta

Functionally it should not result in code gen changes and if at all those would be better since the scope of those temporaries is greatly reduced now

Quoted 13 lines

This feels like the sort of thing where "should not result in code gen changes" should be tested by running build-many-glibcs.py --strip with unmodified glibc sources to build a full set of stripped glibc binaries, saving those binaries and then running build-many-glibcs.py --strip again and comparing the two sets of shared libraries (something I did a lot of when reworking how libm function aliases were defined; static libraries are expected to change because of timestamps, but shared library binaries can be usefully compared like this). If the two sets of stripped binaries are indeed identical, that is strong evidence that the patch is safe; otherwise, review of the patch will require more detailed inspection of the types of the arguments to these macros, and the uses of the temporary variables, at every call site, to make sure that semantics aren't being changed.

Quoted 2 lines

Ok Understand.  What arch(es) / build options would you want this tested for in aforementioned way to get a reasonable confidence ?

The suggestion is two full "build-many-glibcs.py --strip <dir> glibcs" runs (one before and one after the change, and comparing the resulting binaries), covering all architectures, if you have suitable fast hardware for doing such testing (it's quite time-consuming; a single run takes about 3 hours wall-clock time on a 16-core / 32-hardware-thread Haswell-based Xeon, for example). (A single "compilers" run can be used to build the compilers used for both those "glibcs" runs.)

Quoted 4 lines
Quoted 1 line

(In any case, please specify when submitting a patch how it was tested.)

I've currently tested this with build-many-glibcs.py for ARC port only with and w/o hard float support being worked on.

If for whatever reason there *are* differences in the stripped glibc shared libraries, at least one full run of the glibc testsuite (including execution tests) for some architecture will be needed as well to verify that the generated code works correctly in at least one configuration.

Signature · 2 lines
Joseph S. Myers
[email protected]

_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

#4 lore raw

PATCH v2 1/1 ieee754/dbl-64: Reduce the scope of temporary storage variables

This came to light when adding hard-flaot support to ARC glibc port without hardware sqrt support causing glibc build to fail:

| ../sysdeps/ieee754/dbl-64/e_sqrt.c: In function '__ieee754_sqrt':
| ../sysdeps/ieee754/dbl-64/e_sqrt.c:58:54: error: unused variable 'ty' [-Werror=unused-variable]
|   double y, t, del, res, res1, hy, z, zz, p, hx, tx, ty, s;

The reason being EMULV() macro uses the hardware provided __builtin_fma() variant, leaving temporary variables 'p, hx, tx, hy, ty' unused hence compiler warning and ensuing error.

The intent of the patch was to fix that error, but EMULV is pervasive and used fair bit indirectly via othe rmacros, hence this patch. Functionally it should not result in code gen changes and if at all those would be better since the scope of those temporaries is greatly reduced now

Built tested with aarch64-linux-gnu arm-linux-gnueabi arm-linux-gnueabihf hppa-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf riscv64-linux-gnu-rv64imac-lp64 riscv64-linux-gnu-rv64imafdc-lp64 powerpc-linux-gnu microblaze-linux-gnu nios2-linux-gnu hppa-linux-gnu

Also as suggested by Joseph [1] used --strip and compared the libs with and w/o patch and their sizes are exactly same (with gcc 9).

|  624768 Jun  1 16:20 ./aarch64-linux-gnu/lib64/libm-2.31.9000.so
|  382456 Jun  1 16:20 ./arm-linux-gnueabihf/lib/libm-2.31.9000.so
|  611836 Jun  1 16:20 ./arm-linux-gnueabi/lib/libm-2.31.9000.so
|  502556 Jun  1 16:19 ./hppa-linux-gnu/lib/libm-2.31.9000.so
|  867608 Jun  1 16:19 ./microblaze-linux-gnu/lib/libm-2.31.9000.so
|  724488 Jun  1 16:19 ./nios2-linux-gnu/lib/libm-2.31.9000.so
|  788088 Jun  1 16:20 ./powerpc-linux-gnu/lib/libm-2.31.9000.so
|  538944 Jun  1 16:20 ./riscv64-linux-gnu-rv64imafdc-lp64/lib64/lp64/libm-2.31.9000.so
|  639272 Jun  1 16:20 ./riscv64-linux-gnu-rv64imac-lp64/lib64/lp64/libm-2.31.9000.so
| 1321280 Jun  1 16:21 ./x86_64-linux-gnu/lib64/libm-2.31.9000.so

[1] https://sourceware.org/pipermail/libc-alpha/2019-November/108267.html

---
 sysdeps/ieee754/dbl-64/dla.h      |  34 ++++---
 sysdeps/ieee754/dbl-64/doasin.c   |  15 ++-
 sysdeps/ieee754/dbl-64/dosincos.c |  70 +++++++-------
 sysdeps/ieee754/dbl-64/e_atan2.c  |  89 +++++++++---------
 sysdeps/ieee754/dbl-64/e_sqrt.c   |   4 +-
 sysdeps/ieee754/dbl-64/s_atan.c   |  56 +++++------
 sysdeps/ieee754/dbl-64/s_tan.c    | 148 +++++++++++++-----------------
 7 files changed, 193 insertions(+), 223 deletions(-)
sysdeps/ieee754/dbl-64/dla.h +19 -15
index 1bbad16cf315..fd586644ef83 100644
@@ -67,13 +67,15 @@
 /* storage variables of type double.                                   */
 
 #ifdef DLA_FMS
-# define  EMULV(x, y, z, zz, p, hx, tx, hy, ty)          \
+# define  EMULV(x, y, z, zz)          \
   z = x * y; zz = DLA_FMS (x, y, z);
 #else
-# define  EMULV(x, y, z, zz, p, hx, tx, hy, ty)          \
-  p = CN * (x);  hx = ((x) - p) + p;  tx = (x) - hx; \
-  p = CN * (y);  hy = ((y) - p) + p;  ty = (y) - hy; \
-  z = (x) * (y); zz = (((hx * hy - z) + hx * ty) + tx * hy) + tx * ty;
+# define  EMULV(x, y, z, zz)          \
+    ({  __typeof__ (x) __p, hx, tx, hy, ty;          \
+        __p = CN * (x);  hx = ((x) - __p) + __p;  tx = (x) - hx; \
+        __p = CN * (y);  hy = ((y) - __p) + __p;  ty = (y) - hy; \
+        z = (x) * (y); zz = (((hx * hy - z) + hx * ty) + tx * hy) + tx * ty; \
+    })
 #endif
 
 
@@ -83,13 +85,15 @@
 /* storage variables of type double.                                         */
 
 #ifdef DLA_FMS
-# define  MUL12(x,y,z,zz,p,hx,tx,hy,ty,q)        \
-	   EMULV(x,y,z,zz,p,hx,tx,hy,ty)
+# define  MUL12(x, y, z, zz)        \
+	   EMULV(x, y, z, zz)
 #else
-# define  MUL12(x,y,z,zz,p,hx,tx,hy,ty,q)        \
-	   p=CN*(x);  hx=((x)-p)+p;  tx=(x)-hx; \
-	   p=CN*(y);  hy=((y)-p)+p;  ty=(y)-hy; \
-	   p=hx*hy;  q=hx*ty+tx*hy; z=p+q;  zz=((p-z)+q)+tx*ty;
+# define  MUL12(x, y, z, zz)        \
+    ({  __typeof__ (x) __p, hx, tx, hy, ty, __q; \
+	   __p=CN*(x);  hx=((x)-__p)+__p;  tx=(x)-hx;  \
+	   __p=CN*(y);  hy=((y)-__p)+__p;  ty=(y)-hy;  \
+	   __p=hx*hy;  __q=hx*ty+tx*hy; z=__p+__q;  zz=((__p-z)+__q)+tx*ty; \
+    })
 #endif
 
 
@@ -125,8 +129,8 @@
 /* are assumed to be double-length numbers. p,hx,tx,hy,ty,q,c,cc are         */
 /* temporary storage variables of type double.                               */
 
-#define  MUL2(x, xx, y, yy, z, zz, p, hx, tx, hy, ty, q, c, cc)  \
-  MUL12 (x, y, c, cc, p, hx, tx, hy, ty, q)                      \
+#define  MUL2(x, xx, y, yy, z, zz, c, cc)  \
+  MUL12 (x, y, c, cc);                     \
   cc = ((x) * (yy) + (xx) * (y)) + cc;   z = c + cc;   zz = (c - z) + cc;
 
 
@@ -136,8 +140,8 @@
 /* are assumed to be double-length numbers. p,hx,tx,hy,ty,q,c,cc,u,uu        */
 /* are temporary storage variables of type double.                           */
 
-#define  DIV2(x,xx,y,yy,z,zz,p,hx,tx,hy,ty,q,c,cc,u,uu)  \
-	   c=(x)/(y);   MUL12(c,y,u,uu,p,hx,tx,hy,ty,q)  \
+#define  DIV2(x, xx, y, yy, z, zz, c, cc, u, uu)  \
+	   c=(x)/(y);   MUL12(c,y,u,uu);          \
 	   cc=(((((x)-u)-uu)+(xx))-c*(yy))/(y);   z=c+cc;   zz=(c-z)+cc;
 
 
sysdeps/ieee754/dbl-64/doasin.c +6 -9
index 93cc9c35428d..f7e2f4556644 100644
@@ -58,9 +58,6 @@ __doasin(double x, double dx, double v[]) {
 
   double xx,p,pp,u,uu,r,s;
   double tc,tcc;
-#ifndef DLA_FMS
-  double hx,tx,hy,ty,tp,tq;
-#endif
 
 
 /* Taylor series for arcsin for Double-Length numbers         */
@@ -68,16 +65,16 @@ __doasin(double x, double dx, double v[]) {
   p = ((((((d11*xx+d10)*xx+d9)*xx+d8)*xx+d7)*xx+d6)*xx+d5)*xx;
   pp = 0;
 
-  MUL2(x,dx,x,dx,u,uu,tp,hx,tx,hy,ty,tq,tc,tcc);
+  MUL2(x,dx,x,dx,u,uu,tc,tcc);
   ADD2(p,pp,c4.x,cc4.x,p,pp,r,s);
-  MUL2(p,pp,u,uu,p,pp,tp,hx,tx,hy,ty,tq,tc,tcc);
+  MUL2(p,pp,u,uu,p,pp,tc,tcc);
   ADD2(p,pp,c3.x,cc3.x,p,pp,r,s);
-  MUL2(p,pp,u,uu,p,pp,tp,hx,tx,hy,ty,tq,tc,tcc);
+  MUL2(p,pp,u,uu,p,pp,tc,tcc);
   ADD2(p,pp,c2.x,cc2.x,p,pp,r,s);
-  MUL2(p,pp,u,uu,p,pp,tp,hx,tx,hy,ty,tq,tc,tcc);
+  MUL2(p,pp,u,uu,p,pp,tc,tcc);
   ADD2(p,pp,c1.x,cc1.x,p,pp,r,s);
-  MUL2(p,pp,u,uu,p,pp,tp,hx,tx,hy,ty,tq,tc,tcc);
-  MUL2(p,pp,x,dx,p,pp,tp,hx,tx,hy,ty,tq,tc,tcc);
+  MUL2(p,pp,u,uu,p,pp,tc,tcc);
+  MUL2(p,pp,x,dx,p,pp,tc,tcc);
   ADD2(p,pp,x,dx,p,pp,r,s);
   v[0]=p;
   v[1]=pp; /* arcsin(x+dx)=v[0]+v[1] */
sysdeps/ieee754/dbl-64/dosincos.c +32 -38

127 lines not on this page · raw message

sysdeps/ieee754/dbl-64/e_atan2.c +43 -46

191 lines not on this page · raw message

sysdeps/ieee754/dbl-64/e_sqrt.c +2 -2
index d42a1a4eb6e9..040cf1571069 100644
@@ -56,7 +56,7 @@ __ieee754_sqrt (double x)
     rt2 = 3.75017500867345182581453026130850E-01,
     rt3 = 3.12523626554518656309172508769531E-01;
   static const double big = 134217728.0;
-  double y, t, del, res, res1, hy, z, zz, p, hx, tx, ty, s;
+  double y, t, del, res, res1, hy, z, zz, s;
   mynumber a, c = { { 0, 0 } };
   int4 k;
 
@@ -84,7 +84,7 @@ __ieee754_sqrt (double x)
       else
 	{
 	  res1 = res + 1.5 * ((y - res) + del);
-	  EMULV (res, res1, z, zz, p, hx, tx, hy, ty); /* (z+zz)=res*res1 */
+	  EMULV (res, res1, z, zz); /* (z+zz)=res*res1 */
 	  res = ((((z - s) + zz) < 0) ? max (res, res1) :
 					min (res, res1));
 	  ret = res * c.x;
sysdeps/ieee754/dbl-64/s_atan.c +25 -31

129 lines not on this page · raw message

sysdeps/ieee754/dbl-64/s_tan.c +66 -82

332 lines not on this page · raw message

Signature · 7 lines
2.20.1


_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
#5 lore raw
Quoted 2 lines · Vineet Gupta via Libc-alpha

Also as suggested by Joseph [1] used --strip and compared the libs with and w/o patch and their sizes are exactly same (with gcc 9).

My suggestion was to compare the *contents* of the libraries, not just their sizes. Either they should be byte-for-byte identical, or if there are other differences (register allocation, line numbers in assertions, etc.) a more detailed investigation will be needed.

Signature · 7 lines
Joseph S. Myers
[email protected]

_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
#6 lore raw
Quoted 10 lines · Joseph Myers
Quoted 2 lines · Vineet Gupta via Libc-alpha

Also as suggested by Joseph [1] used --strip and compared the libs with and w/o patch and their sizes are exactly same (with gcc 9).

My suggestion was to compare the *contents* of the libraries, not just their sizes. Either they should be byte-for-byte identical, or if there are other differences (register allocation, line numbers in assertions, etc.) a more detailed investigation will be needed.

Here's my diff of the 2 --strip builds

for i in find . -name libm-2.31.9000.so; do echo $i; diff $i /SCRATCH/vgupta/gnu2/install/glibcs/$i ; echo $?; done

./aarch64-linux-gnu/lib64/libm-2.31.9000.so
0
./arm-linux-gnueabi/lib/libm-2.31.9000.so
0
./x86_64-linux-gnu/lib64/libm-2.31.9000.so
0
./arm-linux-gnueabihf/lib/libm-2.31.9000.so
0 ./riscv64-linux-gnu-rv64imac-lp64/lib64/lp64/libm-2.31.9000.so 0 ./riscv64-linux-gnu-rv64imafdc-lp64/lib64/lp64/libm-2.31.9000.so 0
./powerpc-linux-gnu/lib/libm-2.31.9000.so
0
./microblaze-linux-gnu/lib/libm-2.31.9000.so
0
./nios2-linux-gnu/lib/libm-2.31.9000.so
0
./hppa-linux-gnu/lib/libm-2.31.9000.so
0
./s390x-linux-gnu/lib64/libm-2.31.9000.so
0
_______________________________________________
linux-snps-arc mailing list [email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

#7 lore raw
Quoted 31 lines · Vineet Gupta via Libc-alpha
Quoted 10 lines · Joseph Myers
Quoted 2 lines · Vineet Gupta via Libc-alpha

Also as suggested by Joseph [1] used --strip and compared the libs with and w/o patch and their sizes are exactly same (with gcc 9).

My suggestion was to compare the *contents* of the libraries, not just their sizes. Either they should be byte-for-byte identical, or if there are other differences (register allocation, line numbers in assertions, etc.) a more detailed investigation will be needed.

Here's my diff of the 2 --strip builds

for i in find . -name libm-2.31.9000.so; do echo $i; diff $i /SCRATCH/vgupta/gnu2/install/glibcs/$i ; echo $?; done

./aarch64-linux-gnu/lib64/libm-2.31.9000.so
0
./arm-linux-gnueabi/lib/libm-2.31.9000.so
0
./x86_64-linux-gnu/lib64/libm-2.31.9000.so
0
./arm-linux-gnueabihf/lib/libm-2.31.9000.so
0 ./riscv64-linux-gnu-rv64imac-lp64/lib64/lp64/libm-2.31.9000.so 0 ./riscv64-linux-gnu-rv64imafdc-lp64/lib64/lp64/libm-2.31.9000.so 0
./powerpc-linux-gnu/lib/libm-2.31.9000.so
0

Quoted 8 lines

./microblaze-linux-gnu/lib/libm-2.31.9000.so
0
./nios2-linux-gnu/lib/libm-2.31.9000.so
0
./hppa-linux-gnu/lib/libm-2.31.9000.so
0
./s390x-linux-gnu/lib64/libm-2.31.9000.so
0

Is this sufficient for comparison ?

-Vineet
_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

#8 lore raw
Quoted 41 lines · Vineet Gupta via Libc-alpha
Quoted 31 lines · Vineet Gupta via Libc-alpha
Quoted 10 lines · Joseph Myers
Quoted 2 lines · Vineet Gupta via Libc-alpha

Also as suggested by Joseph [1] used --strip and compared the libs with and w/o patch and their sizes are exactly same (with gcc 9).

My suggestion was to compare the *contents* of the libraries, not just their sizes. Either they should be byte-for-byte identical, or if there are other differences (register allocation, line numbers in assertions, etc.) a more detailed investigation will be needed.

Here's my diff of the 2 --strip builds

for i in find . -name libm-2.31.9000.so; do echo $i; diff $i /SCRATCH/vgupta/gnu2/install/glibcs/$i ; echo $?; done

./aarch64-linux-gnu/lib64/libm-2.31.9000.so
0
./arm-linux-gnueabi/lib/libm-2.31.9000.so
0
./x86_64-linux-gnu/lib64/libm-2.31.9000.so
0
./arm-linux-gnueabihf/lib/libm-2.31.9000.so
0 ./riscv64-linux-gnu-rv64imac-lp64/lib64/lp64/libm-2.31.9000.so 0 ./riscv64-linux-gnu-rv64imafdc-lp64/lib64/lp64/libm-2.31.9000.so 0
./powerpc-linux-gnu/lib/libm-2.31.9000.so
0

Quoted 8 lines

./microblaze-linux-gnu/lib/libm-2.31.9000.so
0
./nios2-linux-gnu/lib/libm-2.31.9000.so
0
./hppa-linux-gnu/lib/libm-2.31.9000.so
0
./s390x-linux-gnu/lib64/libm-2.31.9000.so
0

Quoted 1 line

Is this sufficient for comparison ?

ping !
_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

#9 lore raw
Quoted 42 lines · Vineet Gupta via Libc-alpha
Quoted 41 lines · Vineet Gupta via Libc-alpha
Quoted 39 lines · Vineet Gupta via Libc-alpha
Quoted 10 lines · Joseph Myers
Quoted 2 lines · Vineet Gupta via Libc-alpha

Also as suggested by Joseph [1] used --strip and compared the libs with and w/o patch and their sizes are exactly same (with gcc 9).

My suggestion was to compare the *contents* of the libraries, not just their sizes. Either they should be byte-for-byte identical, or if there are other differences (register allocation, line numbers in assertions, etc.) a more detailed investigation will be needed.

Here's my diff of the 2 --strip builds

for i in find . -name libm-2.31.9000.so; do echo $i; diff $i /SCRATCH/vgupta/gnu2/install/glibcs/$i ; echo $?; done

./aarch64-linux-gnu/lib64/libm-2.31.9000.so
0
./arm-linux-gnueabi/lib/libm-2.31.9000.so
0
./x86_64-linux-gnu/lib64/libm-2.31.9000.so
0
./arm-linux-gnueabihf/lib/libm-2.31.9000.so
0 ./riscv64-linux-gnu-rv64imac-lp64/lib64/lp64/libm-2.31.9000.so 0 ./riscv64-linux-gnu-rv64imafdc-lp64/lib64/lp64/libm-2.31.9000.so 0
./powerpc-linux-gnu/lib/libm-2.31.9000.so
0
./microblaze-linux-gnu/lib/libm-2.31.9000.so
0
./nios2-linux-gnu/lib/libm-2.31.9000.so
0
./hppa-linux-gnu/lib/libm-2.31.9000.so
0
./s390x-linux-gnu/lib64/libm-2.31.9000.so
0

Quoted 4 lines
Quoted 1 line

Is this sufficient for comparison ?

ping !

This analysis looks good me, although I can't voucher for Joseph.

_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

#10 lore raw
Quoted 6 lines · Adhemerval Zanella
Quoted 4 lines
Quoted 1 line

Is this sufficient for comparison ?

ping !

This analysis looks good me, although I can't voucher for Joseph.

This patch is OK.

Signature · 7 lines
Joseph S. Myers
[email protected]

_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc