First version committed to git
[zpugcc/jano.git] / toolchain / gcc / newlib / libc / machine / mn10300 / strlen.S
blob91e88dd7368f0ddd7f191c58b5e3e96aa605a4fd
1         .file "strlen.S"
3         .section .text
4         .global _strlen
5         .type    _strlen,@function
6 _strlen:
7         movm [d2,d3,a2,a3],(sp)
8         mov d0,a0
9         mov a0,a2
10 #ifndef __OPTIMIZE_SIZE__
11         btst 3,d0
12         bne .L21
13         mov (a0),d0
14         mov -16843009,a1
15         mov a1,d1
16         add d0,d1
17         not d0
18         and d0,d1
19         mov -2139062144,d2
20         btst -2139062144,d1
21         bne .L21
22 .L15:
23         setlb
24         inc4 a0
25         mov (a0),d0
26         mov a1,d1
27         add d0,d1
28         not d0
29         and d0,d1
30         and d2,d1
31         leq
32         jmp .L21
33 #endif
34 .L19:
35         inc a0
36 .L21:
37         movbu (a0),d3
38         cmp 0,d3
39         bne .L19
40         sub a2,a0
41         mov a0,d0
42         ret [d2,d3,a2,a3],16
43 .Lfe1:
44         .size    _strlen,.Lfe1-_strlen