projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5657cc5
)
simplify nan check in sqrt (x86 asm); result of sqrt is never negative
author
Rich Felker
<dalias@aerifal.cx>
Thu, 15 Mar 2012 16:16:51 +0000
(12:16 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Thu, 15 Mar 2012 16:16:51 +0000
(12:16 -0400)
src/math/i386/sqrt.s
patch
|
blob
|
history
diff --git
a/src/math/i386/sqrt.s
b/src/math/i386/sqrt.s
index 331570446ffb56b4ed3580c8260e14d1b272cdcc..1bd3b05e55348466522170b9e04e4a193514647b 100644
(file)
--- a/
src/math/i386/sqrt.s
+++ b/
src/math/i386/sqrt.s
@@
-10,10
+10,9
@@
sqrt: fldl 4(%esp)
and $0x7ff,%ecx
cmp $0x400,%ecx
jnz 1f
- mov 8(%esp),%ecx
- or $0xffff8000,%ecx
- inc %ecx
- jz 1f
+ mov 8(%esp),%cx
+ inc %cx
+ jo 1f
and $0x200,%eax
sub $0x100,%eax
sub %eax,(%esp)