Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / diag / assembly / arch / prm / mcu / n2_all_th_ldst.s
CommitLineData
86530b38
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: n2_all_th_ldst.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_NUCLEUS_ALSO
39#define MAIN_PAGE_HV_ALSO
40
41#define L20 0x0000134000
42#define L21 0x0000134040
43
44#define L22 0x0000134080
45#define L23 0x00001340c0
46
47#define L24 0x0000134100
48#define L25 0x0000134140
49
50#define L26 0x0000134180
51#define L27 0x00001341c0
52
53#include "hboot.s"
54#include "asi_s.h"
55#include "nmacros.h"
56
57
58
59/************************************************************************
60 Test case code start
61 ************************************************************************/
62
63.text
64.global main
65
66main:
67 ta T_CHANGE_HPRIV
68
69 ! All threads use the same code.
70L2_Init:
71 setx 0x1111111111111110, %g7, %o0
72 setx 0x2222222222222220, %g7, %o1
73 setx 0x3333333333333330, %g7, %o2
74 setx 0x4444444444444440, %g7, %o3
75 setx 0x5555555555555550, %g7, %o4
76 setx 0x6666666666666660, %g7, %o5
77 setx 0x8888888888888880, %g7, %o6
78 setx 0x9999999999999990, %g7, %o7
79
80 setx L20, %g7, %l0
81 setx L21, %g7, %l1
82
83 setx L22, %g7, %l2
84 setx L23, %g7, %l3
85
86 setx L24, %g7, %l4
87 setx L25, %g7, %l5
88
89 setx L26, %g7, %l6
90 setx L27, %g7, %l7
91
92L2_0:
93 stx %o0, [%l0]
94 ldx [%l0], %g1
95
96L2_1:
97 stx %o1, [%l1]
98 ldx [%l1], %g1
99
100L2_2:
101 stx %o2, [%l2]
102 ldx [%l2], %g1
103
104L2_3:
105 stx %o3, [%l3]
106 ldx [%l3], %g1
107
108L2_4:
109 stx %o4, [%l4]
110 ldx [%l4], %g1
111
112L2_5:
113 stx %o5, [%l5]
114 ldx [%l5], %g1
115
116L2_6:
117 stx %o6, [%l6]
118 ldx [%l6], %g1
119
120L2_7:
121 stx %o7, [%l7]
122 ldx [%l7], %g1
123
124 ba test_passed
125 nop
126
127
128test_passed:
129 EXIT_GOOD
130 nop
131
132test_failed:
133 EXIT_BAD
134 nop
135user_text_end:
136