1/*	$OpenBSD: test.S,v 1.1 2003/07/12 04:08:33 jason Exp $	*/
2
3/*
4 * Copyright (c) 2003 Jason L. Wright (jason@thought.net)
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 *    notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 *    notice, this list of conditions and the following disclaimer in the
14 *    documentation and/or other materials provided with the distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
20 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
25 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#include <machine/asm.h>
30#include <machine/trap.h>
31#include <machine/frame.h>
32
33ENTRY(test_ldq_f2_simm13)
34	.word 0xc5122000	! ldq [%o0 + 0], %f2
35	retl
36	nop
37
38ENTRY(test_ldq_f2_g0)
39	.word 0xc5120000	! ldq [%o0 + %g0], %f2
40	retl
41	nop
42
43ENTRY(test_stq_f2_simm13)
44	.word 0xc5322000	! stq %f2, [%o0 + 0]
45	retl
46	nop
47
48ENTRY(test_stq_f2_g0)
49	.word 0xc5320000	! stq %f2, [%o0 + %g0]
50	retl
51	nop
52
53ENTRY(test_ldq_f6_simm13)
54	.word 0xcd122000	! ldq [%o0 + 0], %f6
55	retl
56	nop
57
58ENTRY(test_ldq_f6_g0)
59	.word 0xcd120000	! ldq [%o0 + %g0], %f6
60	retl
61	nop
62
63ENTRY(test_stq_f6_simm13)
64	.word 0xcd322000	! stq %f6, [%o0 + 0]
65	retl
66	nop
67
68ENTRY(test_stq_f6_g0)
69	.word 0xcd320000	! stq %f6, [%o0 + %g0]
70	retl
71	nop
72
73ENTRY(test_ldq_f10_simm13)
74	.word 0xd5122000	! ldq [%o0 + 0], %f10
75	retl
76	nop
77
78ENTRY(test_ldq_f10_g0)
79	.word 0xd5120000	! ldq [%o0 + %g0], %f10
80	retl
81	nop
82
83ENTRY(test_stq_f10_simm13)
84	.word 0xd5322000	! stq %f10, [%o0 + 0]
85	retl
86	nop
87
88ENTRY(test_stq_f10_g0)
89	.word 0xd5320000	! stq %f10, [%o0 + %g0]
90	retl
91	nop
92
93ENTRY(test_ldq_f14_simm13)
94	.word 0xdd122000	! ldq [%o0 + 0], %f14
95	retl
96	nop
97
98ENTRY(test_ldq_f14_g0)
99	.word 0xdd120000	! ldq [%o0 + %g0], %f14
100	retl
101	nop
102
103ENTRY(test_stq_f14_simm13)
104	.word 0xdd322000	! stq %f14, [%o0 + 0]
105	retl
106	nop
107
108ENTRY(test_stq_f14_g0)
109	.word 0xdd320000	! stq %f14, [%o0 + %g0]
110	retl
111	nop
112
113ENTRY(test_ldq_f18_simm13)
114	.word 0xe5122000	! ldq [%o0 + 0], %f18
115	retl
116	nop
117
118ENTRY(test_ldq_f18_g0)
119	.word 0xe5120000	! ldq [%o0 + %g0], %f18
120	retl
121	nop
122
123ENTRY(test_stq_f18_simm13)
124	.word 0xe5322000	! stq %f18, [%o0 + 0]
125	retl
126	nop
127
128ENTRY(test_stq_f18_g0)
129	.word 0xe5320000	! stq %f18, [%o0 + %g0]
130	retl
131	nop
132
133ENTRY(test_ldq_f22_simm13)
134	.word 0xed122000	! ldq [%o0 + 0], %f22
135	retl
136	nop
137
138ENTRY(test_ldq_f22_g0)
139	.word 0xed120000	! ldq [%o0 + %g0], %f22
140	retl
141	nop
142
143ENTRY(test_stq_f22_simm13)
144	.word 0xed322000	! stq %f22, [%o0 + 0]
145	retl
146	nop
147
148ENTRY(test_stq_f22_g0)
149	.word 0xed320000	! stq %f22, [%o0 + %g0]
150	retl
151	nop
152
153ENTRY(test_ldq_f26_simm13)
154	.word 0xf5122000	! ldq [%o0 + 0], %f26
155	retl
156	nop
157
158ENTRY(test_ldq_f26_g0)
159	.word 0xf5120000	! ldq [%o0 + %g0], %f26
160	retl
161	nop
162
163ENTRY(test_stq_f26_simm13)
164	.word 0xf5322000	! stq %f26, [%o0 + 0]
165	retl
166	nop
167
168ENTRY(test_stq_f26_g0)
169	.word 0xf5320000	! stq %f26, [%o0 + %g0]
170	retl
171	nop
172
173ENTRY(test_ldq_f30_simm13)
174	.word 0xfd122000	! ldq [%o0 + 0], %f30
175	retl
176	nop
177
178ENTRY(test_ldq_f30_g0)
179	.word 0xfd120000	! ldq [%o0 + %g0], %f30
180	retl
181	nop
182
183ENTRY(test_stq_f30_simm13)
184	.word 0xfd322000	! stq %f30, [%o0 + 0]
185	retl
186	nop
187
188ENTRY(test_stq_f30_g0)
189	.word 0xfd320000	! stq %f30, [%o0 + %g0]
190	retl
191	nop
192
193ENTRY(test_ldq_f34_simm13)
194	.word 0xc7122000	! ldq [%o0 + 0], %f34
195	retl
196	nop
197
198ENTRY(test_ldq_f34_g0)
199	.word 0xc7120000	! ldq [%o0 + %g0], %f34
200	retl
201	nop
202
203ENTRY(test_stq_f34_simm13)
204	.word 0xc7322000	! stq %f34, [%o0 + 0]
205	retl
206	nop
207
208ENTRY(test_stq_f34_g0)
209	.word 0xc7320000	! stq %f34, [%o0 + %g0]
210	retl
211	nop
212
213ENTRY(test_ldq_f38_simm13)
214	.word 0xcf122000	! ldq [%o0 + 0], %f38
215	retl
216	nop
217
218ENTRY(test_ldq_f38_g0)
219	.word 0xcf120000	! ldq [%o0 + %g0], %f38
220	retl
221	nop
222
223ENTRY(test_stq_f38_simm13)
224	.word 0xcf322000	! stq %f38, [%o0 + 0]
225	retl
226	nop
227
228ENTRY(test_stq_f38_g0)
229	.word 0xcf320000	! stq %f38, [%o0 + %g0]
230	retl
231	nop
232
233ENTRY(test_ldq_f42_simm13)
234	.word 0xd7122000	! ldq [%o0 + 0], %f42
235	retl
236	nop
237
238ENTRY(test_ldq_f42_g0)
239	.word 0xd7120000	! ldq [%o0 + %g0], %f42
240	retl
241	nop
242
243ENTRY(test_stq_f42_simm13)
244	.word 0xd7322000	! stq %f42, [%o0 + 0]
245	retl
246	nop
247
248ENTRY(test_stq_f42_g0)
249	.word 0xd7320000	! stq %f42, [%o0 + %g0]
250	retl
251	nop
252
253ENTRY(test_ldq_f46_simm13)
254	.word 0xdf122000	! ldq [%o0 + 0], %f46
255	retl
256	nop
257
258ENTRY(test_ldq_f46_g0)
259	.word 0xdf120000	! ldq [%o0 + %g0], %f46
260	retl
261	nop
262
263ENTRY(test_stq_f46_simm13)
264	.word 0xdf322000	! stq %f46, [%o0 + 0]
265	retl
266	nop
267
268ENTRY(test_stq_f46_g0)
269	.word 0xdf320000	! stq %f46, [%o0 + %g0]
270	retl
271	nop
272
273ENTRY(test_ldq_f50_simm13)
274	.word 0xe7122000	! ldq [%o0 + 0], %f50
275	retl
276	nop
277
278ENTRY(test_ldq_f50_g0)
279	.word 0xe7120000	! ldq [%o0 + %g0], %f50
280	retl
281	nop
282
283ENTRY(test_stq_f50_simm13)
284	.word 0xe7322000	! stq %f50, [%o0 + 0]
285	retl
286	nop
287
288ENTRY(test_stq_f50_g0)
289	.word 0xe7320000	! stq %f50, [%o0 + %g0]
290	retl
291	nop
292
293ENTRY(test_ldq_f54_simm13)
294	.word 0xef122000	! ldq [%o0 + 0], %f54
295	retl
296	nop
297
298ENTRY(test_ldq_f54_g0)
299	.word 0xef120000	! ldq [%o0 + %g0], %f54
300	retl
301	nop
302
303ENTRY(test_stq_f54_simm13)
304	.word 0xef322000	! stq %f54, [%o0 + 0]
305	retl
306	nop
307
308ENTRY(test_stq_f54_g0)
309	.word 0xef320000	! stq %f54, [%o0 + %g0]
310	retl
311	nop
312
313ENTRY(test_ldq_f58_simm13)
314	.word 0xf7122000	! ldq [%o0 + 0], %f58
315	retl
316	nop
317
318ENTRY(test_ldq_f58_g0)
319	.word 0xf7120000	! ldq [%o0 + %g0], %f58
320	retl
321	nop
322
323ENTRY(test_stq_f58_simm13)
324	.word 0xf7322000	! stq %f58, [%o0 + 0]
325	retl
326	nop
327
328ENTRY(test_stq_f58_g0)
329	.word 0xf7320000	! stq %f58, [%o0 + %g0]
330	retl
331	nop
332
333ENTRY(test_ldq_f62_simm13)
334	.word 0xff122000	! ldq [%o0 + 0], %f62
335	retl
336	nop
337
338ENTRY(test_ldq_f62_g0)
339	.word 0xff120000	! ldq [%o0 + %g0], %f62
340	retl
341	nop
342
343ENTRY(test_stq_f62_simm13)
344	.word 0xff322000	! stq %f62, [%o0 + 0]
345	retl
346	nop
347
348ENTRY(test_stq_f62_g0)
349	.word 0xff320000	! stq %f62, [%o0 + %g0]
350	retl
351	nop
352