Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libm/arch/i387 Avoid the PIC dance.



details:   https://anonhg.NetBSD.org/src/rev/d78175b033c7
branches:  trunk
changeset: 552043:d78175b033c7
user:      wennmach <wennmach%NetBSD.org@localhost>
date:      Tue Sep 16 18:17:11 2003 +0000

description:
Avoid the PIC dance.

diffstat:

 lib/libm/arch/i387/s_log1p.S  |  33 +++++++++++++++++----------------
 lib/libm/arch/i387/s_log1pf.S |  33 +++++++++++++++++----------------
 2 files changed, 34 insertions(+), 32 deletions(-)

diffs (126 lines):

diff -r b3040b2eba24 -r d78175b033c7 lib/libm/arch/i387/s_log1p.S
--- a/lib/libm/arch/i387/s_log1p.S      Tue Sep 16 17:39:32 2003 +0000
+++ b/lib/libm/arch/i387/s_log1p.S      Tue Sep 16 18:17:11 2003 +0000
@@ -12,7 +12,7 @@
 
 #include "abi.h"
 
-RCSID("$NetBSD: s_log1p.S,v 1.12 2003/09/14 21:26:14 fvdl Exp $")
+RCSID("$NetBSD: s_log1p.S,v 1.13 2003/09/16 18:17:11 wennmach Exp $")
 
 /*
  * The log1p() function is provided to compute an accurate value of
@@ -40,25 +40,25 @@
  * 
  */
 
-.section       .rodata
-       .align 8
-BOUND:
-       .long 0x0,0x3fd00000            /* (double)0.25 */
-
 .text
-       .align 4
+       .align  4
 ENTRY(log1p)
        XMM_ONE_ARG_DOUBLE_PROLOGUE
        fldl    ARG_DOUBLE_ONE
        fabs
-       FLDL_VAR(BOUND)
+       fld1                            /* ... x 1 */
+       fadd    %st(0)                  /* ... x 2 */
+       fadd    %st(0)                  /* ... x 4 */
+       fld1                            /* ... 4 1 */
+       fdivp                           /* ... x 0.25 */
        fcompp
-       fnstsw %ax
-       andb $69,%ah
-       jne .l1
-       jmp .l2
-       .align 4
-.l1:
+       fnstsw  %ax
+       andb    $69,%ah
+       jne     use_fyl2x
+       jmp     use_fyl2xp1
+
+       .align  4
+use_fyl2x:
        fldln2
         fldl   ARG_DOUBLE_ONE
         fld1
@@ -66,8 +66,9 @@
         fyl2x
        XMM_DOUBLE_EPILOGUE
         ret
-       .align 4
-.l2:
+
+       .align  4
+use_fyl2xp1:
        fldln2
        fldl    ARG_DOUBLE_ONE
        fyl2xp1
diff -r b3040b2eba24 -r d78175b033c7 lib/libm/arch/i387/s_log1pf.S
--- a/lib/libm/arch/i387/s_log1pf.S     Tue Sep 16 17:39:32 2003 +0000
+++ b/lib/libm/arch/i387/s_log1pf.S     Tue Sep 16 18:17:11 2003 +0000
@@ -12,7 +12,7 @@
 
 #include "abi.h"
 
-RCSID("$NetBSD: s_log1pf.S,v 1.9 2003/09/14 21:26:14 fvdl Exp $")
+RCSID("$NetBSD: s_log1pf.S,v 1.10 2003/09/16 18:17:11 wennmach Exp $")
 
 /*
  * The log1pf() function is provided to compute an accurate value of
@@ -40,25 +40,25 @@
  * 
  */
 
-.section       .rodata
-       .align 8
-BOUND:
-       .long 0x0,0x3fd00000            /* (double)0.25 */
-
 .text
-       .align 4
+       .align  4
 ENTRY(log1pf)
        XMM_ONE_ARG_FLOAT_PROLOGUE
        flds    ARG_FLOAT_ONE
        fabs
-       FLDL_VAR(BOUND)
+       fld1                            /* ... x 1 */
+       fadd    %st(0)                  /* ... x 2 */
+       fadd    %st(0)                  /* ... x 4 */
+       fld1                            /* ... 4 1 */
+       fdivp                           /* ... x 0.25 */
        fcompp
-       fnstsw %ax
-       andb $69,%ah
-       jne .l1
-       jmp .l2
-       .align 4
-.l1:
+       fnstsw  %ax
+       andb    $69,%ah
+       jne     use_fyl2x
+       jmp     use_fyl2xp1
+
+       .align  4
+use_fyl2x:
        fldln2
         flds   ARG_FLOAT_ONE
         fld1
@@ -66,8 +66,9 @@
         fyl2x
        XMM_FLOAT_EPILOGUE
         ret
-       .align 4
-.l2:
+
+       .align  4
+use_fyl2xp1:
        fldln2
        flds    ARG_FLOAT_ONE
        fyl2xp1



Home | Main Index | Thread Index | Old Index