Author: imp
Date: Wed Feb 26 18:55:03 2020
New Revision: 358347
URL: https://svnweb.freebsd.org/changeset/base/358347

Log:
  Remove sparc64 specific parts of libm and fix comments
  
  Once upon a time, sparc64 was the only ld128 architecture. However,
  both aarch64 and riscv are now such architectures. Many of the
  comments about how slow multiplication was on old sparc64 processors
  are now no longer true. However, since no evaluation has been done for
  aarch64 yet, it's unclear if they are still relevant or not. If not,
  the code should be changed. If so, the comments should remove the
  uncertainty.
  
  Reviewed by: emaste@
  Differential Revision: https://reviews.freebsd.org/D23658

Deleted:
  head/lib/msun/sparc64/Makefile.inc
  head/lib/msun/sparc64/Symbol.map
  head/lib/msun/sparc64/e_sqrt.S
  head/lib/msun/sparc64/e_sqrtf.S
  head/lib/msun/sparc64/fenv.c
  head/lib/msun/sparc64/fenv.h
Modified:
  head/lib/msun/ld128/k_expl.h
  head/lib/msun/ld128/s_expl.c
  head/lib/msun/ld128/s_logl.c

Modified: head/lib/msun/ld128/k_expl.h
==============================================================================
--- head/lib/msun/ld128/k_expl.h        Wed Feb 26 18:49:25 2020        
(r358346)
+++ head/lib/msun/ld128/k_expl.h        Wed Feb 26 18:55:03 2020        
(r358347)
@@ -265,7 +265,8 @@ __k_expl(long double x, long double *hip, long double 
 /*
  * XXX: the rest of the functions are identical for ld80 and ld128.
  * However, we should use scalbnl() for ld128, since long double
- * multiplication is very slow on the only supported ld128 arch (sparc64).
+ * multiplication was very slow on sparc64 and no new evaluation has
+ * been made for aarch64 and/or riscv.
  */
 
 static inline void

Modified: head/lib/msun/ld128/s_expl.c
==============================================================================
--- head/lib/msun/ld128/s_expl.c        Wed Feb 26 18:49:25 2020        
(r358346)
+++ head/lib/msun/ld128/s_expl.c        Wed Feb 26 18:55:03 2020        
(r358347)
@@ -92,7 +92,10 @@ expl(long double x)
        t = SUM2P(hi, lo);
 
        /* Scale by 2**k. */
-       /* XXX sparc64 multiplication is so slow that scalbnl() is faster. */
+       /*
+        * XXX sparc64 multiplication was so slow that scalbnl() is faster,
+        * but performance on aarch64 and riscv hasn't yet been quantified.
+        */
        if (k >= LDBL_MIN_EXP) {
                if (k == LDBL_MAX_EXP)
                        RETURNI(t * 2 * 0x1p16383L);

Modified: head/lib/msun/ld128/s_logl.c
==============================================================================
--- head/lib/msun/ld128/s_logl.c        Wed Feb 26 18:49:25 2020        
(r358346)
+++ head/lib/msun/ld128/s_logl.c        Wed Feb 26 18:55:03 2020        
(r358347)
@@ -535,16 +535,17 @@ logl(long double x)
         * efficiency than is gained.
         */
        /*
-        * Use double precision operations wherever possible, since long
-        * double operations are emulated and are very slow on the only
-        * known machines that support ld128 (sparc64).  Also, don't try
-        * to improve parallelism by increasing the number of operations,
-        * since any parallelism on such machines is needed for the
-        * emulation.  Horner's method is good for this, and is also good
-        * for accuracy.  Horner's method doesn't handle the `lo' term
-        * well, either for efficiency or accuracy.  However, for accuracy
-        * we evaluate d * d * P2 separately to take advantage of
-        * by P2 being exact, and this gives a good place to sum the 'lo'
+        * Use double precision operations wherever possible, since
+        * long double operations are emulated and were very slow on
+        * the old sparc64 and unknown on the newer aarch64 and riscv
+        * machines.  Also, don't try to improve parallelism by
+        * increasing the number of operations, since any parallelism
+        * on such machines is needed for the emulation.  Horner's
+        * method is good for this, and is also good for accuracy.
+        * Horner's method doesn't handle the `lo' term well, either
+        * for efficiency or accuracy.  However, for accuracy we
+        * evaluate d * d * P2 separately to take advantage of by P2
+        * being exact, and this gives a good place to sum the 'lo'
         * term too.
         */
        dd = (double)d;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to