about summary refs log tree commit diff
path: root/src/math
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
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')
-rw-r--r--src/math/x32/acosl.s2
-rw-r--r--src/math/x32/asinl.s2
-rw-r--r--src/math/x32/atan2l.s4
-rw-r--r--src/math/x32/atanl.s2
-rw-r--r--src/math/x32/exp2l.s42
-rw-r--r--src/math/x32/expl.s32
-rw-r--r--src/math/x32/fabsl.s2
-rw-r--r--src/math/x32/floorl.s18
-rw-r--r--src/math/x32/fmodl.s4
-rw-r--r--src/math/x32/llrintl.s6
-rw-r--r--src/math/x32/log10l.s2
-rw-r--r--src/math/x32/log1pl.s4
-rw-r--r--src/math/x32/log2l.s2
-rw-r--r--src/math/x32/logl.s2
-rw-r--r--src/math/x32/lrintl.s6
-rw-r--r--src/math/x32/remainderl.s4
-rw-r--r--src/math/x32/rintl.s2
-rw-r--r--src/math/x32/sqrtl.s2
18 files changed, 69 insertions, 69 deletions
diff --git a/src/math/x32/acosl.s b/src/math/x32/acosl.s
index 88e01b49..1abca12e 100644
--- a/src/math/x32/acosl.s
+++ b/src/math/x32/acosl.s
@@ -3,7 +3,7 @@
 .global acosl
 .type acosl,@function
 acosl:
-	fldt 8(%rsp)
+	fldt 8(%esp)
 1:	fld %st(0)
 	fld1
 	fsub %st(0),%st(1)
diff --git a/src/math/x32/asinl.s b/src/math/x32/asinl.s
index ed212d9a..7fe9f127 100644
--- a/src/math/x32/asinl.s
+++ b/src/math/x32/asinl.s
@@ -1,7 +1,7 @@
 .global asinl
 .type asinl,@function
 asinl:
-	fldt 8(%rsp)
+	fldt 8(%esp)
 1:	fld %st(0)
 	fld1
 	fsub %st(0),%st(1)
diff --git a/src/math/x32/atan2l.s b/src/math/x32/atan2l.s
index e5f0a3de..1ead0788 100644
--- a/src/math/x32/atan2l.s
+++ b/src/math/x32/atan2l.s
@@ -1,7 +1,7 @@
 .global atan2l
 .type atan2l,@function
 atan2l:
-	fldt 8(%rsp)
-	fldt 24(%rsp)
+	fldt 8(%esp)
+	fldt 24(%esp)
 	fpatan
 	ret
diff --git a/src/math/x32/atanl.s b/src/math/x32/atanl.s
index df76de5d..f475fe0e 100644
--- a/src/math/x32/atanl.s
+++ b/src/math/x32/atanl.s
@@ -1,7 +1,7 @@
 .global atanl
 .type atanl,@function
 atanl:
-	fldt 8(%rsp)
+	fldt 8(%esp)
 	fld1
 	fpatan
 	ret
diff --git a/src/math/x32/exp2l.s b/src/math/x32/exp2l.s
index 0d6cd563..d9f4d6ed 100644
--- a/src/math/x32/exp2l.s
+++ b/src/math/x32/exp2l.s
@@ -1,11 +1,11 @@
 .global expm1l
 .type expm1l,@function
 expm1l:
-	fldt 8(%rsp)
+	fldt 8(%esp)
 	fldl2e
 	fmulp
-	movl $0xc2820000,-4(%rsp)
-	flds -4(%rsp)
+	movl $0xc2820000,-4(%esp)
+	flds -4(%esp)
 	fucomp %st(1)
 	fnstsw %ax
 	sahf
@@ -35,21 +35,21 @@ expm1l:
 .global exp2l
 .type exp2l,@function
 exp2l:
-	fldt 8(%rsp)
+	fldt 8(%esp)
 1:	fld %st(0)
-	sub $16,%rsp
-	fstpt (%rsp)
-	mov 8(%rsp),%ax
+	sub $16,%esp
+	fstpt (%esp)
+	mov 8(%esp),%ax
 	and $0x7fff,%ax
 	cmp $0x3fff+13,%ax
 	jb 4f             # |x| < 8192
 	cmp $0x3fff+15,%ax
 	jae 3f            # |x| >= 32768
