Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / diag / assembly / ifu / ifu_basic_br1.s
CommitLineData
86530b38
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: ifu_basic_br1.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 "defines.h"
39#include "old_boot.s"
40
41!SECTION .MAIN TEXT_VA = 0xfffffffff0000000
42!attr_text {
43! Name=.MAIN,
44! hypervisor
45!}
46
47.text
48.global main
49
50main:
51
52 ! 1st fetch should be from RSTVaddr+0x20
53
54 illtrap
55 illtrap
56 illtrap
57 illtrap
58 illtrap
59 illtrap
60 illtrap
61 illtrap
62
63 ! First intsruction fetched should be from here RSTVaddr+0x20
64
65 ! First set up some registers with values ..
66
67 setx 0x524e4f2c0e9a829e, %g1, %g2
68 setx 0x21f892f023188c4b, %g1, %g3
69 setx 0x0b2a330b797f1524, %g1, %g4
70
71 setx 0xfffffffff0000000, %g1, %g5
72 setx 0x454f5c220664cd3c, %g1, %g6
73 setx 0x5d7085ae11898343, %g1, %g7
74
75 ! Now do some useful stuff ..
76
77start:
78 bpos,a t2
79 bpos,a t4
80 inc %g2
81 b goodbye
82
83
84t2:
85 bpos,a t3
86 inc %g3
87 b goodbye
88
89
90t3:
91 bneg,a goodbye
92 inc %g4
93 b goodbye
94
95
96t4:
97 bpos,a t5
98 inc %g5
99 b goodbye
100
101
102t5:
103 bneg,a goodbye
104 inc %g6
105 xor %g2, %g6, %g1
106
107 cmp %g5, %g6 ;
108 cmp %g3, 0x1
109
110
111goodbye:
112 nop
113 nop
114 nop
115 nop
116 nop
117!good_trap:
118! b good_trap
119EXIT_GOOD
120 nop
121 nop
122
123
124
125!SECTION .DATA TEXT_VA = 0xffffff0000000000
126!attr_text {
127! Name=.DATA,
128! hypervisor
129!}
130
131.data
132.xword 0x0
133.xword 0x1
134.xword 0x2
135.xword 0x3
136.xword 0x4
137.xword 0x5
138.xword 0x6
139.xword 0x7
140
141.end
142
143