summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartynas Venckus <martynas@cvs.openbsd.org>2008-09-16 22:13:13 +0000
committerMartynas Venckus <martynas@cvs.openbsd.org>2008-09-16 22:13:13 +0000
commitc5b9c7b6d7de2c276ebe5456b27b7f13916e9204 (patch)
tree28bba24ec9d288eefeeb12d946057a197d738841
parent9504972a6272bc1187c7271647c6874f53944f16 (diff)
remove d_cbrt, dcbrt, d_sqrt. ok millert@
-rw-r--r--lib/libm/arch/vax/n_cbrt.S15
-rw-r--r--lib/libm/arch/vax/n_sqrt.S8
2 files changed, 7 insertions, 16 deletions
diff --git a/lib/libm/arch/vax/n_cbrt.S b/lib/libm/arch/vax/n_cbrt.S
index 2d7c9676f7c..dd03a8fa229 100644
--- a/lib/libm/arch/vax/n_cbrt.S
+++ b/lib/libm/arch/vax/n_cbrt.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: n_cbrt.S,v 1.3 2008/05/21 20:37:10 miod Exp $ */
+/* $OpenBSD: n_cbrt.S,v 1.4 2008/09/16 22:13:12 martynas Exp $ */
/* $NetBSD: n_cbrt.S,v 1.1 1995/10/10 23:40:26 ragge Exp $ */
/*
* Copyright (c) 1985, 1993
@@ -42,22 +42,17 @@
*/
.text
_ALIGN_TEXT
-ALTENTRY(d_cbrt)
ENTRY(cbrt, R2|R3|R4|R5|R6|R7)
movq 4(ap),r0 # r0 = argument x
- jmp dcbrt2
-ENTRY(dcbrt, R2|R3|R4|R5|R6|R7)
- movq *4(ap),r0 # r0 = argument x
-
-dcbrt2: bicw3 $0x807f,r0,r2 # biased exponent of x
- jeql return # dcbrt(0)=0 dcbrt(res)=res. operand
+ bicw3 $0x807f,r0,r2 # biased exponent of x
+ jeql return # cbrt(0)=0 cbrt(res)=res. operand
bicw3 $0x7fff,r0,ap # ap has sign(x)
xorw2 ap,r0 # r0 is abs(x)
movl r0,r2 # r2 has abs(x)
rotl $16,r2,r2 # r2 = |x| with bits unscrambled
- divl2 $3,r2 # rough dcbrt with bias/3
+ divl2 $3,r2 # rough cbrt with bias/3
addl2 B,r2 # restore bias, diminish fraction
- rotl $16,r2,r2 # r2=|q|=|dcbrt| to 5 bits
+ rotl $16,r2,r2 # r2=|q|=|cbrt| to 5 bits
mulf3 r2,r2,r3 # r3 =qq
divf2 r0,r3 # r3 = qq/x
mulf2 r2,r3
diff --git a/lib/libm/arch/vax/n_sqrt.S b/lib/libm/arch/vax/n_sqrt.S
index 8117544706e..5050c9fefc5 100644
--- a/lib/libm/arch/vax/n_sqrt.S
+++ b/lib/libm/arch/vax/n_sqrt.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: n_sqrt.S,v 1.4 2008/06/21 08:26:19 martynas Exp $ */
+/* $OpenBSD: n_sqrt.S,v 1.5 2008/09/16 22:13:12 martynas Exp $ */
/* $NetBSD: n_sqrt.S,v 1.1 1995/10/10 23:40:29 ragge Exp $ */
/*
* Copyright (c) 1985, 1993
@@ -42,12 +42,8 @@
* W. Kahan's magic square root
* coded by Heidi Stettner and revised by Emile LeBlanc 8/18/82
*
- * entry points:d_sqrt address of double arg is on the stack
- * sqrt double arg is on the stack
+ * entry points: sqrt double arg is on the stack
*/
-ENTRY(d_sqrt, R2|R3|R4|R5)
- movq *4(ap),r0
- jmp dsqrt2
ENTRY(sqrt, R2|R3|R4|R5)
movq 4(ap),r0
dsqrt2: bicw3 $0x807f,r0,r2 # check exponent of input