Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / diag / assembly / ifu / ifu_basic_bicc.s
CommitLineData
86530b38
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: ifu_basic_bicc.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
68 ! Now do some useful stuff ..
69start:
70 add %g0, 0x0000, %g1
71 add %g0, 0x0000, %g2
72 add %g0, 0x0000, %g3
73 add %g0, 0x0000, %g4
74 add %g0, 0x0000, %g5
75 add %g0, 0x0000, %g6
76 add %g0, 0x0000, %g7
77 addcc %g0, 0x0000, %g7
78B0: addcc %g0, 0x0001, %g2
79 ba B1
80 addcc %g0, 0x1fff, %g1
81 inc %g7
82B1: addcc %g0, 0x0001, %g2
83 bne B2
84 addcc %g0, 0x1fff, %g1
85 inc %g7
86B2: addcc %g0, 0x0000, %g2
87 be B3
88 addcc %g0, 0x1fff, %g1
89 inc %g7
90B3: addcc %g0, 0x0001, %g2
91 bg B4
92 addcc %g0, 0x1fff, %g1
93 inc %g7
94B4: addcc %g0, 0x0000, %g2
95 dec %g2
96 ble B5
97 addcc %g0, 0x1fff, %g1
98 inc %g7
99B5: addcc %g0, 0x0001, %g2
100 bge B6
101 addcc %g0, 0x1fff, %g1
102 inc %g7
103B6: addcc %g0, 0x0000, %g2
104 bge B7
105 addcc %g0, 0x1fff, %g1
106 inc %g7
107B7: addcc %g0, 0x0000, %g2
108 dec %g2
109 bl B8
110 addcc %g0, 0x1fff, %g1
111 inc %g7
112B8: addcc %g0, 0x0001, %g2
113 bgu B9
114 addcc %g0, 0x1fff, %g1
115 inc %g7
116B9: addcc %g0, 0x0000, %g2
117 bleu B10
118 addcc %g0, 0x1fff, %g1
119 inc %g7
120B10: addcc %g0, 0x0001, %g2
121 dec %g2
122 bcc B11
123 addcc %g0, 0x1fff, %g1
124 inc %g7
125B11: addcc %g0, 0x0002, %g2
126 dec %g2
127 bpos B12
128 addcc %g0, 0x1fff, %g1
129 inc %g7
130B12: addcc %g0, 0x0000, %g2
131 dec %g2
132 bneg B13
133 addcc %g0, 0x1fff, %g1
134 inc %g7
135B13: addcc %g0, 0x0001, %g2
136 dec %g2
137 bvc Bx
138 addcc %g0, 0x1fff, %g1
139 inc %g7
140Bx: cmp %g7, 0x0
141 nop
142 nop
143 nop
144 nop
145 nop
146 nop
147!good_trap:
148! b good_trap
149EXIT_GOOD
150 nop
151 nop
152
153!SECTION .DATA TEXT_VA = 0xffffff0000000000
154!attr_text {
155! Name=.DATA,
156! hypervisor
157!}
158
159.data
160.xword 0x0
161.xword 0x1
162.xword 0x2
163.xword 0x3
164.xword 0x4
165.xword 0x5
166.xword 0x6
167.xword 0x7
168
169.end
170
171