about summary refs log tree commit diff
path: root/src/math
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2020-02-06 13:29:45 -0500
committerRich Felker <dalias@aerifal.cx>2020-02-06 13:29:45 -0500
commitab9e20905dc1cb74d955cc94b5b76e6e1892b8fe (patch)
tree4d2e96393f6000dffab29c77474503a67d1c318a /src/math
parent141c8d4ccb183365df8d392ae64cd69c4f0df8bf (diff)
downloadmusl-ab9e20905dc1cb74d955cc94b5b76e6e1892b8fe.tar.gz
musl-ab9e20905dc1cb74d955cc94b5b76e6e1892b8fe.tar.xz
musl-ab9e20905dc1cb74d955cc94b5b76e6e1892b8fe.zip
fix excess precision in return value of i386 log-family functions
Diffstat (limited to 'src/math')
-rw-r--r--src/math/i386/log.s2
-rw-r--r--src/math/i386/log10.s2
-rw-r--r--src/math/i386/log10f.s2
-rw-r--r--src/math/i386/log1p.s4
-rw-r--r--src/math/i386/log1pf.s4
-rw-r--r--src/math/i386/log2.s2
-rw-r--r--src/math/i386/log2f.s2
-rw-r--r--src/math/i386/logf.s2
8 files changed, 20 insertions, 0 deletions
diff --git a/src/math/i386/log.s b/src/math/i386/log.s
index fcccf030..08c59924 100644
--- a/src/math/i386/log.s
+++ b/src/math/i386/log.s
@@ -4,4 +4,6 @@ log:
 	fldln2
 	fldl 4(%esp)
 	fyl2x
+	fstpl 4(%esp)
+	fldl 4(%esp)
 	ret
diff --git a/src/math/i386/log10.s b/src/math/i386/log10.s
index 28eb5b2f..120e91ec 100644
--- a/src/math/i386/log10.s
+++ b/src/math/i386/log10.s
@@ -4,4 +4,6 @@ log10:
 	fldlg2
 	fldl 4(%esp)
 	fyl2x
+	fstpl 4(%esp)
+	fldl 4(%esp)
 	ret
diff --git a/src/math/i386/log10f.s b/src/math/i386/log10f.s
index c0c0c67e..b055493a 100644
--- a/src/math/i386/log10f.s
+++ b/src/math/i386/log10f.s
@@ -4,4 +4,6 @@ log10f:
 	fldlg2
 	flds 4(%esp)
 	fyl2x
+	fstps 4(%esp)
+	flds 4(%esp)
 	ret
diff --git a/src/math/i386/log1p.s b/src/math/i386/log1p.s
index 354f391a..f3c95f83 100644
--- a/src/math/i386/log1p.s
+++ b/src/math/i386/log1p.s
@@ -10,10 +10,14 @@ log1p:
 	cmp $0x00100000,%eax
 	jb 2f
 	fyl2xp1
+	fstpl 4(%esp)
+	fldl 4(%esp)
 	ret
 1:	fld1
 	faddp
 	fyl2x
+	fstpl 4(%esp)
+	fldl 4(%esp)
 	ret
 		# subnormal x, return x with underflow
 2:	fsts 4(%esp)
diff --git a/src/math/i386/log1pf.s b/src/math/i386/log1pf.s
index 4d3484cd..9f13d95f 100644
--- a/src/math/i386/log1pf.s
+++ b/src/math/i386/log1pf.s
@@ -10,10 +10,14 @@ log1pf:
 	cmp $0x00800000,%eax
 	jb 2f
 	fyl2xp1
+	fstps 4(%esp)
+	flds 4(%esp)
 	ret
 1:	fld1
 	faddp
 	fyl2x
+	fstps 4(%esp)
+	flds 4(%esp)
 	ret
 		# subnormal x, return x with underflow
 2:	fxch
diff --git a/src/math/i386/log2.s b/src/math/i386/log2.s
index 15088037..7eff0b61 100644
--- a/src/math/i386/log2.s
+++ b/src/math/i386/log2.s
@@ -4,4 +4,6 @@ log2:
 	fld1
 	fldl 4(%esp)
 	fyl2x
+	fstpl 4(%esp)
+	fldl 4(%esp)
 	ret
diff --git a/src/math/i386/log2f.s b/src/math/i386/log2f.s
index 00cdce75..b32fa2f7 100644
--- a/src/math/i386/log2f.s
+++ b/src/math/i386/log2f.s
@@ -4,4 +4,6 @@ log2f:
 	fld1
 	flds 4(%esp)
 	fyl2x
+	fstps 4(%esp)
+	flds 4(%esp)
 	ret
diff --git a/src/math/i386/logf.s b/src/math/i386/logf.s
index da7ff3ae..4d0346a4 100644
--- a/src/math/i386/logf.s
+++ b/src/math/i386/logf.s
@@ -4,4 +4,6 @@ logf:
 	fldln2
 	flds 4(%esp)
 	fyl2x
+	fstps 4(%esp)
+	flds 4(%esp)
 	ret