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