1 /* strlen.S: Sparc64 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, 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
8 #define LO_MAGIC 0x01010101
9 #define HI_MAGIC 0x80808080
13 .type strlen,#function
18 sethi %hi(HI_MAGIC), %o4
24 or %o4, %lo(HI_MAGIC), %o3
30 sethi %hi(LO_MAGIC), %o4
35 or %o4, %lo(LO_MAGIC), %o2
37 or %o4, %lo(HI_MAGIC), %o3
39 sethi %hi(LO_MAGIC), %o4
41 or %o4, %lo(LO_MAGIC), %o2
50 /* Check every byte. */
80 .size strlen, .-strlen