From 0e293547ab82ab765c7ea4e6c68594d41d494f8b Mon Sep 17 00:00:00 2001 From: matt Date: Wed, 9 Jan 2013 00:01:07 +0000 Subject: [PATCH] Use movw on armv7 to fill uppper halfword. --- common/lib/libc/arch/arm/string/strlen_arm.S | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/common/lib/libc/arch/arm/string/strlen_arm.S b/common/lib/libc/arch/arm/string/strlen_arm.S index 7222300d0fc0..b85bc5809f01 100644 --- a/common/lib/libc/arch/arm/string/strlen_arm.S +++ b/common/lib/libc/arch/arm/string/strlen_arm.S @@ -29,7 +29,7 @@ #include -RCSID("$NetBSD: strlen_arm.S,v 1.1 2013/01/08 13:17:45 matt Exp $") +RCSID("$NetBSD: strlen_arm.S,v 1.2 2013/01/09 00:01:07 matt Exp $") #ifdef __ARMEL__ #define BYTE0 0x000000ff @@ -55,13 +55,12 @@ ENTRY(strlen) sub r0, r0, ip /* subtract start */ RET /* return */ .Lpre_main_loop: -#if defined(_ARM_ARCH_6) #if defined(_ARM_ARCH_7) movw r1, #0xfefe /* magic constant; 254 in each byte */ -#else + movt r1, #0xfefe /* magic constant; 254 in each byte */ +#elif defined(_ARM_ARCH_6) mov r1, #0xfe /* put 254 in low byte */ orr r1, r1, r1, lsl #8 /* move to next byte */ -#endif orr r1, r1, r1, lsl #16 /* move to next halfword */ #endif /* _ARM_ARCH_6 */ .Lmain_loop: