summaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2015-04-23 06:21:49 -0400
committerRich Felker <dalias@aerifal.cx>2015-04-23 06:21:49 -0400
commit18938c299c0923e7034e8bfc5b250ded3b0ef78a (patch)
treee59dd8b1303fb19473c3bba773632b00dabd487d /src/math
parent3aacb54ead6ef83c3da1216687a34e97b494f5ca (diff)
downloadmusl-18938c299c0923e7034e8bfc5b250ded3b0ef78a.tar.gz
fix regression in x86_64 math asm with old binutils
the implicit-operand form of fucomip is rejected by binutils 2.19 and perhaps other versions still in use. writing both operands explicitly fixes the issue. there is no change to the resulting output. commit a732e80d33b4fd6f510f7cec4f5573ef5d89bc4e was the source of this regression.
Diffstat (limited to 'src/math')
-rw-r--r--src/math/x32/exp2l.s6
-rw-r--r--src/math/x86_64/exp2l.s6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/math/x32/exp2l.s b/src/math/x32/exp2l.s
index dfb2bc7c..e9edb96f 100644
--- a/src/math/x32/exp2l.s
+++ b/src/math/x32/exp2l.s
@@ -6,7 +6,7 @@ expm1l:
fmulp
movl $0xc2820000,-4(%esp)
flds -4(%esp)
- fucomip %st(1)
+ fucomip %st(1),%st
fld1
jb 1f
# x*log2e <= -65, return -1 without underflow
@@ -15,7 +15,7 @@ expm1l:
ret
1: fld %st(1)
fabs
- fucomip %st(1)
+ fucomip %st(1),%st
fstp %st(0)
ja 1f
f2xm1
@@ -48,7 +48,7 @@ exp2l:
fld %st(1)
fsub %st(1)
faddp
- fucomip %st(1)
+ fucomip %st(1),%st
je 2f # x - 0x1p63 + 0x1p63 == x
movl $1,(%esp)
flds (%esp) # 0x1p-149
diff --git a/src/math/x86_64/exp2l.s b/src/math/x86_64/exp2l.s
index 0e9bdf9f..effab2bd 100644
--- a/src/math/x86_64/exp2l.s
+++ b/src/math/x86_64/exp2l.s
@@ -6,7 +6,7 @@ expm1l:
fmulp
movl $0xc2820000,-4(%rsp)
flds -4(%rsp)
- fucomip %st(1)
+ fucomip %st(1),%st
fld1
jb 1f
# x*log2e <= -65, return -1 without underflow
@@ -15,7 +15,7 @@ expm1l:
ret
1: fld %st(1)
fabs
- fucomip %st(1)
+ fucomip %st(1),%st
fstp %st(0)
ja 1f
f2xm1
@@ -48,7 +48,7 @@ exp2l:
fld %st(1)
fsub %st(1)
faddp
- fucomip %st(1)
+ fucomip %st(1),%st
je 2f # x - 0x1p63 + 0x1p63 == x
movl $1,(%rsp)
flds (%rsp) # 0x1p-149