1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 #include <asm/asmmacro.h>
17 #include <asm/export.h>
18
19 GLOBAL_ENTRY(__strnlen_user)
20 .prologue
21 alloc r2=ar.pfs,2,0,0,0
22 .save ar.lc, r16
23 mov r16=ar.lc
24
25 .body
26
27 add r3=-1,in1
28 ;;
29 mov ar.lc=r3
30 mov r9=0
31 ;;
32
33 .Loop1:
34 EXCLR(.Lexit, ld1 r8=[in0],1)
35 add r9=1,r9
36 ;;
37 cmp.eq p6,p0=r8,r0
38 (p6) br.cond.dpnt .Lexit
39 br.cloop.dptk.few .Loop1
40
41 add r9=1,in1
42 ;;
43 .Lexit:
44 mov r8=r9
45 mov ar.lc=r16
46 br.ret.sptk.many rp
47 END(__strnlen_user)
48 EXPORT_SYMBOL(__strnlen_user)