1 /* strlen.S: Sparc optimized strlen code
2 * Hand optimized from GNU libc's strlen
3 * Copyright (C) 1991,1996 Free Software Foundation
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
5 * Copyright (C) 1996 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
8 #include <asm/cprefix.h>
10 #define LO_MAGIC 0x01010101
11 #define HI_MAGIC 0x80808080
20 or %o4, %lo(HI_MAGIC), %o3
27 sethi %hi(LO_MAGIC), %o4
33 or %o4, %lo(LO_MAGIC), %o2
45 .global C_LABEL(strlen)
50 sethi %hi(HI_MAGIC), %o4
51 or %o4, %lo(HI_MAGIC), %o3
53 sethi %hi(LO_MAGIC), %o4
55 or %o4, %lo(LO_MAGIC), %o2
64 /* Check every byte. */