xref: /titanic_44/usr/src/common/crypto/md5/sparc/sun4v/byteswap.il (revision f2b7ce3eb6db75966c27b08fa312c3158f8dfabf)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License").  You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22/*
23 * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24 * Use is subject to license terms.
25 */
26
27/*
28 * byteswap.il -- definitions for .inline functions for little-endian loads.
29 *
30 * ident	"%Z%%M%	%I%	%E% SMI"
31 *
32 * right now, this file is only used on UltraSPARC architectures,
33 * which have a special address space identifier for loading 32 and 16 bit
34 * integers in little-endian byte order.
35 *
36 * note: apparently these files are not preprocessed, so we cannot
37 *       use `#pragma ident' or `ASI_PL'.
38 *
39 */
40
41	.inline load_little_32, 4
42        lduwa   [%o0]0x88, %o0
43        .end
44
45	.inline load_little_16, 4
46        lduha   [%o0]0x88, %o0
47        .end
48
49	.inline set_little,4
50	wr	%g0, %o0, %asi
51	.end
52
53	.inline get_little,0
54	rd	%asi, %o0
55	.end
56
57	.inline	load_little_32_0, 4
58	lduwa	[%o0]%asi, %o0
59	.end
60
61	.inline	load_little_32_1, 4
62	lduwa	[%o0 + 4]%asi, %o0
63	.end
64
65	.inline	load_little_32_2, 4
66	lduwa	[%o0 + 8]%asi, %o0
67	.end
68
69	.inline	load_little_32_3, 4
70	lduwa	[%o0 + 12]%asi, %o0
71	.end
72
73	.inline	load_little_32_4, 4
74	lduwa	[%o0 + 16]%asi, %o0
75	.end
76
77	.inline	load_little_32_5, 4
78	lduwa	[%o0 + 20]%asi, %o0
79	.end
80
81	.inline	load_little_32_6, 4
82	lduwa	[%o0 + 24]%asi, %o0
83	.end
84
85	.inline	load_little_32_7, 4
86	lduwa	[%o0 + 28]%asi, %o0
87	.end
88
89	.inline	load_little_32_8, 4
90	lduwa	[%o0 + 32]%asi, %o0
91	.end
92
93	.inline	load_little_32_9, 4
94	lduwa	[%o0 + 36]%asi, %o0
95	.end
96
97	.inline	load_little_32_a, 4
98	lduwa	[%o0 + 40]%asi, %o0
99	.end
100
101	.inline	load_little_32_b, 4
102	lduwa	[%o0 + 44]%asi, %o0
103	.end
104
105	.inline	load_little_32_c, 4
106	lduwa	[%o0 + 48]%asi, %o0
107	.end
108
109	.inline	load_little_32_d, 4
110	lduwa	[%o0 + 52]%asi, %o0
111	.end
112
113	.inline	load_little_32_e, 4
114	lduwa	[%o0 + 56]%asi, %o0
115	.end
116
117	.inline	load_little_32_f, 4
118	lduwa	[%o0 + 60]%asi, %o0
119	.end
120
121