1 /* strlen_user.S: Sparc optimized strlen_user code
3 * Return length of string in userspace including terminating 0
6 * Copyright (C) 1991,1996 Free Software Foundation
7 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
8 * Copyright (C) 1996 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
11 #define LO_MAGIC 0x01010101
12 #define HI_MAGIC 0x80808080
21 or %o4, %lo(HI_MAGIC), %o3
29 sethi %hi(LO_MAGIC), %o4
36 or %o4, %lo(LO_MAGIC), %o2
48 .global __strlen_user, __strnlen_user
56 sethi %hi(HI_MAGIC), %o4
57 or %o4, %lo(HI_MAGIC), %o3
59 sethi %hi(LO_MAGIC), %o4
61 or %o4, %lo(LO_MAGIC), %o2
75 /* Check every byte. */
97 .section .fixup,#alloc,#execinstr
103 .section __ex_table,#alloc