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 Deal with an end-of-string c...
details: https://anonhg.NetBSD.org/src/rev/e87cc531cce0
branches: trunk
changeset: 784417:e87cc531cce0
user: matt <matt%NetBSD.org@localhost>
date: Mon Jan 28 06:23:14 2013 +0000
description:
Deal with an end-of-string condition properly.
diffstat:
common/lib/libc/arch/arm/string/strrchr_arm.S | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r 20833fcefb68 -r e87cc531cce0 common/lib/libc/arch/arm/string/strrchr_arm.S
--- a/common/lib/libc/arch/arm/string/strrchr_arm.S Mon Jan 28 06:22:34 2013 +0000
+++ b/common/lib/libc/arch/arm/string/strrchr_arm.S Mon Jan 28 06:23:14 2013 +0000
@@ -29,7 +29,7 @@
#include <machine/asm.h>
-RCSID("$NetBSD: strrchr_arm.S,v 1.1 2013/01/15 08:52:27 matt Exp $")
+RCSID("$NetBSD: strrchr_arm.S,v 1.2 2013/01/28 06:23:14 matt Exp $")
#ifdef __ARMEL__
#define BYTE0 0x000000ff
@@ -94,6 +94,8 @@
* Copy the NUL bit to the following byte lanes. Then clear any match
* bits in those byte lanes to prevent false positives in those bytes.
*/
+ bics r5, r5, r4 /* clear any NUL match bits */
+ beq .Ldone /* no remaining matches, we're done */
movs r3, r4, lshi #8 /* shift up a byte */
orrnes r3, r3, r3, lshi #8 /* if non 0, copy up to next byte */
orrnes r3, r3, r3, lshi #8 /* if non 0, copy up to last byte */
Home |
Main Index |
Thread Index |
Old Index