about summary refs log tree commit diff
path: root/src/math/x32/expl.s
diff options
context:
space:
mode:
authorrofl0r <retnyg@gmx.net>2014-01-07 22:53:38 +0100
committerrofl0r <retnyg@gmx.net>2014-02-23 11:09:16 +0100
commit664cd341921007cea52c8891f27ce35927dca378 (patch)
treeb6aa7594609a40616db8458f879dfdb0dddf4b7c /src/math/x32/expl.s
parent323272db175204b951f119dae4bd99ef05e20f13 (diff)
downloadmusl-664cd341921007cea52c8891f27ce35927dca378.tar.gz
musl-664cd341921007cea52c8891f27ce35927dca378.tar.xz
musl-664cd341921007cea52c8891f27ce35927dca378.zip
x32 port (diff against vanilla x86_64)
Diffstat (limited to 'src/math/x32/expl.s')
-rw-r--r--src/math/x32/expl.s32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/math/x32/expl.s b/src/math/x32/expl.s
index 3add810d..aabea45e 100644
--- a/src/math/x32/expl.s
+++ b/src/math/x32/expl.s
@@ -6,11 +6,11 @@
 .global expl
 .type expl,@function
 expl:
-	fldt 8(%rsp)
+	fldt 8(%esp)
 
 		# interesting case: 0x1p-32 <= |x| < 16384
 		# check if (exponent|0x8000) is in [0xbfff-32, 0xbfff+13]
-	mov 16(%rsp), %ax
+	mov 16(%esp), %ax
 	or $0x8000, %ax
 	sub $0xbfdf, %ax
 	cmp $45, %ax
@@ -29,29 +29,29 @@ expl:
 		# should be 0x1.71547652b82fe178p0L == 0x3fff b8aa3b29 5c17f0bc
 		# it will be wrong on non-nearest rounding mode
 2:	fldl2e
-	subq $48, %rsp
+	sub $48, %esp
 		# hi = log2e_hi*x
 		# 2^hi = exp2l(hi)
 	fmul %st(1),%st
 	fld %st(0)
-	fstpt (%rsp)
-	fstpt 16(%rsp)
-	fstpt 32(%rsp)
+	fstpt (%esp)
+	fstpt 16(%esp)
+	fstpt 32(%esp)
 	call exp2l
 		# if 2^hi == inf return 2^hi
 	fld %st(0)
-	fstpt (%rsp)
-	cmpw $0x7fff, 8(%rsp)
+	fstpt (%esp)
+	cmpw $0x7fff, 8(%esp)
 	je 1f
-	fldt 32(%rsp)
-	fldt 16(%rsp)
+	fldt 32(%esp)
+	fldt 16(%esp)
 		# fpu stack: 2^hi x hi
 		# exact mult: x*log2e
 	fld %st(1)
 		# c = 0x1p32+1
 	movq $0x41f0000000100000,%rax
 	pushq %rax
-	fldl (%rsp)
+	fldl (%esp)
 		# xh = x - c*x + c*x
 		# xl = x - xh
 	fmulp
@@ -63,7 +63,7 @@ expl:
 		# yh = log2e_hi - c*log2e_hi + c*log2e_hi
 	movq $0x3ff7154765200000,%rax
 	pushq %rax
-	fldl (%rsp)
+	fldl (%esp)
 		# fpu stack: 2^hi x hi xh xl yh
 		# lo = hi - xh*yh + xl*yh
 	fld %st(2)
@@ -74,7 +74,7 @@ expl:
 		# yl = log2e_hi - yh
 	movq $0x3de705fc2f000000,%rax
 	pushq %rax
-	fldl (%rsp)
+	fldl (%esp)
 		# fpu stack: 2^hi x lo xh xl yl
 		# lo += xh*yl + xl*yl
 	fmul %st, %st(2)
@@ -87,8 +87,8 @@ expl:
 	pushq %rax
 	movq $0x82f0025f2dc582ee,%rax
 	pushq %rax
-	fldt (%rsp)
-	addq $40,%rsp
+	fldt (%esp)
+	add $40,%esp
 		# fpu stack: 2^hi x lo log2e_lo
 		# lo += log2e_lo*x
 		# return 2^hi + 2^hi (2^lo - 1)
@@ -97,5 +97,5 @@ expl:
 	f2xm1
 	fmul %st(1), %st
 	faddp
-1:	addq $48, %rsp
+1:	add $48, %esp
 	ret