Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / diag / assembly / isa3 / st_blk.s
CommitLineData
86530b38
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: st_blk.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#define MAIN_PAGE_NUCLEUS_ALSO
40
41#include "hboot.s"
42
43/************************************************************************
44 Test case code start
45 ************************************************************************/
46
47.text
48.global main
49
50main: /* test begin */
51
52
53 !# Initialize registers ..
54
55 !# Global registers
56 set 0x5, %g1
57 set 0x9, %g2
58 set 0xC, %g3
59 set 0x7, %g4
60 set 0xB, %g5
61 set 0x3, %g6
62 set 0xA, %g7
63 !# Input registers
64 set -0x4, %i0
65 set -0xA, %i1
66 set -0x5, %i2
67 set -0x9, %i3
68 set -0x0, %i4
69 set -0x6, %i5
70 set -0x0, %i6
71 set -0xC, %i7
72 !# Local registers
73 set 0x6BC97FF6, %l0
74 set 0x58CD6641, %l1
75 set 0x7CCA8958, %l2
76 set 0x08A07B35, %l3
77 set 0x475FF3C1, %l4
78 set 0x22DB92D6, %l5
79 set 0x26538D1E, %l6
80 set 0x6CB6F74A, %l7
81
82 setx user_data_start, %i0, %l0
83
84 !# Block Load
85 ldda [%l0] ASI_BLOCK_PRIMARY, %f0
86
87 fnot1 %f0, %f16
88 fnot1 %f2, %f16
89 fnot1 %f4, %f16
90 fnot1 %f6, %f16
91 fnot1 %f8, %f16
92 fnot1 %f10, %f16
93 fnot1 %f12, %f16
94 fnot1 %f14, %f16
95
96 add %l0, 0x40, %l0
97 ldda [%l0] ASI_BLOCK_PRIMARY_LITTLE, %f0
98
99 fnot1 %f0, %f16
100 fnot1 %f2, %f16
101 fnot1 %f4, %f16
102 fnot1 %f6, %f16
103 fnot1 %f8, %f16
104 fnot1 %f10, %f16
105 fnot1 %f12, %f16
106 fnot1 %f14, %f16
107
108 add %l0, 0x40, %l0
109 stda %g4, [%l0] ASI_BLK_INIT_ST_QUAD_LDD_P
110 ldda [%l0] ASI_BLK_INIT_ST_QUAD_LDD_P, %i0
111
112 fnot1 %f0, %f16
113 fnot1 %f2, %f16
114 fnot1 %f4, %f16
115 fnot1 %f6, %f16
116 fnot1 %f8, %f16
117 fnot1 %f10, %f16
118 fnot1 %f12, %f16
119 fnot1 %f14, %f16
120
121 !# Block Store
122 add %l0, 0x40, %l0
123 fmuld8ulx16 %f2, %f18, %f0
124 stda %f0, [%l0] ASI_BLOCK_PRIMARY
125 membar #Sync
126
127 std %f0, [%l0 + 0x00]
128 std %f2, [%l0 + 0x08]
129 std %f4, [%l0 + 0x10]
130 std %f6, [%l0 + 0x18]
131 std %f8, [%l0 + 0x20]
132 std %f10,[%l0 + 0x28]
133 std %f12,[%l0 + 0x30]
134 std %f14,[%l0 + 0x38]
135
136 ldd [%l0 + 0x00], %f0
137 ldd [%l0 + 0x08], %f2
138 ldd [%l0 + 0x10], %f4
139 ldd [%l0 + 0x18], %f6
140 ldd [%l0 + 0x20], %f8
141 ldd [%l0 + 0x28], %f10
142 ldd [%l0 + 0x30], %f12
143 ldd [%l0 + 0x38], %f14
144
145 !# SWVR INTR
146 ta T_CHANGE_HPRIV
147 stxa %i2, [%g0] ASI_SWVR_INTR_W
148 ldxa [%g0] ASI_SWVR_INTR_R, %g2;
149
150 EXIT_GOOD /* test finish */
151
152/************************************************************************
153 Test case data start
154 ************************************************************************/
155.data
156
157user_data_start:
158.xword 0x0001020304050607
159.xword 0x08090a0b0c0d0e0f
160.xword 0x1011121314151617
161.xword 0x18191a1b1c1d1e1f
162.xword 0x2021222324252627
163.xword 0x28292a2b2c2d2e2f
164.xword 0x3031323334353637
165.xword 0x38393a3b3c3d3e3f
166.xword 0x4041424344454647
167.xword 0x48494a4b4c4d4e4f
168.xword 0x5051525354555657
169.xword 0x58595a5b5c5d5e5f
170.xword 0x6061626364656667
171.xword 0x68696a6b6c6d6e6f
172.xword 0x7071727374757677
173.xword 0x78797a7b7c7d7e7f
174.xword 0x8081828384858687
175.xword 0x88898a8b8c8d8e8f
176.xword 0x9091929394959697
177.xword 0x98999a9b9c9d9e9f
178.xword 0xa0a1a2a3a4a5a6a7
179.xword 0xa8a9aaabacadaeaf
180.xword 0xb0b1b2b3b4b5b6b7
181.xword 0xb8b9babbbcbdbebf
182.xword 0xc0c1c2c3c4c5c6c7
183.xword 0xc8c9cacbcccdcecf
184.xword 0xd0d1d2d3d4d5d6d7
185.xword 0xd8d9dadbdcdddedf
186.xword 0xe0e1e2e3e4e5e6e7
187.xword 0xe8e9eaebecedeeef
188.xword 0xf0f1f2f3f4f5f6f7
189.xword 0xf8f9fafbfcfdfeff
190.end