projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
math: move x87-family fabs functions to C with inline asm
[musl]
/
src
/
math
/
x86_64
/
exp2l.s
diff --git
a/src/math/x86_64/exp2l.s
b/src/math/x86_64/exp2l.s
index
0d6cd56
..
effab2b
100644
(file)
--- a/
src/math/x86_64/exp2l.s
+++ b/
src/math/x86_64/exp2l.s
@@
-6,9
+6,7
@@
expm1l:
fmulp
movl $0xc2820000,-4(%rsp)
flds -4(%rsp)
fmulp
movl $0xc2820000,-4(%rsp)
flds -4(%rsp)
- fucomp %st(1)
- fnstsw %ax
- sahf
+ fucomip %st(1),%st
fld1
jb 1f
# x*log2e <= -65, return -1 without underflow
fld1
jb 1f
# x*log2e <= -65, return -1 without underflow
@@
-17,11
+15,8
@@
expm1l:
ret
1: fld %st(1)
fabs
ret
1: fld %st(1)
fabs
- fucom %st(1)
- fnstsw %ax
+ fucomip %st(1),%st
fstp %st(0)
fstp %st(0)
- fstp %st(0)
- sahf
ja 1f
f2xm1
ret
ja 1f
f2xm1
ret
@@
-53,9
+48,7
@@
exp2l:
fld %st(1)
fsub %st(1)
faddp
fld %st(1)
fsub %st(1)
faddp
- fucomp %st(1)
- fnstsw
- sahf
+ fucomip %st(1),%st
je 2f # x - 0x1p63 + 0x1p63 == x
movl $1,(%rsp)
flds (%rsp) # 0x1p-149
je 2f # x - 0x1p63 + 0x1p63 == x
movl $1,(%rsp)
flds (%rsp) # 0x1p-149