Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / diag / assembly / isa3 / isa3_align_trap.s
CommitLineData
86530b38
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: isa3_align_trap.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#include "nmacros.h"
39#define MAIN_PAGE_HV_ALSO
40#define MAIN_PAGE_NUCLEUS_ALSO
41
42#define H_HT0_Mem_Address_Not_Aligned_0x34
43#define My_HT0_Mem_Address_Not_Aligned_0x34 \
44 done; \
45 nop
46
47#define H_HT0_Lddf_Mem_Address_Not_Aligned_0x35
48#define My_HT0_Lddf_Mem_Address_Not_Aligned_0x35 \
49 done; \
50 nop
51
52#define H_HT0_Stdf_Mem_Address_Not_Aligned_0x36
53#define My_HT0_Stdf_Mem_Address_Not_Aligned_0x36 \
54 done; \
55 nop
56
57#include "hboot.s"
58
59/************************************************************************
60 Test case code start
61 ************************************************************************/
62
63.text
64.global main
65
66main: /* test begin */
67
68 !# Initialize registers ..
69
70 !# Global registers
71 set 0x5, %g1
72 set 0x9, %g2
73 set 0xC, %g3
74 set 0x7, %g4
75 set 0xB, %g5
76 set 0x3, %g6
77 set 0xA, %g7
78 !# Input registers
79 set -0x4, %i0
80 set -0xA, %i1
81 set -0x5, %i2
82 set -0x9, %i3
83 set -0x0, %i4
84 set -0x6, %i5
85 set -0x0, %i6
86 set -0xC, %i7
87 !# Local registers
88 set 0x0000BABE, %l1
89 set 0x0000CAFE, %l2
90 set 0x0000DEAD, %l3
91 set 0x0000BEEF, %l4
92 set 0x000092D6, %l5
93
94 ta T_CHANGE_HPRIV
95
96 /* Load the thread id */
97 wr %g0, 0x63, %asi
98 ldxa [0x10] %asi, %l7
99 and %l7, 0x3f, %l7
100 umul %l7, 64, %l7
101 setx user_data_start, %i0 ,%l6
102 add %l7, %l6, %l7
103
104
105 ld [%l7 + 0x00], %i1
106 ld [%l7 + 0x12], %i2 /* mem_addr_not_aligned */
107 add %i1, %i2, %o1
108
109 st %l1, [%l7 + 0x00]
110 st %l2, [%l7 + 0x05] /* mem_addr_not_aligned */
111 st %l3, [%l7 + 0x08]
112 st %l4, [%l7 + 0x0c]
113 ldx [%l7 + 0x0], %o2
114 ldx [%l7 + 0x4], %o3 /* mem_addr_not_aligned */
115
116 ldd [%l7 + 0x4], %f0 /* lddf_mem_addr_not_aligned */
117 ldd [%l7 + 0x5], %f0 /* mem_addr_not_aligned */
118 ldd [%l7 + 0x8], %f0
119
120 std %f0, [%l7 + 0x4] /* stdf_mem_addr_not_aligned */
121 std %f0, [%l7 + 0x5] /* mem_addr_not_aligned */
122 std %f0, [%l7 + 0x8]
123
124 wr %g0, 0xf0, %asi /* block load */
125 ldda [%l7 + 0x8] %asi, %f0 /* mem_addr_not_aligned */
126 ldda [%l7 + 0x20] %asi, %f0 /* mem_addr_not_aligned */
127 ldda [%l7 + 0x40] %asi, %f0
128
129 wr %g0, 0xe2, %asi /* quad ldd/binit st */
130 ldda [%l7 + 0x8] %asi, %i0 /* mem_addr_not_aligned */
131 ldda [%l7 + 0x10] %asi, %i0
132 sta %l1, [%l7 + 0x00] %asi
133 sta %l2, [%l7 + 0x05] %asi /* mem_addr_not_aligned */
134 stha %l3, [%l7 + 0x08] %asi
135 stha %l3, [%l7 + 0x09] %asi /* mem_addr_not_aligned */
136
137 EXIT_GOOD
138
139
140/************************************************************************
141 Test case data start
142 ************************************************************************/
143.data
144
145user_data_start:
146.xword 0x0001020304050607
147.xword 0x08090a0b0c0d0e0f
148.xword 0x1011121314151617
149.xword 0x18191a1b1c1d1e1f
150.xword 0x2021222324252627
151.xword 0x28292a2b2c2d2e2f
152.xword 0x3031323334353637
153.xword 0x38393a3b3c3d3e3f
154.xword 0x4041424344454647
155.xword 0x48494a4b4c4d4e4f
156.xword 0x5051525354555657
157.xword 0x58595a5b5c5d5e5f
158.xword 0x6061626364656667
159.xword 0x68696a6b6c6d6e6f
160.xword 0x7071727374757677
161.xword 0x78797a7b7c7d7e7f
162.xword 0x8081828384858687
163.xword 0x88898a8b8c8d8e8f
164.xword 0x9091929394959697
165.xword 0x98999a9b9c9d9e9f
166.xword 0xa0a1a2a3a4a5a6a7
167.xword 0xa8a9aaabacadaeaf
168.xword 0xb0b1b2b3b4b5b6b7
169.xword 0xb8b9babbbcbdbebf
170.xword 0xc0c1c2c3c4c5c6c7
171.xword 0xc8c9cacbcccdcecf
172.xword 0xd0d1d2d3d4d5d6d7
173.xword 0xd8d9dadbdcdddedf
174.xword 0xe0e1e2e3e4e5e6e7
175.xword 0xe8e9eaebecedeeef
176.xword 0xf0f1f2f3f4f5f6f7
177.xword 0xf8f9fafbfcfdfeff
178.xword 0x0001020304050607
179.xword 0x08090a0b0c0d0e0f
180.xword 0x1011121314151617
181.xword 0x18191a1b1c1d1e1f
182.xword 0x2021222324252627
183.xword 0x28292a2b2c2d2e2f
184.xword 0x3031323334353637
185.xword 0x38393a3b3c3d3e3f
186.xword 0x4041424344454647
187.xword 0x48494a4b4c4d4e4f
188.xword 0x5051525354555657
189.xword 0x58595a5b5c5d5e5f
190.xword 0x6061626364656667
191.xword 0x68696a6b6c6d6e6f
192.xword 0x7071727374757677
193.xword 0x78797a7b7c7d7e7f
194.xword 0x8081828384858687
195.xword 0x88898a8b8c8d8e8f
196.xword 0x9091929394959697
197.xword 0x98999a9b9c9d9e9f
198.xword 0xa0a1a2a3a4a5a6a7
199.xword 0xa8a9aaabacadaeaf
200.xword 0xb0b1b2b3b4b5b6b7
201.xword 0xb8b9babbbcbdbebf
202.xword 0xc0c1c2c3c4c5c6c7
203.xword 0xc8c9cacbcccdcecf
204.xword 0xd0d1d2d3d4d5d6d7
205.xword 0xd8d9dadbdcdddedf
206.xword 0xe0e1e2e3e4e5e6e7
207.xword 0xe8e9eaebecedeeef
208.xword 0xf0f1f2f3f4f5f6f7
209.xword 0xf8f9fafbfcfdfeff
210.xword 0x0001020304050607
211.xword 0x08090a0b0c0d0e0f
212.xword 0x1011121314151617
213.xword 0x18191a1b1c1d1e1f
214.xword 0x2021222324252627
215.xword 0x28292a2b2c2d2e2f
216.xword 0x3031323334353637
217.xword 0x38393a3b3c3d3e3f
218.xword 0x4041424344454647
219.xword 0x48494a4b4c4d4e4f
220.xword 0x5051525354555657
221.xword 0x58595a5b5c5d5e5f
222.xword 0x6061626364656667
223.xword 0x68696a6b6c6d6e6f
224.xword 0x7071727374757677
225.xword 0x78797a7b7c7d7e7f
226.xword 0x8081828384858687
227.xword 0x88898a8b8c8d8e8f
228.xword 0x9091929394959697
229.xword 0x98999a9b9c9d9e9f
230.xword 0xa0a1a2a3a4a5a6a7
231.xword 0xa8a9aaabacadaeaf
232.xword 0xb0b1b2b3b4b5b6b7
233.xword 0xb8b9babbbcbdbebf
234.xword 0xc0c1c2c3c4c5c6c7
235.xword 0xc8c9cacbcccdcecf
236.xword 0xd0d1d2d3d4d5d6d7
237.xword 0xd8d9dadbdcdddedf
238.xword 0xe0e1e2e3e4e5e6e7
239.xword 0xe8e9eaebecedeeef
240.xword 0xf0f1f2f3f4f5f6f7
241.xword 0xf8f9fafbfcfdfeff
242.xword 0x0001020304050607
243.xword 0x08090a0b0c0d0e0f
244.xword 0x1011121314151617
245.xword 0x18191a1b1c1d1e1f
246.xword 0x2021222324252627
247.xword 0x28292a2b2c2d2e2f
248.xword 0x3031323334353637
249.xword 0x38393a3b3c3d3e3f
250.xword 0x4041424344454647
251.xword 0x48494a4b4c4d4e4f
252.xword 0x5051525354555657
253.xword 0x58595a5b5c5d5e5f
254.xword 0x6061626364656667
255.xword 0x68696a6b6c6d6e6f
256.xword 0x7071727374757677
257.xword 0x78797a7b7c7d7e7f
258.xword 0x8081828384858687
259.xword 0x88898a8b8c8d8e8f
260.xword 0x9091929394959697
261.xword 0x98999a9b9c9d9e9f
262.xword 0xa0a1a2a3a4a5a6a7
263.xword 0xa8a9aaabacadaeaf
264.xword 0xb0b1b2b3b4b5b6b7
265.xword 0xb8b9babbbcbdbebf
266.xword 0xc0c1c2c3c4c5c6c7
267.xword 0xc8c9cacbcccdcecf
268.xword 0xd0d1d2d3d4d5d6d7
269.xword 0xd8d9dadbdcdddedf
270.xword 0xe0e1e2e3e4e5e6e7
271.xword 0xe8e9eaebecedeeef
272.xword 0xf0f1f2f3f4f5f6f7
273.xword 0xf8f9fafbfcfdfeff
274.xword 0x0001020304050607
275.xword 0x08090a0b0c0d0e0f
276.xword 0x1011121314151617
277.xword 0x18191a1b1c1d1e1f
278.xword 0x2021222324252627
279.xword 0x28292a2b2c2d2e2f
280.xword 0x3031323334353637
281.xword 0x38393a3b3c3d3e3f
282.xword 0x4041424344454647
283.xword 0x48494a4b4c4d4e4f
284.xword 0x5051525354555657
285.xword 0x58595a5b5c5d5e5f
286.xword 0x6061626364656667
287.xword 0x68696a6b6c6d6e6f
288.xword 0x7071727374757677
289.xword 0x78797a7b7c7d7e7f
290.xword 0x8081828384858687
291.xword 0x88898a8b8c8d8e8f
292.xword 0x9091929394959697
293.xword 0x98999a9b9c9d9e9f
294.xword 0xa0a1a2a3a4a5a6a7
295.xword 0xa8a9aaabacadaeaf
296.xword 0xb0b1b2b3b4b5b6b7
297.xword 0xb8b9babbbcbdbebf
298.xword 0xc0c1c2c3c4c5c6c7
299.xword 0xc8c9cacbcccdcecf
300.xword 0xd0d1d2d3d4d5d6d7
301.xword 0xd8d9dadbdcdddedf
302.xword 0xe0e1e2e3e4e5e6e7
303.xword 0xe8e9eaebecedeeef
304.xword 0xf0f1f2f3f4f5f6f7
305.xword 0xf8f9fafbfcfdfeff
306.end