projects
/
kopensolaris-gnu
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
30da651
)
Fix bugs which let to wrong results in 25% of all cases.
author
drepper
<drepper>
Fri, 30 Apr 1999 16:53:17 +0000
(16:53 +0000)
committer
drepper
<drepper>
Fri, 30 Apr 1999 16:53:17 +0000
(16:53 +0000)
sysdeps/i386/strchrnul.S
patch
|
blob
|
history
diff --git
a/sysdeps/i386/strchrnul.S
b/sysdeps/i386/strchrnul.S
index
45950c3
..
b99a439
100644
(file)
--- a/
sysdeps/i386/strchrnul.S
+++ b/
sysdeps/i386/strchrnul.S
@@
-156,12
+156,12
@@
L(11): movl (%eax), %ecx /* get word (= 4 bytes) in question */
addl %ecx, %edi /* add the magic value to the word. We get
carry bits reported for each byte which
is *not* 0 */
addl %ecx, %edi /* add the magic value to the word. We get
carry bits reported for each byte which
is *not* 0 */
- jnc L(7
1)
/* highest byte is NUL => return NULL */
+ jnc L(7
)
/* highest byte is NUL => return NULL */
xorl %ecx, %edi /* (word+magic)^word */
orl $0xfefefeff, %edi /* set all non-carry bits */
incl %edi /* add 1: if one carry bit was *not* set
the addition will not result in 0. */
xorl %ecx, %edi /* (word+magic)^word */
orl $0xfefefeff, %edi /* set all non-carry bits */
incl %edi /* add 1: if one carry bit was *not* set
the addition will not result in 0. */
- jnz L(7
1)
/* found NUL => return NULL */
+ jnz L(7
)
/* found NUL => return NULL */
movl 4(%eax), %ecx /* get word (= 4 bytes) in question */
xorl %edx, %ecx /* XOR with word c|c|c|c => bytes of str == c
movl 4(%eax), %ecx /* get word (= 4 bytes) in question */
xorl %edx, %ecx /* XOR with word c|c|c|c => bytes of str == c