diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-04-30 16:53:27 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-04-30 16:53:27 +0000 |
commit | d8b29eea293590e8324bb94a6096521ee76f6452 (patch) | |
tree | 9ca37aef723b9918554b827005338255e4c11d7f /sysdeps/i386/strchrnul.S | |
parent | 68d7943fa266a549037715f07a2f212286ab53e1 (diff) | |
download | glibc-d8b29eea293590e8324bb94a6096521ee76f6452.tar.gz glibc-d8b29eea293590e8324bb94a6096521ee76f6452.tar.xz glibc-d8b29eea293590e8324bb94a6096521ee76f6452.zip |
Update.
* sysdeps/i386/strchrnul.S: Fix bugs which let to wrong results in 25% of all cases.
Diffstat (limited to 'sysdeps/i386/strchrnul.S')
-rw-r--r-- | sysdeps/i386/strchrnul.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/i386/strchrnul.S b/sysdeps/i386/strchrnul.S index 45950c3564..b99a439587 100644 --- 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 */ - jnc L(71) /* 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. */ - jnz L(71) /* 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 |