Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | /* |
2 | * ========== Copyright Header Begin ========================================== | |
3 | * | |
4 | * OpenSPARC T2 Processor File: spc2_hboot_test.s | |
5 | * Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved | |
6 | * 4150 Network Circle, Santa Clara, California 95054, U.S.A. | |
7 | * | |
8 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
9 | * | |
10 | * This program is free software; you can redistribute it and/or modify | |
11 | * it under the terms of the GNU General Public License as published by | |
12 | * the Free Software Foundation; version 2 of the License. | |
13 | * | |
14 | * This program is distributed in the hope that it will be useful, | |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | * GNU General Public License for more details. | |
18 | * | |
19 | * You should have received a copy of the GNU General Public License | |
20 | * along with this program; if not, write to the Free Software | |
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
22 | * | |
23 | * For the avoidance of doubt, and except that if any non-GPL license | |
24 | * choice is available it will apply instead, Sun elects to use only | |
25 | * the General Public License version 2 (GPLv2) at this time for any | |
26 | * software where a choice of GPL license versions is made | |
27 | * available with the language indicating that GPLv2 or any later version | |
28 | * may be used, or where a choice of which version of the GPL is applied is | |
29 | * otherwise unspecified. | |
30 | * | |
31 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | |
32 | * CA 95054 USA or visit www.sun.com if you need additional information or | |
33 | * have any questions. | |
34 | * | |
35 | * | |
36 | * ========== Copyright Header End ============================================ | |
37 | */ | |
38 | #define MAIN_PAGE_HV_ALSO | |
39 | #include "hboot.s" | |
40 | ||
41 | /************************************************************************ | |
42 | Test case code start | |
43 | ************************************************************************/ | |
44 | ||
45 | .text | |
46 | .global main | |
47 | ||
48 | main: /* test begin */ | |
49 | ||
50 | ta T_CHANGE_HPRIV | |
51 | ||
52 | ldxa [%g0]0x63, %l1 | |
53 | tid2vtid(%l1) | |
54 | ||
55 | ta T_CHANGE_NONHPRIV | |
56 | rdth_id() | |
57 | ||
58 | !# Initialize registers .. | |
59 | ||
60 | !# Global registers | |
61 | set 0x5, %g1 | |
62 | set 0x9, %g2 | |
63 | set 0xC, %g3 | |
64 | set 0x7, %g4 | |
65 | set 0xB, %g5 | |
66 | set 0x3, %g6 | |
67 | set 0xA, %g7 | |
68 | !# Input registers | |
69 | set -0x4, %i0 | |
70 | set -0xA, %i1 | |
71 | set -0x5, %i2 | |
72 | set -0x9, %i3 | |
73 | set -0x0, %i4 | |
74 | set -0x6, %i5 | |
75 | set -0x0, %i6 | |
76 | set -0xC, %i7 | |
77 | !# Local registers | |
78 | set 0x6BC97FF6, %l0 | |
79 | set 0x58CD6641, %l1 | |
80 | set 0x7CCA8958, %l2 | |
81 | set 0x08A07B35, %l3 | |
82 | set 0x475FF3C1, %l4 | |
83 | set 0x22DB92D6, %l5 | |
84 | set 0x26538D1E, %l6 | |
85 | set 0x6CB6F74A, %l7 | |
86 | ||
87 | !# Execute some ALU ops .. | |
88 | ||
89 | addcc %o6, %i0, %o0 | |
90 | andcc %g3, 0x0EB, %o7 | |
91 | addccc %g4, %g5, %i3 | |
92 | and %l5, %g7, %l2 | |
93 | orncc %i1, 0x39A, %l0 | |
94 | sra %g0, 0x1, %l3 | |
95 | addcc %g1, 0x202, %o1 | |
96 | sll %l6, %g2, %i2 | |
97 | addc %l4, %o5, %i4 | |
98 | andn %o2, 0x3F1, %l7 | |
99 | subccc %i7, %i5, %g6 | |
100 | andn %l1, 0x327, %o3 | |
101 | srax %i6, 0x5, %o0 | |
102 | andn %i0, 0x2F0, %o6 | |
103 | addc %o4, 0x14E, %g3 | |
104 | xnorcc %g5, %g4, %l5 | |
105 | subc %i3, 0x0, %o7 | |
106 | subc %i1, 0xD, %l2 | |
107 | and %g7, %g1, %l3 | |
108 | sub %g0, 0x7, %g2 | |
109 | or %i2, %o1, %l4 | |
110 | and %o5, 0x173, %o2 | |
111 | subc %l7, %l0, %l6 | |
112 | add %g6, %i4, %i7 | |
113 | andn %l1, 0x276, %i5 | |
114 | orcc %i6, %o6, %o4 | |
115 | subccc %o3, %g3, %o0 | |
116 | sra %i0, 0x0, %g4 | |
117 | andn %o7, 0x0F6, %i1 | |
118 | xnorcc %l5, %l2, %i3 | |
119 | orcc %g7, 0x3AC, %l3 | |
120 | add %g5, 0x0D5, %i2 | |
121 | xnorcc %g0, 0x106, %g1 | |
122 | xnor %o1, 0x089, %l4 | |
123 | sll %g2, 0xE, %l0 | |
124 | srl %o2, 0x1, %l6 | |
125 | orncc %o5, 0x12E, %g6 | |
126 | and %l7, %i4, %i6 | |
127 | andcc %i5, %o6, %o3 | |
128 | xor %i7, %o4, %g3 | |
129 | subc %l1, %o7, %g4 | |
130 | subc %o0, 0x0, %i1 | |
131 | andncc %i0, 0x2D8, %i3 | |
132 | andn %g7, %l3, %l2 | |
133 | subccc %g0, 0x8, %g1 | |
134 | addcc %l5, %l4, %g2 | |
135 | srax %g5, 0x0, %i2 | |
136 | xorcc %o1, %o2, %g6 | |
137 | add %o5, 0x055, %i4 | |
138 | srlx %l6, 0xF, %l7 | |
139 | orncc %l0, 0x34B, %o3 | |
140 | xnor %i6, 0x313, %o6 | |
141 | subcc %o4, %l1, %o7 | |
142 | subcc %g4, %i7, %i1 | |
143 | subcc %i5, %o0, %i3 | |
144 | subc %l3, 0xB, %i0 | |
145 | srax %l2, 0x6, %g0 | |
146 | orn %l5, 0x27F, %g1 | |
147 | orcc %g7, 0x315, %g2 | |
148 | xnorcc %g3, %l4, %g5 | |
149 | orcc %o2, %i2, %i4 | |
150 | orncc %o5, %l7, %l6 | |
151 | orncc %o1, %l0, %o3 | |
152 | orn %o4, 0x0BE, %l1 | |
153 | sub %o6, %g6, %o7 | |
154 | xor %g4, %i6, %i1 | |
155 | xnorcc %i7, 0x171, %i5 | |
156 | xnorcc %o0, 0x0A5, %l2 | |
157 | sub %l3, %i0, %g0 | |
158 | addc %g1, 0x216, %g7 | |
159 | sub %i3, %l5, %g2 | |
160 | and %l4, %g5, %i4 | |
161 | sll %o5, %i2, %l6 | |
162 | subccc %l7, 0x5, %o1 | |
163 | subc %g3, %l0, %o3 | |
164 | subc %o6, 0xB, %o4 | |
165 | orcc %o2, %g6, %l1 | |
166 | addcc %i6, %o7, %i1 | |
167 | and %i7, 0x11C, %l2 | |
168 | addc %o0, 0x3DF, %i5 | |
169 | addc %g0, %g4, %g1 | |
170 | xorcc %l3, 0x00B, %i3 | |
171 | andn %g2, 0x363, %i0 | |
172 | srlx %g7, %i4, %g5 | |
173 | xor %l4, 0x3E5, %i2 | |
174 | subccc %o5, 0x6, %l5 | |
175 | andncc %l7, 0x287, %l0 | |
176 | sra %g3, 0x6, %o6 | |
177 | andn %o1, 0x2E5, %o3 | |
178 | subc %l6, 0x0, %o2 | |
179 | sllx %i6, 0x0, %o7 | |
180 | srlx %i1, %i7, %g6 | |
181 | orncc %l1, 0x252, %o4 | |
182 | and %g0, %o0, %g4 | |
183 | xorcc %i5, 0x19F, %l2 | |
184 | xor %g2, %i0, %g7 | |
185 | add %l3, 0x13C, %g5 | |
186 | sub %g1, 0x2, %i3 | |
187 | and %i4, 0x1FD, %o5 | |
188 | orn %i2, 0x369, %l0 | |
189 | or %l5, %g3, %o6 | |
190 | xnorcc %l4, 0x19C, %l6 | |
191 | subcc %o2, %o3, %l7 | |
192 | addcc %o7, %i6, %i1 | |
193 | xorcc %o1, 0x17F, %o4 | |
194 | orn %i7, 0x39D, %l1 | |
195 | sub %o0, 0x9, %g0 | |
196 | srl %l2, 0x5, %i5 | |
197 | xnorcc %g6, %g7, %g4 | |
198 | or %g2, 0x236, %g5 | |
199 | andncc %i3, 0x2FC, %i4 | |
200 | subc %o5, 0x2, %l3 | |
201 | and %g1, 0x167, %i0 | |
202 | addccc %l5, 0x33D, %g3 | |
203 | subccc %o6, 0xE, %i2 | |
204 | andncc %o2, 0x302, %o3 | |
205 | srlx %l0, 0x8, %l4 | |
206 | and %l7, %i6, %l6 | |
207 | and %o7, 0x3B1, %i1 | |
208 | srl %o1, 0x1, %o0 | |
209 | addccc %o4, %l1, %l2 | |
210 | andncc %i5, %g0, %g7 | |
211 | sll %g6, %i7, %i3 | |
212 | srlx %i4, %g4, %g5 | |
213 | orn %o5, 0x3DF, %l3 | |
214 | subccc %g1, 0x2, %g2 | |
215 | xnor %i0, %g3, %o6 | |
216 | orcc %i2, 0x2F7, %o3 | |
217 | orncc %l0, 0x3BE, %l7 | |
218 | addc %o2, 0x2B6, %l4 | |
219 | srlx %l5, 0xD, %o7 | |
220 | subccc %o1, 0x9, %i1 | |
221 | orn %i6, 0x2BB, %o4 | |
222 | srax %l1, 0x2, %i5 | |
223 | subc %o0, 0xF, %l2 | |
224 | addcc %g6, %g0, %l6 | |
225 | srlx %i7, %i4, %i3 | |
226 | and %g4, %g7, %o5 | |
227 | subccc %g5, 0xF, %g2 | |
228 | xnor %g3, %o6, %i0 | |
229 | subc %l3, 0x4, %l0 | |
230 | addccc %o3, 0x179, %g1 | |
231 | addcc %i2, 0x0CC, %o2 | |
232 | xor %l7, 0x2FB, %l5 | |
233 | srax %i1, 0xA, %o7 | |
234 | xnorcc %o1, 0x2DB, %l4 | |
235 | add %o4, 0x07D, %i6 | |
236 | andcc %i5, %o0, %l2 | |
237 | sllx %l6, %l1, %i7 | |
238 | srlx %i4, 0xB, %g6 | |
239 | srax %g7, %o5, %g0 | |
240 | xorcc %g2, 0x38B, %g4 | |
241 | xor %g5, 0x34A, %i0 | |
242 | orncc %g3, 0x252, %l0 | |
243 | subc %l3, 0x6, %o3 | |
244 | xor %i2, 0x055, %i3 | |
245 | srl %o6, %l5, %g1 | |
246 | orcc %i1, %o1, %l7 | |
247 | addc %l4, %o4, %o2 | |
248 | addccc %i6, 0x206, %o0 | |
249 | xor %o7, 0x240, %i5 | |
250 | orncc %l2, 0x235, %i7 | |
251 | orcc %i4, 0x1D5, %l1 | |
252 | xor %i4, %o4, %g3 | |
253 | addcc %l6, 0x22F, %l3 | |
254 | orncc %i1, %i0, %l0 | |
255 | subc %l1, 0x0, %o3 | |
256 | andn %g1, 0x0CB, %g7 | |
257 | orncc %g6, %i2, %o7 | |
258 | xor %g2, %i6, %o2 | |
259 | srax %i7, %i0, %l1 | |
260 | sllx %i1, 0x5, %l0 | |
261 | andcc %o0, %g5, %l7 | |
262 | orcc %o4, %o3, %g3 | |
263 | or %o6, 0x0CC, %g0 | |
264 | subc %l4, 0x3, %g1 | |
265 | orcc %l2, 0x193, %g7 | |
266 | or %i3, 0x064, %g4 | |
267 | EXIT_GOOD /* test finish */ | |
268 | ||
269 | /************************************************************************ | |
270 | Test case data start | |
271 | ************************************************************************/ | |
272 | .data | |
273 | ||
274 | user_data_start: | |
275 | .word 0xD6B3479D | |
276 | .word 0xDB28926C | |
277 | .end | |
278 | ||
279 | #include "err_handlers.s" | |
280 |