annotate agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9Opcodes.java @ 1913:3b2dea75431e

6984311: JSR 292 needs optional bootstrap method parameters Summary: Allow CONSTANT_InvokeDynamic nodes to have any number of extra operands. Reviewed-by: twisti
author jrose
date Sat, 30 Oct 2010 13:08:23 -0700
parents c18cbe5936b8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
2 * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 package sun.jvm.hotspot.asm.sparc;
a61af66fc99e Initial load
duke
parents:
diff changeset
26
a61af66fc99e Initial load
duke
parents:
diff changeset
27 import sun.jvm.hotspot.asm.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
28
a61af66fc99e Initial load
duke
parents:
diff changeset
29 // Please refer to "The SPARC Architecture Manual - Version 9"
a61af66fc99e Initial load
duke
parents:
diff changeset
30
a61af66fc99e Initial load
duke
parents:
diff changeset
31 public interface SPARCV9Opcodes extends SPARCOpcodes {
a61af66fc99e Initial load
duke
parents:
diff changeset
32 // format 2, v9 specific "op2" values.
a61af66fc99e Initial load
duke
parents:
diff changeset
33
a61af66fc99e Initial load
duke
parents:
diff changeset
34 // branch on integer condition codes with prediction
a61af66fc99e Initial load
duke
parents:
diff changeset
35 public static final int OP_2_BPcc = 1;
a61af66fc99e Initial load
duke
parents:
diff changeset
36
a61af66fc99e Initial load
duke
parents:
diff changeset
37 // branch on integer register contents with prediction
a61af66fc99e Initial load
duke
parents:
diff changeset
38 public static final int OP_2_BPr = 3;
a61af66fc99e Initial load
duke
parents:
diff changeset
39
a61af66fc99e Initial load
duke
parents:
diff changeset
40 // branch on float condition codes with prediction
a61af66fc99e Initial load
duke
parents:
diff changeset
41 public static final int OP_2_FBPfcc = 5;
a61af66fc99e Initial load
duke
parents:
diff changeset
42
a61af66fc99e Initial load
duke
parents:
diff changeset
43 // "rcond" - branch on register condition
a61af66fc99e Initial load
duke
parents:
diff changeset
44 public static final int BRANCH_RCOND_START_BIT = 25;
a61af66fc99e Initial load
duke
parents:
diff changeset
45
a61af66fc99e Initial load
duke
parents:
diff changeset
46 // rcond is 3 bits length
a61af66fc99e Initial load
duke
parents:
diff changeset
47 public static final int BRANCH_RCOND_MASK = 7 << BRANCH_RCOND_START_BIT;
a61af66fc99e Initial load
duke
parents:
diff changeset
48
a61af66fc99e Initial load
duke
parents:
diff changeset
49 // "rcond" - as used in conditional moves
a61af66fc99e Initial load
duke
parents:
diff changeset
50 public static final int CMOVE_RCOND_START_BIT = 10;
a61af66fc99e Initial load
duke
parents:
diff changeset
51 public static final int CMOVE_RCOND_MASK = 7 << CMOVE_RCOND_START_BIT;
a61af66fc99e Initial load
duke
parents:
diff changeset
52
a61af66fc99e Initial load
duke
parents:
diff changeset
53 public static final int IMPDEP1 = CPop1;
a61af66fc99e Initial load
duke
parents:
diff changeset
54 public static final int IMPDEP2 = CPop2;
a61af66fc99e Initial load
duke
parents:
diff changeset
55
a61af66fc99e Initial load
duke
parents:
diff changeset
56 // various rcond values - used in BPr, MOVr and FMOVr
a61af66fc99e Initial load
duke
parents:
diff changeset
57
a61af66fc99e Initial load
duke
parents:
diff changeset
58 // reserved register condition
a61af66fc99e Initial load
duke
parents:
diff changeset
59 public static final int BRANCH_RCOND_RESERVED1 = 0; // 000
a61af66fc99e Initial load
duke
parents:
diff changeset
60
a61af66fc99e Initial load
duke
parents:
diff changeset
61 public static final int BRZ = 1;
a61af66fc99e Initial load
duke
parents:
diff changeset
62 public static final int MOVRZ = BRZ;
a61af66fc99e Initial load
duke
parents:
diff changeset
63 public static final int FMOVZ = BRZ;
a61af66fc99e Initial load
duke
parents:
diff changeset
64
a61af66fc99e Initial load
duke
parents:
diff changeset
65 public static final int BRLEZ = 2;
a61af66fc99e Initial load
duke
parents:
diff changeset
66 public static final int MOVRLEZ = BRLEZ;
a61af66fc99e Initial load
duke
parents:
diff changeset
67 public static final int FMOVLEZ = BRLEZ;
a61af66fc99e Initial load
duke
parents:
diff changeset
68
a61af66fc99e Initial load
duke
parents:
diff changeset
69 public static final int BRLZ = 3;
a61af66fc99e Initial load
duke
parents:
diff changeset
70 public static final int MOVRLZ = BRLZ;
a61af66fc99e Initial load
duke
parents:
diff changeset
71 public static final int FMOVLZ = BRLZ;
a61af66fc99e Initial load
duke
parents:
diff changeset
72
a61af66fc99e Initial load
duke
parents:
diff changeset
73 // reserved register condition
a61af66fc99e Initial load
duke
parents:
diff changeset
74 public static final int BRANCH_RCOND_RESERVED2 = 4; // 100
a61af66fc99e Initial load
duke
parents:
diff changeset
75
a61af66fc99e Initial load
duke
parents:
diff changeset
76 public static final int BRNZ = 5;
a61af66fc99e Initial load
duke
parents:
diff changeset
77 public static final int MOVRNZ = BRNZ;
a61af66fc99e Initial load
duke
parents:
diff changeset
78 public static final int FMOVNZ = BRNZ;
a61af66fc99e Initial load
duke
parents:
diff changeset
79
a61af66fc99e Initial load
duke
parents:
diff changeset
80 public static final int BRGZ = 6;
a61af66fc99e Initial load
duke
parents:
diff changeset
81 public static final int MOVGZ = BRGZ;
a61af66fc99e Initial load
duke
parents:
diff changeset
82 public static final int FMOVGZ = BRGZ;
a61af66fc99e Initial load
duke
parents:
diff changeset
83
a61af66fc99e Initial load
duke
parents:
diff changeset
84 public static final int BRGEZ = 7;
a61af66fc99e Initial load
duke
parents:
diff changeset
85 public static final int MOVRGEZ = BRGEZ;
a61af66fc99e Initial load
duke
parents:
diff changeset
86 public static final int FMOVGEZ = BRGEZ;
a61af66fc99e Initial load
duke
parents:
diff changeset
87
a61af66fc99e Initial load
duke
parents:
diff changeset
88 // "p" - prediction bit - predict branch taken or not taken
a61af66fc99e Initial load
duke
parents:
diff changeset
89 public static final int PREDICTION_START_BIT = 19;
a61af66fc99e Initial load
duke
parents:
diff changeset
90 public static final int PREDICTION_MASK = 1 << PREDICTION_START_BIT;
a61af66fc99e Initial load
duke
parents:
diff changeset
91
a61af66fc99e Initial load
duke
parents:
diff changeset
92 // branch pc relative displacement - hi 2 bits of disp16.
a61af66fc99e Initial load
duke
parents:
diff changeset
93 public static final int DISP_16_HI_START_BIT = 20;
a61af66fc99e Initial load
duke
parents:
diff changeset
94
a61af66fc99e Initial load
duke
parents:
diff changeset
95 // disp 16 hi is 2 bits length
a61af66fc99e Initial load
duke
parents:
diff changeset
96 public static final int DISP_16_HI_MASK = 3 << DISP_16_HI_START_BIT;
a61af66fc99e Initial load
duke
parents:
diff changeset
97
a61af66fc99e Initial load
duke
parents:
diff changeset
98 // disp 16 low 14 bits
a61af66fc99e Initial load
duke
parents:
diff changeset
99 public static final int DISP_16_LO_START_BIT = 0; // just for completion.
a61af66fc99e Initial load
duke
parents:
diff changeset
100 public static final int DISP_16_LO_MASK = 0x3FFF;
a61af66fc99e Initial load
duke
parents:
diff changeset
101 public static final int DISP_16_LO_NUMBITS = 14;
a61af66fc99e Initial load
duke
parents:
diff changeset
102
a61af66fc99e Initial load
duke
parents:
diff changeset
103 // disp 19 - integer branch with prediction - displacement
a61af66fc99e Initial load
duke
parents:
diff changeset
104 public static final int DISP_19_MASK = 0x7FFFF;
a61af66fc99e Initial load
duke
parents:
diff changeset
105
a61af66fc99e Initial load
duke
parents:
diff changeset
106 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
107 * condition code selected for integer branches - cc1 & cc0.
a61af66fc99e Initial load
duke
parents:
diff changeset
108 * condition code selected for float branches - cc1 & cc0.
a61af66fc99e Initial load
duke
parents:
diff changeset
109 * opf_cc field - floating conditional moves - 3 bits.
a61af66fc99e Initial load
duke
parents:
diff changeset
110 * convert 2 bit codes as 3 bit codes always and use following codes
a61af66fc99e Initial load
duke
parents:
diff changeset
111 * uniformly.
a61af66fc99e Initial load
duke
parents:
diff changeset
112 */
a61af66fc99e Initial load
duke
parents:
diff changeset
113
a61af66fc99e Initial load
duke
parents:
diff changeset
114 // opf_cc - 3 bits
a61af66fc99e Initial load
duke
parents:
diff changeset
115 public static final int OPF_CC_START_BIT = 11;
a61af66fc99e Initial load
duke
parents:
diff changeset
116 public static final int OPF_CC_MASK = 7 << OPF_CC_START_BIT;
a61af66fc99e Initial load
duke
parents:
diff changeset
117
a61af66fc99e Initial load
duke
parents:
diff changeset
118 public static final int fcc0 = 0; // 000
a61af66fc99e Initial load
duke
parents:
diff changeset
119 public static final int fcc1 = 1; // 001
a61af66fc99e Initial load
duke
parents:
diff changeset
120 public static final int fcc2 = 2; // 010
a61af66fc99e Initial load
duke
parents:
diff changeset
121 public static final int fcc3 = 3; // 011
a61af66fc99e Initial load
duke
parents:
diff changeset
122 public static final int icc = 4; // 100
a61af66fc99e Initial load
duke
parents:
diff changeset
123 public static final int CFLAG_RESERVED1 = 5; // 101
a61af66fc99e Initial load
duke
parents:
diff changeset
124 public static final int xcc = 6; // 110
a61af66fc99e Initial load
duke
parents:
diff changeset
125 public static final int CFLAG_RESERVED2 = 7; // 111
a61af66fc99e Initial load
duke
parents:
diff changeset
126
a61af66fc99e Initial load
duke
parents:
diff changeset
127 // cc0, cc1 as in integer, float predicted branches
a61af66fc99e Initial load
duke
parents:
diff changeset
128 public static final int BPcc_CC_START_BIT = 20;
a61af66fc99e Initial load
duke
parents:
diff changeset
129 public static final int BPcc_CC_MASK = 3 << BPcc_CC_START_BIT;
a61af66fc99e Initial load
duke
parents:
diff changeset
130 public static final int FBPfcc_CC_START_BIT = BPcc_CC_START_BIT;
a61af66fc99e Initial load
duke
parents:
diff changeset
131 public static final int FBPfcc_CC_MASK = BPcc_CC_MASK;
a61af66fc99e Initial load
duke
parents:
diff changeset
132
a61af66fc99e Initial load
duke
parents:
diff changeset
133 // condition codes for integer branches with prediction - BPcc
a61af66fc99e Initial load
duke
parents:
diff changeset
134 public static final int CONDITION_BPN = CONDITION_BN;
a61af66fc99e Initial load
duke
parents:
diff changeset
135 public static final int CONDITION_BPE = CONDITION_BE;
a61af66fc99e Initial load
duke
parents:
diff changeset
136 public static final int CONDITION_BPLE = CONDITION_BLE;
a61af66fc99e Initial load
duke
parents:
diff changeset
137 public static final int CONDITION_BPL = CONDITION_BL;
a61af66fc99e Initial load
duke
parents:
diff changeset
138 public static final int CONDITION_BPLEU = CONDITION_BLEU;
a61af66fc99e Initial load
duke
parents:
diff changeset
139 public static final int CONDITION_BPCS = CONDITION_BCS;
a61af66fc99e Initial load
duke
parents:
diff changeset
140 public static final int CONDITION_BPNEG = CONDITION_BNEG;
a61af66fc99e Initial load
duke
parents:
diff changeset
141 public static final int CONDITION_BPVS = CONDITION_BVS;
a61af66fc99e Initial load
duke
parents:
diff changeset
142 public static final int CONDITION_BPA = CONDITION_BA;
a61af66fc99e Initial load
duke
parents:
diff changeset
143 public static final int CONDITION_BPNE = CONDITION_BNE;
a61af66fc99e Initial load
duke
parents:
diff changeset
144 public static final int CONDITION_BPG = CONDITION_BG;
a61af66fc99e Initial load
duke
parents:
diff changeset
145 public static final int CONDITION_BPGE = CONDITION_BGE;
a61af66fc99e Initial load
duke
parents:
diff changeset
146 public static final int CONDITION_BPGU = CONDITION_BGU;
a61af66fc99e Initial load
duke
parents:
diff changeset
147 public static final int CONDITION_BPCC = CONDITION_BCC;
a61af66fc99e Initial load
duke
parents:
diff changeset
148 public static final int CONDITION_BPPOS = CONDITION_BPOS;
a61af66fc99e Initial load
duke
parents:
diff changeset
149 public static final int CONDITION_BPVC = CONDITION_BVC;
a61af66fc99e Initial load
duke
parents:
diff changeset
150
a61af66fc99e Initial load
duke
parents:
diff changeset
151 // condition codes for float branches with prediction
a61af66fc99e Initial load
duke
parents:
diff changeset
152 public static final int CONDITION_FBPN = CONDITION_BN;
a61af66fc99e Initial load
duke
parents:
diff changeset
153 public static final int CONDITION_FBPNE = CONDITION_BE;
a61af66fc99e Initial load
duke
parents:
diff changeset
154 public static final int CONDITION_FBPLG = CONDITION_BLE;
a61af66fc99e Initial load
duke
parents:
diff changeset
155 public static final int CONDITION_FBPUL = CONDITION_BL;
a61af66fc99e Initial load
duke
parents:
diff changeset
156 public static final int CONDITION_FBPL = CONDITION_BLEU;
a61af66fc99e Initial load
duke
parents:
diff changeset
157 public static final int CONDITION_FBPUG = CONDITION_BCS;
a61af66fc99e Initial load
duke
parents:
diff changeset
158 public static final int CONDITION_FBPG = CONDITION_BNEG;
a61af66fc99e Initial load
duke
parents:
diff changeset
159 public static final int CONDITION_FBPU = CONDITION_BVS;
a61af66fc99e Initial load
duke
parents:
diff changeset
160 public static final int CONDITION_FBPA = CONDITION_BA;
a61af66fc99e Initial load
duke
parents:
diff changeset
161 public static final int CONDITION_FBPE = CONDITION_BNE;
a61af66fc99e Initial load
duke
parents:
diff changeset
162 public static final int CONDITION_FBPUE = CONDITION_BG;
a61af66fc99e Initial load
duke
parents:
diff changeset
163 public static final int CONDITION_FBPGE = CONDITION_BGE;
a61af66fc99e Initial load
duke
parents:
diff changeset
164 public static final int CONDITION_FBPUGE= CONDITION_BGU;
a61af66fc99e Initial load
duke
parents:
diff changeset
165 public static final int CONDITION_FBPLE = CONDITION_BCC;
a61af66fc99e Initial load
duke
parents:
diff changeset
166 public static final int CONDITION_FBPULE= CONDITION_BPOS;
a61af66fc99e Initial load
duke
parents:
diff changeset
167 public static final int CONDITION_FBPO = CONDITION_BVC;
a61af66fc99e Initial load
duke
parents:
diff changeset
168
a61af66fc99e Initial load
duke
parents:
diff changeset
169 // "cmask" - 3 bit mask used in membar for completion constraints
a61af66fc99e Initial load
duke
parents:
diff changeset
170 public static final int CMASK_START_BIT = 4;
a61af66fc99e Initial load
duke
parents:
diff changeset
171 public static final int CMASK_MASK = 7 << CMASK_START_BIT;
a61af66fc99e Initial load
duke
parents:
diff changeset
172
a61af66fc99e Initial load
duke
parents:
diff changeset
173 // "mmask" - 4 bit mask used in member for ordering instruction classes.
a61af66fc99e Initial load
duke
parents:
diff changeset
174 public static final int MMASK_START_BIT = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
175 public static final int MMASK_MASK = 0xF; // no need to shift
a61af66fc99e Initial load
duke
parents:
diff changeset
176
a61af66fc99e Initial load
duke
parents:
diff changeset
177 // v9 specific load/store instruction opcodes
a61af66fc99e Initial load
duke
parents:
diff changeset
178 // load/store instructions - op3 values - used with op=3 (FORMAT_3)
a61af66fc99e Initial load
duke
parents:
diff changeset
179
a61af66fc99e Initial load
duke
parents:
diff changeset
180 public static final int LDUW = LD;
a61af66fc99e Initial load
duke
parents:
diff changeset
181 public static final int LDUWA = LDA;
a61af66fc99e Initial load
duke
parents:
diff changeset
182
a61af66fc99e Initial load
duke
parents:
diff changeset
183 public static final int LDXFSR = LDFSR;
a61af66fc99e Initial load
duke
parents:
diff changeset
184
a61af66fc99e Initial load
duke
parents:
diff changeset
185 public static final int LDFA = LDC;
a61af66fc99e Initial load
duke
parents:
diff changeset
186 public static final int LDQF = (2 << 4) | 2;
a61af66fc99e Initial load
duke
parents:
diff changeset
187 public static final int LDQFA = (3 << 4) | 2;
a61af66fc99e Initial load
duke
parents:
diff changeset
188 public static final int LDDFA = LDDC;
a61af66fc99e Initial load
duke
parents:
diff changeset
189
a61af66fc99e Initial load
duke
parents:
diff changeset
190 public static final int STW = ST;
a61af66fc99e Initial load
duke
parents:
diff changeset
191 public static final int STWA = STA;
a61af66fc99e Initial load
duke
parents:
diff changeset
192 public static final int STFA = STC;
a61af66fc99e Initial load
duke
parents:
diff changeset
193
a61af66fc99e Initial load
duke
parents:
diff changeset
194 public static final int STXFSR = STFSR;
a61af66fc99e Initial load
duke
parents:
diff changeset
195
a61af66fc99e Initial load
duke
parents:
diff changeset
196 public static final int STQF = STDFQ;
a61af66fc99e Initial load
duke
parents:
diff changeset
197 public static final int STQFA = STDCQ;
a61af66fc99e Initial load
duke
parents:
diff changeset
198 public static final int STDFA = STDC;
a61af66fc99e Initial load
duke
parents:
diff changeset
199
a61af66fc99e Initial load
duke
parents:
diff changeset
200 public static final int LDSW = 8;
a61af66fc99e Initial load
duke
parents:
diff changeset
201 public static final int LDSWA = (1 << 4) | 8;
a61af66fc99e Initial load
duke
parents:
diff changeset
202
a61af66fc99e Initial load
duke
parents:
diff changeset
203 public static final int LDX = 0xB;
a61af66fc99e Initial load
duke
parents:
diff changeset
204 public static final int LDXA = (1 << 4) | 0xB;
a61af66fc99e Initial load
duke
parents:
diff changeset
205
a61af66fc99e Initial load
duke
parents:
diff changeset
206 public static final int PREFETCH = (2 << 4) | 0xD;
a61af66fc99e Initial load
duke
parents:
diff changeset
207 public static final int PREFETCHA = (3 << 4) | 0xD;
a61af66fc99e Initial load
duke
parents:
diff changeset
208
a61af66fc99e Initial load
duke
parents:
diff changeset
209 public static final int CASA = (3 << 4) | 0xC;
a61af66fc99e Initial load
duke
parents:
diff changeset
210
a61af66fc99e Initial load
duke
parents:
diff changeset
211 public static final int STX = 0xE;
a61af66fc99e Initial load
duke
parents:
diff changeset
212 public static final int STXA = (1 << 4) | 0xE;
a61af66fc99e Initial load
duke
parents:
diff changeset
213 public static final int CASXA = (3 << 4) | 0xE;
a61af66fc99e Initial load
duke
parents:
diff changeset
214
a61af66fc99e Initial load
duke
parents:
diff changeset
215 // 6 bit immediate shift count mask
a61af66fc99e Initial load
duke
parents:
diff changeset
216 public static final int SHIFT_COUNT_6_MASK = 0x3F;
a61af66fc99e Initial load
duke
parents:
diff changeset
217
a61af66fc99e Initial load
duke
parents:
diff changeset
218 // X bit mask - used to differentiate b/w 32 bit and 64 bit shifts
a61af66fc99e Initial load
duke
parents:
diff changeset
219 public static final int X_MASK = 1 << 12;
a61af66fc99e Initial load
duke
parents:
diff changeset
220
a61af66fc99e Initial load
duke
parents:
diff changeset
221 // E Opcode maps - Page 274 - Table 32 - op3 (op=2) table
a61af66fc99e Initial load
duke
parents:
diff changeset
222 // v9 specific items
a61af66fc99e Initial load
duke
parents:
diff changeset
223 public static final int ADDC = ADDX;
a61af66fc99e Initial load
duke
parents:
diff changeset
224 public static final int ADDCcc = ADDXcc;
a61af66fc99e Initial load
duke
parents:
diff changeset
225
a61af66fc99e Initial load
duke
parents:
diff changeset
226 public static final int SUBC = SUBX;
a61af66fc99e Initial load
duke
parents:
diff changeset
227 public static final int SUBCcc = SUBXcc;
a61af66fc99e Initial load
duke
parents:
diff changeset
228
a61af66fc99e Initial load
duke
parents:
diff changeset
229 public static final int MULX = 9;
a61af66fc99e Initial load
duke
parents:
diff changeset
230 public static final int UDIVX = 0xD;
a61af66fc99e Initial load
duke
parents:
diff changeset
231
a61af66fc99e Initial load
duke
parents:
diff changeset
232 public static final int SLLX = SLL;
a61af66fc99e Initial load
duke
parents:
diff changeset
233 public static final int SRLX = SRL;
a61af66fc99e Initial load
duke
parents:
diff changeset
234 public static final int SRAX = SRA;
a61af66fc99e Initial load
duke
parents:
diff changeset
235
a61af66fc99e Initial load
duke
parents:
diff changeset
236 // special register reads
a61af66fc99e Initial load
duke
parents:
diff changeset
237 public static final int RDCCR = RDY;
a61af66fc99e Initial load
duke
parents:
diff changeset
238 public static final int RDASI = RDY;
a61af66fc99e Initial load
duke
parents:
diff changeset
239 public static final int RDTICK = RDY;
a61af66fc99e Initial load
duke
parents:
diff changeset
240 public static final int RDPC = RDY;
a61af66fc99e Initial load
duke
parents:
diff changeset
241 public static final int RDFPRS = RDY;
a61af66fc99e Initial load
duke
parents:
diff changeset
242 public static final int MEMBAR = RDY;
a61af66fc99e Initial load
duke
parents:
diff changeset
243 public static final int STMBAR = RDY;
a61af66fc99e Initial load
duke
parents:
diff changeset
244
a61af66fc99e Initial load
duke
parents:
diff changeset
245 public static final int RDPR = (2 << 4) | 0xA;
a61af66fc99e Initial load
duke
parents:
diff changeset
246
a61af66fc99e Initial load
duke
parents:
diff changeset
247 public static final int FLUSHW = (2 << 4) | 0xB;
a61af66fc99e Initial load
duke
parents:
diff changeset
248
a61af66fc99e Initial load
duke
parents:
diff changeset
249 public static final int MOVcc = (2 << 4) | 0xC;
a61af66fc99e Initial load
duke
parents:
diff changeset
250
a61af66fc99e Initial load
duke
parents:
diff changeset
251 public static final int SDIVX = (2 << 4) | 0xD;
a61af66fc99e Initial load
duke
parents:
diff changeset
252
a61af66fc99e Initial load
duke
parents:
diff changeset
253 public static final int POPC = (2 << 4) | 0xE;
a61af66fc99e Initial load
duke
parents:
diff changeset
254
a61af66fc99e Initial load
duke
parents:
diff changeset
255 public static final int MOVr = (2 << 4) | 0xF;
a61af66fc99e Initial load
duke
parents:
diff changeset
256
a61af66fc99e Initial load
duke
parents:
diff changeset
257 // special regitser writes
a61af66fc99e Initial load
duke
parents:
diff changeset
258 public static final int WRCCR = WRY;
a61af66fc99e Initial load
duke
parents:
diff changeset
259 public static final int WRASI = WRY;
a61af66fc99e Initial load
duke
parents:
diff changeset
260 public static final int WRFPRS = WRY;
a61af66fc99e Initial load
duke
parents:
diff changeset
261 public static final int SIR = WRY;
a61af66fc99e Initial load
duke
parents:
diff changeset
262
a61af66fc99e Initial load
duke
parents:
diff changeset
263 public static final int SAVED = (3 << 4) | 0x1;
a61af66fc99e Initial load
duke
parents:
diff changeset
264 public static final int RESTORED = SAVED;
a61af66fc99e Initial load
duke
parents:
diff changeset
265
a61af66fc99e Initial load
duke
parents:
diff changeset
266 public static final int WRPR = (3 << 4) | 0x2;
a61af66fc99e Initial load
duke
parents:
diff changeset
267
a61af66fc99e Initial load
duke
parents:
diff changeset
268 public static final int RETURN = RETT;
a61af66fc99e Initial load
duke
parents:
diff changeset
269
a61af66fc99e Initial load
duke
parents:
diff changeset
270 public static final int DONE = (3 << 4) | 0xE;
a61af66fc99e Initial load
duke
parents:
diff changeset
271 public static final int RETRY = DONE;
a61af66fc99e Initial load
duke
parents:
diff changeset
272
a61af66fc99e Initial load
duke
parents:
diff changeset
273 // various integer condition code move instructions
a61af66fc99e Initial load
duke
parents:
diff changeset
274 public static final int CONDITION_MOVN = CONDITION_BN;
a61af66fc99e Initial load
duke
parents:
diff changeset
275 public static final int CONDITION_MOVE = CONDITION_BE;
a61af66fc99e Initial load
duke
parents:
diff changeset
276 public static final int CONDITION_MOVLE = CONDITION_BLE;
a61af66fc99e Initial load
duke
parents:
diff changeset
277 public static final int CONDITION_MOVL = CONDITION_BL;
a61af66fc99e Initial load
duke
parents:
diff changeset
278 public static final int CONDITION_MOVLEU = CONDITION_BLEU;
a61af66fc99e Initial load
duke
parents:
diff changeset
279 public static final int CONDITION_MOVCS = CONDITION_BCS;
a61af66fc99e Initial load
duke
parents:
diff changeset
280 public static final int CONDITION_MOVNEG = CONDITION_BNEG;
a61af66fc99e Initial load
duke
parents:
diff changeset
281 public static final int CONDITION_MOVVS = CONDITION_BVS;
a61af66fc99e Initial load
duke
parents:
diff changeset
282 public static final int CONDITION_MOVA = CONDITION_BA;
a61af66fc99e Initial load
duke
parents:
diff changeset
283 public static final int CONDITION_MOVNE = CONDITION_BNE;
a61af66fc99e Initial load
duke
parents:
diff changeset
284 public static final int CONDITION_MOVG = CONDITION_BG;
a61af66fc99e Initial load
duke
parents:
diff changeset
285 public static final int CONDITION_MOVGE = CONDITION_BGE;
a61af66fc99e Initial load
duke
parents:
diff changeset
286 public static final int CONDITION_MOVGU = CONDITION_BGU;
a61af66fc99e Initial load
duke
parents:
diff changeset
287 public static final int CONDITION_MOVCC = CONDITION_BCC;
a61af66fc99e Initial load
duke
parents:
diff changeset
288 public static final int CONDITION_MOVPOS = CONDITION_BPOS;
a61af66fc99e Initial load
duke
parents:
diff changeset
289 public static final int CONDITION_MOVVC = CONDITION_BVC;
a61af66fc99e Initial load
duke
parents:
diff changeset
290
a61af66fc99e Initial load
duke
parents:
diff changeset
291 // cc0, cc1 & cc2 in conditional moves
a61af66fc99e Initial load
duke
parents:
diff changeset
292 public static final int CMOVE_CC_START_BIT = 11;
a61af66fc99e Initial load
duke
parents:
diff changeset
293 public static final int CMOVE_CC0_CC1_MASK = 3 << CMOVE_CC_START_BIT;
a61af66fc99e Initial load
duke
parents:
diff changeset
294 public static final int CMOVE_CC2_START_BIT = 18;
a61af66fc99e Initial load
duke
parents:
diff changeset
295 public static final int CMOVE_CC2_MASK = 1 << CMOVE_CC2_START_BIT;
a61af66fc99e Initial load
duke
parents:
diff changeset
296
a61af66fc99e Initial load
duke
parents:
diff changeset
297 public static final int CMOVE_COND_START_BIT = 14;
a61af66fc99e Initial load
duke
parents:
diff changeset
298 // condition code is 4 bits
a61af66fc99e Initial load
duke
parents:
diff changeset
299 public static final int CMOVE_COND_MASK = 0xF << CMOVE_COND_START_BIT;
a61af66fc99e Initial load
duke
parents:
diff changeset
300
a61af66fc99e Initial load
duke
parents:
diff changeset
301 // opf[8:0] (op=2,op3=0x34=FPop1) - Table 34 - Page 276 - E Opcode Maps
a61af66fc99e Initial load
duke
parents:
diff changeset
302 // v9 specific opcodes only - remaining are in SPARCOpcodes.
a61af66fc99e Initial load
duke
parents:
diff changeset
303
a61af66fc99e Initial load
duke
parents:
diff changeset
304 public static final int FMOVd = 0x2;
a61af66fc99e Initial load
duke
parents:
diff changeset
305 public static final int FMOVq = 0x3;
a61af66fc99e Initial load
duke
parents:
diff changeset
306 public static final int FNEGd = 0x6;
a61af66fc99e Initial load
duke
parents:
diff changeset
307 public static final int FNEGq = 0x7;
a61af66fc99e Initial load
duke
parents:
diff changeset
308 public static final int FABSd = 0xA;
a61af66fc99e Initial load
duke
parents:
diff changeset
309 public static final int FABSq = 0xB;
a61af66fc99e Initial load
duke
parents:
diff changeset
310 public static final int FsTOx = (0x8 << 4) | 0x1;
a61af66fc99e Initial load
duke
parents:
diff changeset
311 public static final int FdTOx = (0x8 << 4) | 0x2;
a61af66fc99e Initial load
duke
parents:
diff changeset
312 public static final int FqTOx = (0x8 << 4) | 0x3;
a61af66fc99e Initial load
duke
parents:
diff changeset
313 public static final int FxTOs = (0x8 << 4) | 0x4;
a61af66fc99e Initial load
duke
parents:
diff changeset
314 public static final int FxTOd = (0x8 << 4) | 0x8;
a61af66fc99e Initial load
duke
parents:
diff changeset
315 public static final int FxTOq = (0x8 << 4) | 0xC;
a61af66fc99e Initial load
duke
parents:
diff changeset
316
a61af66fc99e Initial load
duke
parents:
diff changeset
317 // opf[8:0] (op=2, op3=0x35= FPop2) - Table 35 - Page 277 - E.2 Tables
a61af66fc99e Initial load
duke
parents:
diff changeset
318 // v9 specific opcodes only 0 remanining are in SPARCOpcodes.
a61af66fc99e Initial load
duke
parents:
diff changeset
319
a61af66fc99e Initial load
duke
parents:
diff changeset
320 // fp condition moves
a61af66fc99e Initial load
duke
parents:
diff changeset
321
a61af66fc99e Initial load
duke
parents:
diff changeset
322 public static final int FMOVs_fcc0 = 1;
a61af66fc99e Initial load
duke
parents:
diff changeset
323 public static final int FMOVs_fcc1 = 1 | (0x4 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
324 public static final int FMOVs_fcc2 = 1 | (0x8 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
325 public static final int FMOVs_fcc3 = 1 | (0xC << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
326 public static final int FMOVs_icc = 1 | (0x10 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
327 public static final int FMOVs_xcc = 1 | (0x18 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
328
a61af66fc99e Initial load
duke
parents:
diff changeset
329 public static final int FMOVd_fcc0 = 2;
a61af66fc99e Initial load
duke
parents:
diff changeset
330 public static final int FMOVd_fcc1 = 2 | (0x4 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
331 public static final int FMOVd_fcc2 = 2 | (0x8 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
332 public static final int FMOVd_fcc3 = 2 | (0xC << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
333 public static final int FMOVd_icc = 2 | (0x10 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
334 public static final int FMOVd_xcc = 2 | (0x18 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
335
a61af66fc99e Initial load
duke
parents:
diff changeset
336 public static final int FMOVq_fcc0 = 3;
a61af66fc99e Initial load
duke
parents:
diff changeset
337 public static final int FMOVq_fcc1 = 3 | (0x4 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
338 public static final int FMOVq_fcc2 = 3 | (0x8 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
339 public static final int FMOVq_fcc3 = 3 | (0xC << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
340 public static final int FMOVq_icc = 3 | (0x10 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
341 public static final int FMOVq_xcc = 3 | (0x18 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
342
a61af66fc99e Initial load
duke
parents:
diff changeset
343 // fp register condition moves
a61af66fc99e Initial load
duke
parents:
diff changeset
344
a61af66fc99e Initial load
duke
parents:
diff changeset
345 public static final int FMOVRsZ = 5 | (0x2 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
346 public static final int FMOVRsLEZ = 5 | (0x4 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
347 public static final int FMOVRsLZ = 5 | (0x6 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
348 public static final int FMOVRsNZ = 5 | (0xA << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
349 public static final int FMOVRsGZ = 5 | (0xC << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
350 public static final int FMOVRsGEZ = 5 | (0xE << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
351
a61af66fc99e Initial load
duke
parents:
diff changeset
352 public static final int FMOVRdZ = 6 | (0x2 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
353 public static final int FMOVRdLEZ = 6 | (0x4 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
354 public static final int FMOVRdLZ = 6 | (0x6 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
355 public static final int FMOVRdNZ = 6 | (0xA << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
356 public static final int FMOVRdGZ = 6 | (0xC << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
357 public static final int FMOVRdGEZ = 6 | (0xE << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
358
a61af66fc99e Initial load
duke
parents:
diff changeset
359 public static final int FMOVRqZ = 7 | (0x2 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
360 public static final int FMOVRqLEZ = 7 | (0x4 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
361 public static final int FMOVRqLZ = 7 | (0x6 << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
362 public static final int FMOVRqNZ = 7 | (0xA << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
363 public static final int FMOVRqGZ = 7 | (0xC << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
364 public static final int FMOVRqGEZ = 7 | (0xE << 4);
a61af66fc99e Initial load
duke
parents:
diff changeset
365 }