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 Use movw on armv7 to fill up...



details:   https://anonhg.NetBSD.org/src/rev/37e76faf0019
branches:  trunk
changeset: 783796:37e76faf0019
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Jan 09 00:01:07 2013 +0000

description:
Use movw on armv7 to fill uppper halfword.

diffstat:

 common/lib/libc/arch/arm/string/strlen_arm.S |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 54846695b2ad -r 37e76faf0019 common/lib/libc/arch/arm/string/strlen_arm.S
--- a/common/lib/libc/arch/arm/string/strlen_arm.S      Tue Jan 08 23:52:48 2013 +0000
+++ b/common/lib/libc/arch/arm/string/strlen_arm.S      Wed Jan 09 00:01:07 2013 +0000
@@ -29,7 +29,7 @@
 
 #include <machine/asm.h>
 
-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 @@
        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:



Home | Main Index | Thread Index | Old Index