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#include <picolibc.h>
18
19	.file "strcpy.S"
20
21	.section .text
22	.global _strcpy
23	.type	 _strcpy,@function
24_strcpy:
25	movm [d2,d3,a2,a3],(sp)
26.Lend_of_prologue:
27	mov d0,d3
28	mov d1,a0
29	mov d3,a1
30	mov a0,d0
31#ifndef __OPTIMIZE_SIZE__
32	or d3,d0
33	btst 3,d0
34	bne .L2
35	mov (a0),d0
36	mov -16843009,a2
37	mov a2,d1
38	add d0,d1
39	not d0
40	and d0,d1
41	mov -2139062144,d2
42	btst -2139062144,d1
43	bne .L2
44	setlb
45	mov (a0),d0
46	mov d0,(a1)
47	inc4 a0
48	inc4 a1
49	mov (a0),d0
50	mov a2,d1
51	add d0,d1
52	not d0
53	and d0,d1
54	and d2,d1
55	leq
56.L2:
57#endif
58	setlb
59	movbu (a0),d0
60	movbu d0,(a1)
61	inc a0
62	inc a1
63	cmp 0,d0
64	lne
65	mov d3,a0
66.Lepilogue:
67	ret [d2,d3,a2,a3],16
68.Lend_of_strcpy:
69	.size	 _strcpy, .Lend_of_strcpy - _strcpy
70
71	.section	.debug_frame,"",@progbits
72.Lstart_of_debug_frame:
73	# Common Information Entry (CIE)
74	.4byte	.Lend_of_CIE - .Lstart_of_CIE	# CIE Length
75.Lstart_of_CIE:
76	.4byte	 0xffffffff			# CIE Identifier Tag
77	.byte	 0x1				# CIE Version
78	.ascii   "\0"				# CIE Augmentation
79	.uleb128 0x1				# CIE Code Alignment Factor
80	.sleb128 -4				# CIE Data Alignment Factor
81	.byte	 0x32				# CIE RA Column
82	.byte	 0xc				# DW_CFA_def_cfa
83	.uleb128 0x9
84	.uleb128 0x0
85	.byte	 0xb2				# DW_CFA_offset, column 0x32
86	.uleb128 0x0
87	.align   2
88.Lend_of_CIE:
89
90	# Frame Description Entry (FDE)
91	.4byte	.Lend_of_FDE - .Lstart_of_FDE	# FDE Length
92.Lstart_of_FDE:
93	.4byte	 .Lstart_of_debug_frame		# FDE CIE offset
94	.4byte	 _strcpy			# FDE initial location
95	.4byte	 .Lend_of_strcpy - _strcpy	# FDE address range
96	.byte	 0x4				# DW_CFA_advance_loc4
97	.4byte	 .Lend_of_prologue - _strcpy
98	.byte	 0xe				# DW_CFA_def_cfa_offset
99	.uleb128 0x4
100	.byte	 0x87				# DW_CFA_offset, column 0x7
101	.uleb128 0x1
102	.align 2
103.Lend_of_FDE:
104