Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | /* |
2 | * ========== Copyright Header Begin ========================================== | |
3 | * | |
4 | * OpenSPARC T2 Processor File: INSTR.h | |
5 | * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved. | |
6 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES. | |
7 | * | |
8 | * The above named program is free software; you can redistribute it and/or | |
9 | * modify it under the terms of the GNU General Public | |
10 | * License version 2 as published by the Free Software Foundation. | |
11 | * | |
12 | * The above named program is distributed in the hope that it will be | |
13 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | * General Public License for more details. | |
16 | * | |
17 | * You should have received a copy of the GNU General Public | |
18 | * License along with this work; if not, write to the Free Software | |
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | |
20 | * | |
21 | * ========== Copyright Header End ============================================ | |
22 | */ | |
23 | #ifndef _INSTR_H | |
24 | #define _INSTR_H | |
25 | ||
26 | #include <stdio.h> | |
27 | #include <sys/types.h> | |
28 | ||
29 | #include "spix_sparc.h" | |
30 | ||
31 | #ifdef __cplusplus | |
32 | extern "C" { | |
33 | #endif | |
34 | ||
35 | typedef spix_sparc_inst_t Instr_t; | |
36 | typedef Instr_t Instr; | |
37 | ||
38 | unsigned getA(unsigned instr); | |
39 | unsigned setA(unsigned instr, int value); | |
40 | unsigned putA(int value); | |
41 | ||
42 | unsigned getASI(unsigned instr); | |
43 | unsigned setASI(unsigned instr, int value); | |
44 | unsigned putASI(int value); | |
45 | ||
46 | unsigned getCOND(unsigned instr); | |
47 | unsigned setCOND(unsigned instr, int value); | |
48 | unsigned putCOND(int value); | |
49 | ||
50 | unsigned getDISP22(unsigned instr); | |
51 | unsigned setDISP22(unsigned instr, int value); | |
52 | unsigned putDISP22(int value); | |
53 | ||
54 | unsigned getDISP30(unsigned instr); | |
55 | unsigned setDISP30(unsigned instr, int value); | |
56 | unsigned putDISP30(int value); | |
57 | ||
58 | unsigned getI(unsigned instr); | |
59 | unsigned setI(unsigned instr, int value); | |
60 | unsigned putI(int value); | |
61 | ||
62 | unsigned getINSTR(unsigned instr); | |
63 | unsigned setINSTR(unsigned instr); | |
64 | unsigned putINSTR(int value); | |
65 | ||
66 | unsigned getIMM22(unsigned instr); | |
67 | unsigned setIMM22(unsigned instr, int value); | |
68 | unsigned putIMM22(int value); | |
69 | ||
70 | unsigned getOP(unsigned instr); | |
71 | unsigned setOP(unsigned instr, int value); | |
72 | unsigned putOP(int value); | |
73 | ||
74 | unsigned getOP2(unsigned instr); | |
75 | unsigned setOP2(unsigned instr, int value); | |
76 | unsigned putOP2(int value); | |
77 | ||
78 | unsigned getOP3(unsigned instr); | |
79 | unsigned setOP3(unsigned instr, int value); | |
80 | unsigned putOP3(int value); | |
81 | ||
82 | unsigned getOPF(unsigned instr); | |
83 | unsigned setOPF(unsigned instr, int value); | |
84 | unsigned putOPF(int value); | |
85 | ||
86 | unsigned getOPF_LOW5(unsigned instr); | |
87 | unsigned setOPF_LOW5(unsigned instr, int value); | |
88 | unsigned putOPF_LOW5(int value); | |
89 | ||
90 | unsigned getOPF_LOW6(unsigned instr); | |
91 | unsigned setOPF_LOW6(unsigned instr, int value); | |
92 | unsigned putOPF_LOW6(int value); | |
93 | ||
94 | unsigned getOPF_CC(unsigned instr); | |
95 | unsigned setOPF_CC(unsigned instr, int value); | |
96 | unsigned putOPF_CC(int value); | |
97 | ||
98 | unsigned getRD(unsigned instr); | |
99 | unsigned setRD(unsigned instr, int value); | |
100 | unsigned putRD(int value); | |
101 | ||
102 | unsigned getRS1(unsigned instr); | |
103 | unsigned setRS1(unsigned instr, int value); | |
104 | unsigned putRS1(int value); | |
105 | ||
106 | unsigned getRS2(unsigned instr); | |
107 | unsigned setRS2(unsigned instr, int value); | |
108 | unsigned putRS2(int value); | |
109 | ||
110 | unsigned getRS3(unsigned instr); | |
111 | unsigned setRS3(unsigned instr, int value); | |
112 | unsigned putRS3(int value); | |
113 | ||
114 | unsigned getSIMM13(unsigned instr); | |
115 | unsigned setSIMM13(unsigned instr, int value); | |
116 | unsigned putSIMM13(int value); | |
117 | ||
118 | unsigned getSHCNT32(unsigned instr); | |
119 | unsigned setSHCNT32(unsigned instr, int value); | |
120 | unsigned putSHCNT32(int value); | |
121 | ||
122 | unsigned getCC12_11(unsigned instr); | |
123 | unsigned setCC12_11(unsigned instr, int value); | |
124 | unsigned putCC12_11(int value); | |
125 | ||
126 | unsigned getCC21_20(unsigned instr); | |
127 | unsigned setCC21_20(unsigned instr, int value); | |
128 | unsigned putCC21_20(int value); | |
129 | ||
130 | unsigned getCC26_25(unsigned instr); | |
131 | unsigned setCC26_25(unsigned instr, int value); | |
132 | unsigned putCC26_25(int value); | |
133 | ||
134 | unsigned getCOND17_14(unsigned instr); | |
135 | unsigned setCOND17_14(unsigned instr, int value); | |
136 | unsigned putCOND17_14(int value); | |
137 | ||
138 | unsigned getDISP14(unsigned instr); | |
139 | unsigned setDISP14(unsigned instr, int value); | |
140 | unsigned putDISP14(int value); | |
141 | ||
142 | unsigned getDISPLO(unsigned instr); | |
143 | unsigned setDISPLO(unsigned instr, int value); | |
144 | unsigned putDISPLO(int value); | |
145 | ||
146 | unsigned getDISP19(unsigned instr); | |
147 | unsigned setDISP19(unsigned instr, int value); | |
148 | unsigned putDISP19(int value); | |
149 | ||
150 | unsigned getDISP2(unsigned instr); | |
151 | unsigned setDISP2(unsigned instr, int value); | |
152 | unsigned putDISP2(int value); | |
153 | ||
154 | unsigned getDISPHI(unsigned instr); | |
155 | unsigned setDISPHI(unsigned instr, int value); | |
156 | unsigned putDISPHI(int value); | |
157 | ||
158 | unsigned getP(unsigned instr); | |
159 | unsigned setP(unsigned instr, int value); | |
160 | unsigned putP(int value); | |
161 | ||
162 | unsigned getRCOND12_10(unsigned instr); | |
163 | unsigned setRCOND12_10(unsigned instr, int value); | |
164 | unsigned putRCOND12_10(int value); | |
165 | ||
166 | unsigned getSHCNT64(unsigned instr); | |
167 | unsigned setSHCNT64(unsigned instr, int value); | |
168 | unsigned putSHCNT64(int value); | |
169 | ||
170 | unsigned getSIMM10(unsigned instr); | |
171 | unsigned setSIMM10(unsigned instr, int value); | |
172 | unsigned putSIMM10(int value); | |
173 | ||
174 | unsigned getSIMM11(unsigned instr); | |
175 | unsigned setSIMM11(unsigned instr, int value); | |
176 | unsigned putSIMM11(int value); | |
177 | ||
178 | unsigned getX_12(unsigned instr); | |
179 | unsigned setX_12(unsigned instr, int value); | |
180 | unsigned putX_12(int value); | |
181 | ||
182 | unsigned getFCN(unsigned instr); | |
183 | unsigned setFCN(unsigned instr, int value); | |
184 | unsigned putFCN(int value); | |
185 | ||
186 | #ifdef __cplusplus | |
187 | } | |
188 | #endif | |
189 | ||
190 | #endif /* _INSTR_H */ |