Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/common/lib/libc/arch/arm/string Fix bug in detecting EOS/mat...
details: https://anonhg.NetBSD.org/src/rev/7c9c0ab94629
branches: trunk
changeset: 784341:7c9c0ab94629
user: matt <matt%NetBSD.org@localhost>
date: Sat Jan 26 07:49:11 2013 +0000
description:
Fix bug in detecting EOS/match on armv6+.
diffstat:
common/lib/libc/arch/arm/string/strchr_arm.S | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r 8c6500ae9932 -r 7c9c0ab94629 common/lib/libc/arch/arm/string/strchr_arm.S
--- a/common/lib/libc/arch/arm/string/strchr_arm.S Sat Jan 26 07:09:41 2013 +0000
+++ b/common/lib/libc/arch/arm/string/strchr_arm.S Sat Jan 26 07:49:11 2013 +0000
@@ -29,7 +29,7 @@
#include <machine/asm.h>
-RCSID("$NetBSD: strchr_arm.S,v 1.2 2013/01/15 16:52:35 matt Exp $")
+RCSID("$NetBSD: strchr_arm.S,v 1.3 2013/01/26 07:49:11 matt Exp $")
#ifdef __ARMEL__
#define BYTE0 0x000000ff
@@ -92,6 +92,8 @@
*/
mvns ip, ip /* did we encounter a NUL? */
beq .Lfind_match /* no, find the match */
+ bics r3, r3, ip /* clear match for the NUL(s) */
+ beq .Lnomatch /* any left set? if not, no match */
movs ip, ip, lshi #8 /* replicate NUL bit to other bytes */
orrne ip, ip, lshi #8 /* replicate NUL bit to other bytes */
orrne ip, ip, lshi #8 /* replicate NUL bit to other bytes */
Home |
Main Index |
Thread Index |
Old Index