1/*
2Copyright (c) 1990 The Regents of the University of California.
3All rights reserved.
4
5Redistribution and use in source and binary forms are permitted
6provided that the above copyright notice and this paragraph are
7duplicated in all such forms and that any documentation,
8and/or other materials related to such
9distribution and use acknowledge that the software was developed
10by the University of California, Berkeley.  The name of the
11University may not be used to endorse or promote products derived
12from this software without specific prior written permission.
13THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16 */
17	.file "strlen.S"
18
19	.section .text
20	.global _strlen
21	.type	 _strlen,@function
22_strlen:
23	movm [d2,d3,a2,a3],(sp)
24.Lend_of_prologue:
25	mov d0,a0
26	mov a0,a2
27#ifndef __OPTIMIZE_SIZE__
28	btst 3,d0
29	bne .L21
30	mov (a0),d0
31	mov -16843009,a1
32	mov a1,d1
33	add d0,d1
34	not d0
35	and d0,d1
36	mov -2139062144,d2
37	btst -2139062144,d1
38	bne .L21
39	setlb
40	inc4 a0
41	mov (a0),d0
42	mov a1,d1
43	add d0,d1
44	not d0
45	and d0,d1
46	and d2,d1
47	leq
48	jmp .L21
49#endif
50.L19:
51	inc a0
52.L21:
53	movbu (a0),d3
54	cmp 0,d3
55	bne .L19
56	sub a2,a0
57	mov a0,d0
58.Lepilogue:
59	ret [d2,d3,a2,a3],16
60.Lend_of_strlen:
61	.size	 _strlen, .Lend_of_strlen - _strlen
62
63	.section	.debug_frame,"",@progbits
64.Lstart_of_debug_frame:
65	# Common Information Entry (CIE)
66	.4byte	.Lend_of_CIE - .Lstart_of_CIE	# CIE Length
67.Lstart_of_CIE:
68	.4byte	 0xffffffff			# CIE Identifier Tag
69	.byte	 0x1				# CIE Version
70	.ascii   "\0"				# CIE Augmentation
71	.uleb128 0x1				# CIE Code Alignment Factor
72	.sleb128 -4				# CIE Data Alignment Factor
73	.byte	 0x32				# CIE RA Column
74	.byte	 0xc				# DW_CFA_def_cfa
75	.uleb128 0x9
76	.uleb128 0x0
77	.byte	 0xb2				# DW_CFA_offset, column 0x32
78	.uleb128 0x0
79	.align   2
80.Lend_of_CIE:
81
82	# Frame Description Entry (FDE)
83	.4byte	.Lend_of_FDE - .Lstart_of_FDE	# FDE Length
84.Lstart_of_FDE:
85	.4byte	 .Lstart_of_debug_frame		# FDE CIE offset
86	.4byte	 _strlen			# FDE initial location
87	.4byte	 .Lend_of_strlen - _strlen	# FDE address range
88	.byte	 0x4				# DW_CFA_advance_loc4
89	.4byte	 .Lend_of_prologue - _strlen
90	.byte	 0xe				# DW_CFA_def_cfa_offset
91	.uleb128 0x4
92	.byte	 0x87				# DW_CFA_offset, column 0x7
93	.uleb128 0x1
94	.align 2
95.Lend_of_FDE:
96