1 #if defined __thumb__ || defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
3 #include "../../string/strlen.c"
11 strlen (const char *str
)
13 _CONST
char *start
= str
;
15 /* Skip unaligned part. */
24 while ((long)str
& 3);
27 /* Load two constants:
28 R4 = 0xfefefeff [ == ~(0x80808080 << 1) ]
31 asm ("mov r5, #0x80\n\
32 add r5, r5, #0x8000\n\
33 add r5, r5, r5, lsl #16\n\
37 #if defined __ARM_ARCH_5__ || defined __ARM_ARCH_5T__ || defined __ARM_ARCH_5E__ || defined __ARM_ARCH_5TE__
78 #endif /* __ARM_ARCH_5[T][E]__ */
94 : "=r" (str
) : "0" (str
) : "r2", "r3", "r4", "r5", "r6", "r7");