Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / diag / assembly / exu / ffu_fplogic_n2.s
CommitLineData
86530b38
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: ffu_fplogic_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 ENABLE_T0_Fp_disabled_0x20
39
40#define MAIN_PAGE_HV_ALSO
41#define MAIN_PAGE_NUCLEUS_ALSO
42
43#define ENABLE_T0_Clean_Window_0x24
44#define ENABLE_T0_Corrected_ECC_error_0x63
45#define ENABLE_T0_Data_Access_Exception_0x30
46#define ENABLE_T0_Data_access_error_0x32
47#define ENABLE_T0_Division_By_Zero_0x28
48#define ENABLE_T0_Fp_disabled_0x20
49#define ENABLE_T0_Fp_exception_ieee_754_0x21
50#define ENABLE_T0_Fp_exception_other_0x22
51#define ENABLE_T0_Illegal_instruction_0x10
52#define ENABLE_T0_Instruction_Access_MMU_Miss_0x09
53#define ENABLE_T0_Instruction_access_error_0x0a
54#define ENABLE_T0_Instruction_access_exception_0x08
55#define ENABLE_T0_Lddf_Mem_Address_Not_Aligned_0x35
56#define ENABLE_T0_Mem_Address_Not_Aligned_0x34
57#define ENABLE_T0_Privileged_Action_0x37
58#define ENABLE_T0_Privileged_opcode_0x11
59#define ENABLE_T0_Stdf_Mem_Address_Not_Aligned_0x36
60#define ENABLE_T0_Tag_Overflow_0x23
61#define ENABLE_T0_Unimplemented_LDD_0x12
62#define ENABLE_T0_Unimplemented_STD_0x13
63#define ENABLE_T0_data_access_protection_0x6c
64#define ENABLE_T0_fast_data_access_MMU_miss_0x68
65#define ENABLE_T0_fast_instr_access_MMU_miss_0x64
66
67#include "hboot.s"
68
69.global sam_fast_immu_miss
70.global sam_fast_dmmu_miss
71
72
73/****************START OF TEST*********************************************/
74
75
76.text
77.global main
78ALIGN_PAGE_8K
79
80user_text_start:
81
82main:
83
84 wr %g0, 0x4, %fprs /* make sure fef is 1 */
85
86 set sp_data_start, %g1
87 set dp_data_start, %g2
88 ldd [%g1 + 0x0], %f0
89 ldd [%g1 + 0x8], %f2
90 ldd [%g2 + 0x0], %f4
91 ldd [%g2 + 0x8], %f6
92 ldd [%g2 + 0x10], %f8
93 ldd [%g2 + 0x18], %f10
94 wr %g0, 0x0, %asr19 !WRASR to GSR
95 mov %g0, %o3
96 ba tst_plogic_1
97 nop
98
99.align 32
100tst_plogic_1:
101! fzero %d32
102! fone %d34
103 fone %d34
104 fzero %d32
105 fnor %f0, %f2, %f36
106 for %f0, %f2, %f38
107 for %f2, %f0, %f38
108 fnor %f2, %f0, %f36
109
110tst_plogic_2:
111 fandnot1 %f6, %f8, %f40
112 fandnot2 %f10, %f8, %f42
113 fandnot2 %f8, %f8, %f42
114 fandnot1 %f4, %f8, %f40
115 fnot2 %f6, %f44
116 fnot1 %f4, %f46
117 fnot1 %f8, %f46
118 fnot2 %f6, %f44
119
120tst_plogic_3:
121 fand %f2, %f0, %f48
122 fnand %f0, %f2, %f50
123 fnand %f8, %f6, %f50
124 fand %f6, %f8, %f48
125 fxnor %f2, %f6, %f52
126 fxor %f6, %f2, %f54
127 fxor %f4, %f6, %f54
128 fxnor %f6, %f4, %f52
129
130tst_plogic_4:
131 fornot2 %f4, %f8, %f56
132 fornot1 %f4, %f8, %f54
133 fornot1 %f8, %f4, %f54
134 fornot2 %f8, %f4, %f56
135 fsrc1 %f2, %f58
136 fsrc2 %f6, %f60
137 fsrc2 %f6, %f60
138 fsrc1 %f2, %f58
139
140tst_plogics_1:
141 fzeros %f12
142 fones %f13
143! fones %f13
144! fzeros %f12
145 fones %f12
146 fzeros %f13
147 fnors %f5, %f6, %f14
148 fors %f7, %f8, %f15
149 fors %f8, %f7, %f15
150 fnors %f6, %f5, %f14
151
152
153
154tst_plogics_2:
155 fandnot1s %f8, %f9, %f16
156 fandnot2s %f9, %f8, %f17
157 fandnot2s %f10, %f11, %f17
158 fandnot1s %f11, %f10, %f16
159 fnot2s %f4, %f18
160 fnot1s %f4, %f19
161 fnot1s %f6, %f19
162 fnot2s %f6, %f18
163
164tst_plogics_3:
165 fands %f2, %f0, %f22
166 fnands %f0, %f2, %f23
167 fnands %f8, %f6, %f23
168 fands %f6, %f8, %f22
169 fxnors %f2, %f6, %f24
170 fxors %f6, %f2, %f25
171 fxors %f4, %f6, %f25
172 fxnors %f6, %f4, %f24
173
174tst_plogics_4:
175 fornot2s %f4, %f9, %f28
176 fornot1s %f4, %f9, %f29
177 fornot1s %f9, %f4, %f29
178 fornot2s %f9, %f4, %f28
179 fsrc1s %f2, %f26
180 fsrc2s %f5, %f27
181 fsrc2s %f5, %f27
182 fsrc1s %f2, %f26
183
184
185
186 ta GOOD_TRAP
187
188user_text_end:
189
190.seg "data"
191ALIGN_PAGE_8K
192
193user_data_start:
194
195
196
197
198sp_data_start:
199 .word 0x3f840041
200 .word 0x40284144
201 .word 0xf67890ab
202 .word 0x264fd879
203
204sp_data_end:
205
206dp_data_start:
207.align 8
208 .word 0x56565656
209 .word 0x78787878
210 .word 0x4b4b4b4b
211 .word 0xc3c3c3c3
212 .word 0xdeadbeef
213 .word 0xdeadbeef
214 .word 0x21524110
215 .word 0x21345879
216
217dp_data_end:
218
219
220fsr_data_start:
221.align 8
222
223 .word 0x0
224 .word 0x80000000
225
226
227user_result_start:
228
229user_data_end: