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