summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2003-11-01 22:19:33 +0000
committermillert <millert@openbsd.org>2003-11-01 22:19:33 +0000
commit0596ab59e2dcf28f889c4af9857b9bb397b7db25 (patch)
treef766cb6a0b68adf82b5bc05cbf5d5e4c948f5ebf
parentprocess signals at the right time. also handle stdin failure better; (diff)
downloadwireguard-openbsd-0596ab59e2dcf28f889c4af9857b9bb397b7db25.tar.xz
wireguard-openbsd-0596ab59e2dcf28f889c4af9857b9bb397b7db25.zip
Historically, scalb() in 4BSD had the actual semantics of scalbn(). We changed
scalb() to scalbn() some time ago in the tree to fix this. However, it turns out the vax scalb() had already been fixed to support standard scalb() semantics. This commit undoes that change, making the vax scalbn() the same as the 4BSD scalb() (but with the correct name) and fixes the comment. We still could use wrappers for scalb(), scalbf() and scalbnf(). Fixes exp() and a number of perl tests; OK hugh@
-rw-r--r--lib/libm/arch/vax/n_support.S9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/libm/arch/vax/n_support.S b/lib/libm/arch/vax/n_support.S
index f0f7644da20..2bf94cfe465 100644
--- a/lib/libm/arch/vax/n_support.S
+++ b/lib/libm/arch/vax/n_support.S
@@ -100,19 +100,18 @@ _finite:
/*
* double scalbn(x,N)
- * double x; double N;
+ * double x; int N;
*/
.globl _scalbn
.set ERANGE,34
.text
.align 1
_scalbn:
- .word 0x3c
+ .word 0xc
movq 4(ap),r0
bicl3 $0xffff807f,r0,r3
beql ret1 # 0 or reserved operand
- movq 12(ap),r4
- cvtdl r4, r2
+ movl 12(ap),r2
cmpl r2,$0x12c
bgeq ovfl
cmpl r2,$-0x12c
@@ -215,7 +214,7 @@ E2:
movw $0,r8 #clear r8
movq $0,r0 #x underflow to zero
C5:
- bisw2 r8,r0 /* put r8 into x's exponent field */
+ bisw2 r8,r0 #put r8 into x's exponent field
ret
Rop: #Reserved operand
pushl $EDOM