-	fsts (%rsp)
-	cmpl $0xc67ff800,(%rsp)
+	fsts (%esp)
+	cmpl $0xc67ff800,(%esp)
 	jb 2f             # x > -16382
-	movl $0x5f000000,(%rsp)
-	flds (%rsp)       # 0x1p63
+	movl $0x5f000000,(%esp)
+	flds (%esp)       # 0x1p63
 	fld %st(1)
 	fsub %st(1)
 	faddp
@@ -57,10 +57,10 @@ exp2l:
 	fnstsw
 	sahf
 	je 2f             # x - 0x1p63 + 0x1p63 == x
-	movl $1,(%rsp)
-	flds (%rsp)       # 0x1p-149
+	movl $1,(%esp)
+	flds (%esp)       # 0x1p-149
 	fdiv %st(1)
-	fstps (%rsp)      # raise underflow
+	fstps (%esp)      # raise underflow
 2:	fld1
 	fld %st(1)
 	frndint
@@ -70,21 +70,21 @@ exp2l:
 	faddp             # 2^(x-rint(x))
 1:	fscale
 	fstp %st(1)
-	add $16,%rsp
+	add $16,%esp
 	ret
 3:	xor %eax,%eax
 4:	cmp $0x3fff-64,%ax
 	fld1
 	jb 1b             # |x| < 0x1p-64
-	fstpt (%rsp)
-	fistl 8(%rsp)
-	fildl 8(%rsp)
+	fstpt (%esp)
+	fistl 8(%esp)
+	fildl 8(%esp)
 	fsubrp %st(1)
-	addl $0x3fff,8(%rsp)
+	addl $0x3fff,8(%esp)
 	f2xm1
 	fld1
 	faddp             # 2^(x-rint(x))
-	fldt (%rsp)       # 2^rint(x)
+	fldt (%esp)       # 2^rint(x)
 	fmulp
-	add $16,%rsp
+	add $16,%esp
 	ret
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
diff --git a/src/math/x32/fabsl.s b/src/math/x32/fabsl.s
index 4e7ab525..4f215df5 100644
--- a/src/math/x32/fabsl.s
+++ b/src/math/x32/fabsl.s
@@ -1,6 +1,6 @@
 .global fabsl
 .type fabsl,@function
 fabsl:
-	fldt 8(%rsp)
+	fldt 8(%esp)
 	fabs
 	ret
diff --git a/src/math/x32/floorl.s b/src/math/x32/floorl.s
index 80da4660..78dcb6da 100644
--- a/src/math/x32/floorl.s
+++ b/src/math/x32/floorl.s
@@ -1,27 +1,27 @@
 .global floorl
 .type floorl,@function
 floorl:
-	fldt 8(%rsp)
+	fldt 8(%esp)
 1:	mov $0x7,%al
-1:	fstcw 8(%rsp)
-	mov 9(%rsp),%ah
-	mov %al,9(%rsp)
-	fldcw 8(%rsp)
+1:	fstcw 8(%esp)
+	mov 9(%esp),%ah
+	mov %al,9(%esp)
+	fldcw 8(%esp)
 	frndint
-	mov %ah,9(%rsp)
-	fldcw 8(%rsp)
+	mov %ah,9(%esp)
+	fldcw 8(%esp)
 	ret
 
 .global ceill
 .type ceill,@function
 ceill:
-	fldt 8(%rsp)
+	fldt 8(%esp)
 	mov $0xb,%al
 	jmp 1b
 
 .global truncl
 .type truncl,@function
 truncl:
-	fldt 8(%rsp)
+	fldt 8(%esp)
 	mov $0xf,%al
 	jmp 1b
diff --git a/src/math/x32/fmodl.s b/src/math/x32/fmodl.s
index ca81e60c..9e4378ab 100644
--- a/src/math/x32/fmodl.s
+++ b/src/math/x32/fmodl.s
@@ -1,8 +1,8 @@
 .global fmodl
 .type fmodl,@function
 fmodl:
-	fldt 24(%rsp)
-	fldt 8(%rsp)
+	fldt 24(%esp)
+	fldt 8(%esp)
 1:	fprem
 	fstsw %ax
 	sahf
