Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / diag / assembly / exu / fp_muldiv0_a_n2.s
CommitLineData
86530b38
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: fp_muldiv0_a_n2.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 H_T0_Fp_exception_ieee_754_0x21 T0_Fp_exception_ieee_754
39#define H_T0_Fp_exception_other_0x22 T0_Fp_exception_other
40
41#define H_HT0_Illegal_instruction_0x10 T0_Fp_unimplemented
42
43#define ENABLE_T0_Fp_disabled_0x20
44
45#define MAIN_PAGE_HV_ALSO
46#define MAIN_PAGE_NUCLEUS_ALSO
47
48#include "hboot.s"
49
50.global sam_fast_immu_miss
51.global sam_fast_dmmu_miss
52
53.text
54.global main
55
56main:
57
58 wr %g0, 0x4, %fprs /* make sure fef is 1 */
59
60 setx fsr_tem_en, %l0, %l3 ! fsr tem enable value
61
62/*******************************************************
63 * Simple data
64 *******************************************************/
65
66 ! By default, mask is disabled
67
68 ld [%l3+0x0], %fsr ! Read it from memory - trap disabled
69
70/* Basic fp add and sub */
71
72 ! ones and 0s
73
74 setx data1, %l0, %l2 ! Some data
75
76 ld [%l2+0x0], %f0 ! 1.0
77 ld [%l2+0x4], %f2 ! 0.0
78 ld [%l2+0x8], %f4 ! -1.0
79 ld [%l2+0xc], %f6 ! -0.0
80
81 fmuls %f0, %f0, %f1
82 fmuls %f0, %f2, %f3
83 fmuls %f0, %f4, %f5
84 fmuls %f0, %f6, %f10
85 fsmuld %f0, %f0, %f10
86 fsmuld %f0, %f2, %f10
87 fsmuld %f0, %f4, %f10
88 fsmuld %f0, %f6, %f10
89 fdivs %f0, %f0, %f12
90 fdivs %f0, %f2, %f14
91 fdivs %f0, %f3, %f16
92 fdivs %f0, %f6, %f18
93 fdivs %f2, %f0, %f20
94 fdivs %f2, %f4, %f22
95 fdivs %f2, %f6, %f24
96 fdivs %f4, %f0, %f26
97 fdivs %f4, %f2, %f28
98 fdivs %f4, %f6, %f30
99 fdivs %f6, %f0, %f27
100 fdivs %f6, %f2, %f29
101 fdivs %f6, %f4, %f31
102
103 setx ddata1, %l0, %l2 ! Double precision boundaries
104
105 ldd [%l2+0x0], %f0 ! 1.0
106 ldd [%l2+0x8], %f2 ! 0.0
107 ldd [%l2+0x10], %f4 ! -1.0
108 ldd [%l2+0x18], %f6 ! -0.0
109
110 fmuld %f0, %f0, %f32
111 fmuld %f0, %f2, %f34
112 fmuld %f0, %f4, %f36
113 fmuld %f0, %f6, %f10
114 fdivd %f0, %f0, %f12
115 fdivd %f0, %f2, %f14
116 fdivd %f0, %f4, %f16
117 fdivd %f0, %f6, %f18
118 fdivd %f2, %f0, %f20
119 fdivd %f2, %f4, %f22
120 fdivd %f2, %f6, %f24
121 fdivd %f4, %f0, %f26
122 fdivd %f4, %f2, %f28
123 fdivd %f4, %f6, %f30
124 fdivd %f6, %f0, %f38
125 fdivd %f6, %f2, %f40
126 fdivd %f6, %f4, %f42
127
128 fmulq %f0, %f0, %f0 ! This should cause - unimplemented fpop
129 fdmulq %f0, %f0, %f0 ! This should cause - unimplemented fpop
130 fdivq %f0, %f0, %f0
131
132 ! -ve OF
133
134 setx sp_n_u_normal, %l0, %l4 ! Largest -ve normal number
135 setx sp_p_u_normal, %l0, %l6 ! Largest +ve normal number
136
137 ld [%l4+0x0], %f0 !
138 ld [%l6+0x0], %f4 !
139 fdivs %f0, %f4, %f6 ! Should result in negative overflow
140
141 ! +ve UF (Not successful in generating UF) (??)
142
143 setx sp_p_denormal_0, %l0, %l4 ! Small +ve normal number
144 setx sp_p_l_denormal, %l0, %l6 ! Smallest +ve normal number
145
146 ld [%l4+0x0], %f0 !
147 ld [%l6+0x0], %f4 !
148 fdivs %f4, %f0, %f8 ! Should result in negative underflow
149
150 ! Go thru normals and denormals - only adjacent mul/div
151
152 setx data1_denorm, %l0, %l4 ! sp
153 setx ddata1_denorm, %l0, %l6 ! dp
154
155 set 0x4, %g6 ! Max loop count rd
156 set 0x30, %g1 ! Max loop count
157
158 set 0x0, %g7 ! loop iterator
159
160 fmuldiv_rd_loop0: ! Rounding mode loop
161
162 sll %g7, 0x2, %g5 ! Align address
163 ld [%l3+%g5], %fsr ! Read it from memory - trap disabled
164
165 set 0x0, %g2 ! inner loop iterator
166
167 fmuldiv_loop0:
168
169 sll %g2, 0x2, %g3 ! Align address
170 sll %g2, 0x3, %g4 ! Align address
171
172 ld [%l4+%g3], %f0 ! single precision
173 ldd [%l6+%g4], %f2 ! double precision
174
175 add %g3, 0x4, %g3
176 add %g4, 0x8, %g4
177
178 ld [%l4+%g3], %f4 ! single precision
179 ldd [%l6+%g4], %f6 ! double precision
180
181 fmuls %f0, %f4, %f10
182 fmuls %f4, %f0, %f12
183 fsmuld %f0, %f4, %f18
184 fsmuld %f4, %f0, %f20
185 fdivs %f0, %f4, %f14
186 fdivs %f4, %f0, %f16
187
188 fmuld %f2, %f6, %f20
189 fmuld %f6, %f2, %f22
190 fdivd %f2, %f6, %f24
191 fdivd %f6, %f2, %f26
192
193 add %g2, 0x1, %g2
194 subcc %g2, %g1, %g0
195
196 bne,a fmuldiv_loop0 ! If not 0, go to test more
197 nop
198
199 add %g7, 0x1, %g7
200 subcc %g7, %g6, %g0
201
202 bne,a fmuldiv_rd_loop0 ! If not 0, go to test more
203 nop
204
205
206
207
208/*******************************************************
209 * Exit code
210 *******************************************************/
211
212test_pass:
213 ta T_GOOD_TRAP
214
215test_fail:
216 ta T_BAD_TRAP
217
218
219
220/*******************************************************
221 * Data section
222 *******************************************************/
223
224.data
225
226data0:
227sp_n_u_quiet_nan:
228 .word 0xffffffff ! -NaN (Quiet) (S = 1, E = 255, F > 0) 00
229sp_n_l_quiet_nan:
230 .word 0xffc00001 ! -NaN (Quiet) (S = 1, E = 255, F > 0) 04
231sp_n_ind_nan:
232 .word 0xffc00000 ! -NaN (Indeterminate) (S = 1, E = 255, F > 0) 08
233sp_n_u_signaling_nan:
234 .word 0xffbfffff ! -NaN (Signaling) (S = 1, E = 255, F > 0) 0c
235sp_n_l_signaling_nan:
236 .word 0xff800001 ! -NaN (Signaling) (S = 1, E = 255, F > 0) 10
237sp_n_inf:
238 .word 0xff800000 ! -ve Infinity (ovf) (S = 1, E = 255, F = 0) 14
239sp_n_u_normal:
240 .word 0xff7fffff ! -ve normalized (S = 1, 0 < E < 255) 18
241sp_n_l_normal:
242 .word 0x80800000 ! -ve normalized (S = 1, 0 < E < 255) 1c
243sp_n_u_denormal:
244 .word 0x807fffff ! -ve denormalized (S = 1, E=0, F is non-zero) 20
245sp_n_l_denormal:
246 .word 0x80000001 ! -ve denormalized (S = 1, E=0, F is non-zero) 24
247sp_n_uf:
248 .word 0x80000000 ! -ve Underflow (S = 1, E=0, F = 0) 28
249sp_n_0:
250 .word 0x80000000 ! -ve 0 (S = 1, E=0, F = 0) 2c
251sp_p_0:
252 .word 0x00000000 ! +ve 0 (S = 0, E=0, F = 0) 30
253sp_p_uf:
254 .word 0x00000000 ! +ve Underflow (S = 0, E=0, F = 0) 34
255sp_p_l_denormal:
256 .word 0x00000001 ! +ve denormalized (S = 0, E=0, F is non-zero) 38
257sp_p_u_denormal:
258 .word 0x007fffff ! +ve denormalized (S = 0, E=0, F is non-zero) 3c
259sp_p_l_normal:
260 .word 0x00800000 ! +ve normalized (S = 0, 0 < E < 255) 40
261sp_p_u_normal:
262 .word 0x7f7fffff ! +ve normalized (S = 0, 0 < E < 255) 44
263sp_p_inf:
264 .word 0x7f800000 ! +ve Infinity (ovf) (S = 0, E = 255, F = 0) 48
265sp_p_l_signaling_nan:
266 .word 0x7f800001 ! +NaN (Signaling) (S = 0, E = 255, F > 0) 4c
267sp_p_u_signaling_nan:
268 .word 0x7fbfffff ! +NaN (Signaling) (S = 0, E = 255, F > 0) 50
269sp_p_l_quiet_nan:
270 .word 0x7fc00000 ! +NaN (Quiet) (S = 0, E = 255, F > 0) 54
271sp_p_u_quiet_nan:
272 .word 0x7fffffff ! +NaN (Quiet) (S = 0, E = 255, F > 0) 5c
273
274sp_n_quiet_nan_0:
275 .word 0xffefffff ! -NaN (Quiet) (S = 1, E = 255, F > 0) 00
276sp_n_quiet_nan_1:
277 .word 0xffc00002 ! -NaN (Quiet) (S = 1, E = 255, F > 0) 00
278sp_p_quiet_nan_0:
279 .word 0x7fefffff ! -NaN (Quiet) (S = 1, E = 255, F > 0) 00
280sp_p_quiet_nan_1:
281 .word 0x7fc00002 ! -NaN (Quiet) (S = 1, E = 255, F > 0) 00
282
283sp_n_signaling_nan_0:
284 .word 0xffa00000 ! -NaN (Signaling) (S = 1, E = 255, F > 0) 0c
285sp_p_signaling_nan_0:
286 .word 0x7fa00000 ! -NaN (Signaling) (S = 1, E = 255, F > 0) 0c
287
288sp_p_normal_0:
289 .word 0x00800001 ! +ve normalized (S = 0, 0 < E < 255) 40
290sp_p_denormal_0:
291 .word 0x00000002 ! +ve denormalized (S = 0, E=0, F is non-zero) 38
292
293.align 256
294
295ddata0:
296dp_n_u_quiet_nan:
297 .xword 0xffffffffffffffff ! -NaN (Quiet) (S = 1, E = 2047, F > 0) 00
298dp_n_l_quiet_nan:
299 .xword 0xfff8000000000001 ! -NaN (Quiet) (S = 1, E = 2047, F > 0) 04
300dp_n_ind_nan:
301 .xword 0xfff8000000000000 ! -NaN (Indeterminate) (S = 1, E = 2047, F > 0) 08
302dp_n_u_signaling_nan:
303 .xword 0xfff7ffffffffffff ! -NaN (Signaling) (S = 1, E = 2047, F > 0) 0c
304dp_n_l_signaling_nan:
305 .xword 0xfff0000000000001 ! -NaN (Signaling) (S = 1, E = 2047, F > 0) 10
306dp_n_inf:
307 .xword 0xfff0000000000000 ! -ve Infinity (ovf) (S = 1, E = 2047, F = 0) 14
308dp_n_u_normal:
309 .xword 0xffefffffffffffff ! -ve normalized (S = 1, 0 < E < 2047) 18
310dp_n_l_normal:
311 .xword 0x8010000000000000 ! -ve normalized (S = 1, 0 < E < 2047) 1c
312dp_n_u_denormal:
313 .xword 0x800fffffffffffff ! -ve denormalized (S = 1, E=0, F is non-zero) 20
314dp_n_l_denormal:
315 .xword 0x8000000000000001 ! -ve denormalized (S = 1, E=0, F is non-zero) 24
316dp_n_uf:
317 .xword 0x8000000000000000 ! -ve Underflow (S = 1, E=0, F = 0) 28
318dp_n_0:
319 .xword 0x8000000000000000 ! -ve 0 (S = 1, E=0, F = 0) 2c
320dp_p_0:
321 .xword 0x0000000000000000 ! +ve 0 (S = 0, E=0, F = 0) 30
322dp_p_uf:
323 .xword 0x0000000000000000 ! +ve Underflow (S = 0, E=0, F = 0) 34
324dp_p_l_denormal:
325 .xword 0x0000000000000001 ! +ve denormalized (S = 0, E=0, F is non-zero) 38
326dp_p_u_denormal:
327 .xword 0x000fffffffffffff ! +ve denormalized (S = 0, E=0, F is non-zero) 3c
328dp_p_l_normal:
329 .xword 0x0010000000000000 ! +ve normalized (S = 0, 0 < E < 2047) 40
330dp_p_u_normal:
331 .xword 0x7fefffffffffffff ! +ve normalized (S = 0, 0 < E < 2047) 44
332dp_p_inf:
333 .xword 0x7ff0000000000000 ! +ve Infinity (ovf) (S = 0, E = 2047, F = 0) 48
334dp_p_l_signaling_nan:
335 .xword 0x7ff0000000000001 ! +NaN (Signaling) (S = 0, E = 2047, F > 0) 4c
336dp_p_u_signaling_nan:
337 .xword 0x7ff7ffffffffffff ! +NaN (Signaling) (S = 0, E = 2047, F > 0) 50
338dp_p_l_quiet_nan:
339 .xword 0x7ff8000000000000 ! +NaN (Quiet) (S = 0, E = 2047, F > 0) 54
340dp_p_u_quiet_nan:
341 .xword 0x7fffffffffffffff ! +NaN (Quiet) (S = 0, E = 2047, F > 0) 5c
342
343dp_n_quiet_nan_0:
344 .xword 0xfffeffffffffffff ! -NaN (Quiet) (S = 1, E = 255, F > 0) 00
345dp_n_quiet_nan_1:
346 .xword 0xfff8000000000002 ! -NaN (Quiet) (S = 1, E = 255, F > 0) 00
347dp_p_quiet_nan_0:
348 .xword 0x7ffeffffffffffff ! -NaN (Quiet) (S = 1, E = 255, F > 0) 00
349dp_p_quiet_nan_1:
350 .xword 0x7ff8000000000002 ! -NaN (Quiet) (S = 1, E = 255, F > 0) 00
351
352dp_n_signaling_nan_0:
353 .xword 0xfff4000000000000 ! -NaN (Signaling) (S = 1, E = 255, F > 0) 0c
354dp_p_signaling_nan_0:
355 .xword 0x7ff4000000000000 ! -NaN (Signaling) (S = 1, E = 255, F > 0) 0c
356
357.align 256
358
359data1:
360 .word 0x3f800000 ! 1.0 0x0
361 .word 0x00000000 ! 0.0 0x4
362 .word 0xbf800000 ! -1.0 0x8
363 .word 0x80000000 ! -0.0 0xc
364
365 .word 0x4f000000 ! Large positive number should cause NV on conversion 0x10
366 .word 0xcf000000 ! Large negative number should cause NV on conversion 0x14
367
368 .word 0x5f0ac723 ! Large positive number should cause NV on conversion 0x18
369 .word 0xdf0ac723 ! Large negative number should cause NV on conversion 0x1c
370
371data1_denorm:
372
373 .word 0x807fffff ! Denormal number -ve
374 .word 0x80700000 ! Denormal number -ve
375 .word 0x803fffff ! Denormal number -ve
376 .word 0x80400000 ! Denormal number -ve
377 .word 0x80400001 ! Denormal number -ve
378 .word 0x80000001 ! Denormal number -ve
379 .word 0x80000001 ! Denormal number -ve
380 .word 0x007fffff ! Denormal number +ve
381 .word 0x007fffff ! Denormal number +ve
382 .word 0x00700000 ! Denormal number +ve
383 .word 0x003fffff ! Denormal number +ve
384 .word 0x00400000 ! Denormal number +ve
385 .word 0x00400001 ! Denormal number +ve
386 .word 0x00000001 ! Denormal number +ve
387
388data1_norm:
389
390 .word 0xff7fffff ! Normal
391 .word 0xff700000 ! Normal
392 .word 0xff7ffffe ! Normal
393 .word 0xff7aaaaa ! Normal
394 .word 0xff755555 ! Normal
395 .word 0xfe7fffff ! Normal
396 .word 0xfe700000 ! Normal
397 .word 0xfe7ffffe ! Normal
398 .word 0xfe7aaaaa ! Normal
399 .word 0xfe755555 ! Normal
400 .word 0x80ffffff ! Normal
401 .word 0x80f00000 ! Normal
402 .word 0x80c00001 ! Normal
403 .word 0x80c00000 ! Normal
404 .word 0x80800001 ! Normal
405 .word 0x80800000 ! Normal
406 .word 0x80800000 ! Normal
407 .word 0x00800000 ! Normal
408 .word 0x00800000 ! Normal
409 .word 0x00800001 ! Normal
410 .word 0x00c00000 ! Normal
411 .word 0x00c00001 ! Normal
412 .word 0x00f00000 ! Normal
413 .word 0x00ffffff ! Normal
414 .word 0x7e755555 ! Normal
415 .word 0x7e7aaaaa ! Normal
416 .word 0x7e7ffffe ! Normal
417 .word 0x7e700000 ! Normal
418 .word 0x7e7fffff ! Normal
419 .word 0x7f755555 ! Normal
420 .word 0x7f7aaaaa ! Normal
421 .word 0x7f7ffffe ! Normal
422 .word 0x7f700000 ! Normal
423 .word 0x7f7fffff ! Normal
424
425.align 256
426
427ddata1:
428 .xword 0x3ff0000000000000 ! 1.0 0x0
429 .xword 0x0000000000000000 ! 0.0 0x8
430 .xword 0xbff0000000000000 ! -1.0 0x10
431 .xword 0x8000000000000000 ! -0.0 0x18
432
433 .xword 0x41e0000000000000 ! Large positive number should cause NV on conversion 0x20
434 .xword 0xc1e0000000000000 ! Large negative number should cause NV on conversion 0x28
435
436 .xword 0x43e158e460913d00 ! Large positive number should cause NV on conversion to int 0x30
437 .xword 0xc3e158e460913d00 ! Large negative number should cause NV on conversion to int 0x38
438
439ddata1_denorm:
440
441 .xword 0x800fffffffffffff ! Denormal number -ve
442 .xword 0x800f000000000000 ! Denormal number -ve
443 .xword 0x8007ffffffffffff ! Denormal number -ve
444 .xword 0x8008000000000000 ! Denormal number -ve
445 .xword 0x8008000000000001 ! Denormal number -ve
446 .xword 0x8000000000000001 ! Denormal number -ve
447 .xword 0x8000000000000001 ! Denormal number -ve
448 .xword 0x000fffffffffffff ! Denormal number +ve
449 .xword 0x000fffffffffffff ! Denormal number +ve
450 .xword 0x000f000000000000 ! Denormal number +ve
451 .xword 0x0007ffffffffffff ! Denormal number +ve
452 .xword 0x0008000000000000 ! Denormal number +ve
453 .xword 0x0008000000000001 ! Denormal number +ve
454 .xword 0x0000000000000001 ! Denormal number +ve
455
456ddata1_norm:
457
458 .xword 0xffefffffffffffff ! Normal
459 .xword 0xffef000000000000 ! Normal
460 .xword 0xffeffffffffffffe ! Normal
461 .xword 0xffeaaaaaaaaaaaaa ! Normal
462 .xword 0xffe5555555555555 ! Normal
463 .xword 0xffcfffffffffffff ! Normal
464 .xword 0xffcf000000000000 ! Normal
465 .xword 0xffcffffffffffffe ! Normal
466 .xword 0xffcaaaaaaaaaaaaa ! Normal
467 .xword 0xffc5555555555555 ! Normal
468 .xword 0x801fffffffffffff ! Normal
469 .xword 0x801f000000000000 ! Normal
470 .xword 0x8018000000000001 ! Normal
471 .xword 0x8018000000000000 ! Normal
472 .xword 0x8010000000000001 ! Normal
473 .xword 0x8010000000000000 ! Normal
474 .xword 0x8010000000000000 ! Normal
475 .xword 0x0010000000000000 ! Normal
476 .xword 0x0010000000000000 ! Normal
477 .xword 0x0010000000000001 ! Normal
478 .xword 0x0018000000000000 ! Normal
479 .xword 0x0018000000000001 ! Normal
480 .xword 0x001f000000000000 ! Normal
481 .xword 0x001fffffffffffff ! Normal
482 .xword 0x7fc5555555555555 ! Normal
483 .xword 0x7fcaaaaaaaaaaaaa ! Normal
484 .xword 0x7fcffffffffffffe ! Normal
485 .xword 0x7fc7000000000000 ! Normal
486 .xword 0x7fc7ffffffffffff ! Normal
487 .xword 0x7fe5555555555555 ! Normal
488 .xword 0x7fe5aaaaaaaaaaaa ! Normal
489 .xword 0x7feffffffffffffe ! Normal
490 .xword 0x7fef000000000000 ! Normal
491 .xword 0x7fefffffffffffff ! Normal
492
493.align 512
494
495int_data_x:
496 .xword 0x0000000000000000 ! 0
497 .xword 0x0000000000000001 ! 1
498 .xword 0x7fffffffffffffff !
499 .xword 0xffffffffffffffff !
500 .xword 0xaaaaaaaaaaaaaaaa ! 0
501 .xword 0x5555555555555555 ! 1
502 .xword 0x4000000000000000 !
503 .xword 0x8000000000000000 !
504
505int_data_i:
506 .word 0x00000000 ! 0
507 .word 0x00000001 ! 1
508 .word 0x7fffffff !
509 .word 0xffffffff !
510 .word 0xaaaaaaaa !
511 .word 0x55555555 !
512 .word 0x40000000 !
513 .word 0x80000000 !
514
515.align 256
516
517fsr_tem_en:
518 .word 0x0f800000 ! TEM - all enabled - rd 0
519 .word 0x4f800000 ! TEM - all enabled - rd 1
520 .word 0x8f800000 ! TEM - all enabled - rd 2
521 .word 0xcf800000 ! TEM - all enabled - rd 3
522
523fsr_tem_dis:
524 .word 0x00000000 ! TEM - all disabled
525 .word 0x40000000 ! TEM - all disabled
526 .word 0x80000000 ! TEM - all disabled
527 .word 0xc0000000 ! TEM - all disabled
528
529/*******************************************************
530 * My own trap handlers
531 *******************************************************/
532
533.global T0_Fp_exception_ieee_754
534.global T0_Fp_exception_other
535.global T0_Fp_unimplemented
536
537T0_Fp_exception_ieee_754:
538 rdpr %tpc, %i0
539 rdpr %tnpc, %i1
540 rdpr %tstate, %i1
541 rdpr %tt, %i1
542 setx scratch, %l0, %l5 ! scratch
543 stx %fsr, [%l5+0x0]
544 ldx [%l5+0x0], %fsr ! Need to test the sync operation
545 done
546 nop
547
548T0_Fp_unimplemented:
549T0_Fp_exception_other:
550 rdpr %tpc, %i0
551 rdpr %tnpc, %i1
552 rdpr %tstate, %i1
553 rdpr %tt, %i1
554 setx scratch, %l0, %l5 ! scratch
555 stx %fsr, [%l5+0x0]
556 ldx [%l5+0x0], %fsr ! Need to test the sync operation
557 done
558 nop
559
560.data
561.align 128
562
563scratch:
564 .word 0x00000000
565 .word 0x00000000
566 .word 0x00000000
567 .word 0x00000000
568 .word 0x00000000
569 .word 0x00000000
570 .word 0x00000000
571 .word 0x00000000
572