diff --git a/src/math/x32/llrintl.s b/src/math/x32/llrintl.s
index 1ec0817d..09386079 100644
--- a/src/math/x32/llrintl.s
+++ b/src/math/x32/llrintl.s
@@ -1,7 +1,7 @@
 .global llrintl
 .type llrintl,@function
 llrintl:
-	fldt 8(%rsp)
-	fistpll 8(%rsp)
-	mov 8(%rsp),%rax
+	fldt 8(%esp)
+	fistpll 8(%esp)
+	mov 8(%esp),%rax
 	ret
diff --git a/src/math/x32/log10l.s b/src/math/x32/log10l.s
index 48ea4af7..ef5bea3f 100644
--- a/src/math/x32/log10l.s
+++ b/src/math/x32/log10l.s
@@ -2,6 +2,6 @@
 .type log10l,@function
 log10l:
 	fldlg2
-	fldt 8(%rsp)
+	fldt 8(%esp)
 	fyl2x
 	ret
diff --git a/src/math/x32/log1pl.s b/src/math/x32/log1pl.s
index 955c9dbf..2e64fd4b 100644
--- a/src/math/x32/log1pl.s
+++ b/src/math/x32/log1pl.s
@@ -1,10 +1,10 @@
 .global log1pl
 .type log1pl,@function
 log1pl:
-	mov 14(%rsp),%eax
+	mov 14(%esp),%eax
 	fldln2
 	and $0x7fffffff,%eax
-	fldt 8(%rsp)
+	fldt 8(%esp)
 	cmp $0x3ffd9400,%eax
 	ja 1f
 	fyl2xp1
diff --git a/src/math/x32/log2l.s b/src/math/x32/log2l.s
index ba08b9fb..bf88e8e2 100644
--- a/src/math/x32/log2l.s
+++ b/src/math/x32/log2l.s
@@ -2,6 +2,6 @@
 .type log2l,@function
 log2l:
 	fld1
-	fldt 8(%rsp)
+	fldt 8(%esp)
 	fyl2x
 	ret
diff --git a/src/math/x32/logl.s b/src/math/x32/logl.s
index 20dd1f81..eff64506 100644
--- a/src/math/x32/logl.s
+++ b/src/math/x32/logl.s
@@ -2,6 +2,6 @@
 .type logl,@function
 logl:
 	fldln2
-	fldt 8(%rsp)
+	fldt 8(%esp)
 	fyl2x
 	ret
diff --git a/src/math/x32/lrintl.s b/src/math/x32/lrintl.s
index d587b12b..ee97d1cf 100644
--- a/src/math/x32/lrintl.s
+++ b/src/math/x32/lrintl.s
@@ -1,7 +1,7 @@
 .global lrintl
 .type lrintl,@function
 lrintl:
-	fldt 8(%rsp)
-	fistpll 8(%rsp)
-	mov 8(%rsp),%rax
+	fldt 8(%esp)
+	fistpll 8(%esp)
+	mov 8(%esp),%rax
 	ret
diff --git a/src/math/x32/remainderl.s b/src/math/x32/remainderl.s
index 75c12374..c97f68ad 100644
--- a/src/math/x32/remainderl.s
+++ b/src/math/x32/remainderl.s
@@ -1,8 +1,8 @@
 .global remainderl
 .type remainderl,@function
 remainderl:
-	fldt 24(%rsp)
-	fldt 8(%rsp)
+	fldt 24(%esp)
+	fldt 8(%esp)
 1:	fprem1
 	fstsw %ax
 	sahf
diff --git a/src/math/x32/rintl.s b/src/math/x32/rintl.s
index 64e663cd..be1d2fa7 100644
--- a/src/math/x32/rintl.s
+++ b/src/math/x32/rintl.s
@@ -1,6 +1,6 @@
 .global rintl
 .type rintl,@function
 rintl:
-	fldt 8(%rsp)
+	fldt 8(%esp)
 	frndint
 	ret
diff --git a/src/math/x32/sqrtl.s b/src/math/x32/sqrtl.s
index 23cd687d..8d70856e 100644
--- a/src/math/x32/sqrtl.s
+++ b/src/math/x32/sqrtl.s
@@ -1,5 +1,5 @@
 .global sqrtl
 .type sqrtl,@function
-sqrtl:	fldt 8(%rsp)
+sqrtl:	fldt 8(%esp)
 	fsqrt
 	ret