annotate src/share/vm/opto/vectornode.cpp @ 4710:41406797186b

7113012: G1: rename not-fully-young GCs as "mixed" Summary: Renamed partially-young GCs as mixed and fully-young GCs as young. Change all external output that includes those terms (GC log and GC ergo log) as well as any comments, fields, methods, etc. The changeset also includes very minor code tidying up (added some curly brackets). Reviewed-by: johnc, brutisso
author tonyp
date Fri, 16 Dec 2011 02:14:27 -0500
parents c7b60b601eb4
children 8c92982cbbc4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
2 * Copyright (c) 2007, 2010, 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: 579
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 579
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: 579
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 */
a61af66fc99e Initial load
duke
parents:
diff changeset
23
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
24 #include "precompiled.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
25 #include "memory/allocation.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
26 #include "opto/connode.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
27 #include "opto/vectornode.hpp"
0
a61af66fc99e Initial load
duke
parents:
diff changeset
28
a61af66fc99e Initial load
duke
parents:
diff changeset
29 //------------------------------VectorNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
30
a61af66fc99e Initial load
duke
parents:
diff changeset
31 // Return vector type for an element type and vector length.
a61af66fc99e Initial load
duke
parents:
diff changeset
32 const Type* VectorNode::vect_type(BasicType elt_bt, uint len) {
a61af66fc99e Initial load
duke
parents:
diff changeset
33 assert(len <= VectorNode::max_vlen(elt_bt), "len in range");
a61af66fc99e Initial load
duke
parents:
diff changeset
34 switch(elt_bt) {
a61af66fc99e Initial load
duke
parents:
diff changeset
35 case T_BOOLEAN:
a61af66fc99e Initial load
duke
parents:
diff changeset
36 case T_BYTE:
a61af66fc99e Initial load
duke
parents:
diff changeset
37 switch(len) {
a61af66fc99e Initial load
duke
parents:
diff changeset
38 case 2: return TypeInt::CHAR;
a61af66fc99e Initial load
duke
parents:
diff changeset
39 case 4: return TypeInt::INT;
a61af66fc99e Initial load
duke
parents:
diff changeset
40 case 8: return TypeLong::LONG;
a61af66fc99e Initial load
duke
parents:
diff changeset
41 }
a61af66fc99e Initial load
duke
parents:
diff changeset
42 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
43 case T_CHAR:
a61af66fc99e Initial load
duke
parents:
diff changeset
44 case T_SHORT:
a61af66fc99e Initial load
duke
parents:
diff changeset
45 switch(len) {
a61af66fc99e Initial load
duke
parents:
diff changeset
46 case 2: return TypeInt::INT;
a61af66fc99e Initial load
duke
parents:
diff changeset
47 case 4: return TypeLong::LONG;
a61af66fc99e Initial load
duke
parents:
diff changeset
48 }
a61af66fc99e Initial load
duke
parents:
diff changeset
49 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
50 case T_INT:
a61af66fc99e Initial load
duke
parents:
diff changeset
51 switch(len) {
a61af66fc99e Initial load
duke
parents:
diff changeset
52 case 2: return TypeLong::LONG;
a61af66fc99e Initial load
duke
parents:
diff changeset
53 }
a61af66fc99e Initial load
duke
parents:
diff changeset
54 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
55 case T_LONG:
a61af66fc99e Initial load
duke
parents:
diff changeset
56 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
57 case T_FLOAT:
a61af66fc99e Initial load
duke
parents:
diff changeset
58 switch(len) {
a61af66fc99e Initial load
duke
parents:
diff changeset
59 case 2: return Type::DOUBLE;
a61af66fc99e Initial load
duke
parents:
diff changeset
60 }
a61af66fc99e Initial load
duke
parents:
diff changeset
61 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
62 case T_DOUBLE:
a61af66fc99e Initial load
duke
parents:
diff changeset
63 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
64 }
a61af66fc99e Initial load
duke
parents:
diff changeset
65 ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
66 return NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
67 }
a61af66fc99e Initial load
duke
parents:
diff changeset
68
a61af66fc99e Initial load
duke
parents:
diff changeset
69 // Scalar promotion
a61af66fc99e Initial load
duke
parents:
diff changeset
70 VectorNode* VectorNode::scalar2vector(Compile* C, Node* s, uint vlen, const Type* opd_t) {
a61af66fc99e Initial load
duke
parents:
diff changeset
71 BasicType bt = opd_t->array_element_basic_type();
a61af66fc99e Initial load
duke
parents:
diff changeset
72 assert(vlen <= VectorNode::max_vlen(bt), "vlen in range");
a61af66fc99e Initial load
duke
parents:
diff changeset
73 switch (bt) {
a61af66fc99e Initial load
duke
parents:
diff changeset
74 case T_BOOLEAN:
a61af66fc99e Initial load
duke
parents:
diff changeset
75 case T_BYTE:
a61af66fc99e Initial load
duke
parents:
diff changeset
76 if (vlen == 16) return new (C, 2) Replicate16BNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
77 if (vlen == 8) return new (C, 2) Replicate8BNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
78 if (vlen == 4) return new (C, 2) Replicate4BNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
79 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
80 case T_CHAR:
a61af66fc99e Initial load
duke
parents:
diff changeset
81 if (vlen == 8) return new (C, 2) Replicate8CNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
82 if (vlen == 4) return new (C, 2) Replicate4CNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
83 if (vlen == 2) return new (C, 2) Replicate2CNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
84 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
85 case T_SHORT:
a61af66fc99e Initial load
duke
parents:
diff changeset
86 if (vlen == 8) return new (C, 2) Replicate8SNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
87 if (vlen == 4) return new (C, 2) Replicate4SNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
88 if (vlen == 2) return new (C, 2) Replicate2SNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
89 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
90 case T_INT:
a61af66fc99e Initial load
duke
parents:
diff changeset
91 if (vlen == 4) return new (C, 2) Replicate4INode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
92 if (vlen == 2) return new (C, 2) Replicate2INode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
93 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
94 case T_LONG:
a61af66fc99e Initial load
duke
parents:
diff changeset
95 if (vlen == 2) return new (C, 2) Replicate2LNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
96 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
97 case T_FLOAT:
a61af66fc99e Initial load
duke
parents:
diff changeset
98 if (vlen == 4) return new (C, 2) Replicate4FNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
99 if (vlen == 2) return new (C, 2) Replicate2FNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
100 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
101 case T_DOUBLE:
a61af66fc99e Initial load
duke
parents:
diff changeset
102 if (vlen == 2) return new (C, 2) Replicate2DNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
103 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
104 }
a61af66fc99e Initial load
duke
parents:
diff changeset
105 ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
106 return NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
107 }
a61af66fc99e Initial load
duke
parents:
diff changeset
108
a61af66fc99e Initial load
duke
parents:
diff changeset
109 // Return initial Pack node. Additional operands added with add_opd() calls.
a61af66fc99e Initial load
duke
parents:
diff changeset
110 PackNode* PackNode::make(Compile* C, Node* s, const Type* opd_t) {
a61af66fc99e Initial load
duke
parents:
diff changeset
111 BasicType bt = opd_t->array_element_basic_type();
a61af66fc99e Initial load
duke
parents:
diff changeset
112 switch (bt) {
a61af66fc99e Initial load
duke
parents:
diff changeset
113 case T_BOOLEAN:
a61af66fc99e Initial load
duke
parents:
diff changeset
114 case T_BYTE:
a61af66fc99e Initial load
duke
parents:
diff changeset
115 return new (C, 2) PackBNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
116 case T_CHAR:
a61af66fc99e Initial load
duke
parents:
diff changeset
117 return new (C, 2) PackCNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
118 case T_SHORT:
a61af66fc99e Initial load
duke
parents:
diff changeset
119 return new (C, 2) PackSNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
120 case T_INT:
a61af66fc99e Initial load
duke
parents:
diff changeset
121 return new (C, 2) PackINode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
122 case T_LONG:
a61af66fc99e Initial load
duke
parents:
diff changeset
123 return new (C, 2) PackLNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
124 case T_FLOAT:
a61af66fc99e Initial load
duke
parents:
diff changeset
125 return new (C, 2) PackFNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
126 case T_DOUBLE:
a61af66fc99e Initial load
duke
parents:
diff changeset
127 return new (C, 2) PackDNode(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
128 }
a61af66fc99e Initial load
duke
parents:
diff changeset
129 ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
130 return NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
131 }
a61af66fc99e Initial load
duke
parents:
diff changeset
132
a61af66fc99e Initial load
duke
parents:
diff changeset
133 // Create a binary tree form for Packs. [lo, hi) (half-open) range
a61af66fc99e Initial load
duke
parents:
diff changeset
134 Node* PackNode::binaryTreePack(Compile* C, int lo, int hi) {
a61af66fc99e Initial load
duke
parents:
diff changeset
135 int ct = hi - lo;
a61af66fc99e Initial load
duke
parents:
diff changeset
136 assert(is_power_of_2(ct), "power of 2");
a61af66fc99e Initial load
duke
parents:
diff changeset
137 int mid = lo + ct/2;
a61af66fc99e Initial load
duke
parents:
diff changeset
138 Node* n1 = ct == 2 ? in(lo) : binaryTreePack(C, lo, mid);
a61af66fc99e Initial load
duke
parents:
diff changeset
139 Node* n2 = ct == 2 ? in(lo+1) : binaryTreePack(C, mid, hi );
29
d5fc211aea19 6633953: type2aelembytes{T_ADDRESS} should be 8 bytes in 64 bit VM
kvn
parents: 0
diff changeset
140 int rslt_bsize = ct * type2aelembytes(elt_basic_type());
0
a61af66fc99e Initial load
duke
parents:
diff changeset
141 if (bottom_type()->is_floatingpoint()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
142 switch (rslt_bsize) {
a61af66fc99e Initial load
duke
parents:
diff changeset
143 case 8: return new (C, 3) PackFNode(n1, n2);
a61af66fc99e Initial load
duke
parents:
diff changeset
144 case 16: return new (C, 3) PackDNode(n1, n2);
a61af66fc99e Initial load
duke
parents:
diff changeset
145 }
a61af66fc99e Initial load
duke
parents:
diff changeset
146 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
147 assert(bottom_type()->isa_int() || bottom_type()->isa_long(), "int or long");
a61af66fc99e Initial load
duke
parents:
diff changeset
148 switch (rslt_bsize) {
a61af66fc99e Initial load
duke
parents:
diff changeset
149 case 2: return new (C, 3) Pack2x1BNode(n1, n2);
a61af66fc99e Initial load
duke
parents:
diff changeset
150 case 4: return new (C, 3) Pack2x2BNode(n1, n2);
a61af66fc99e Initial load
duke
parents:
diff changeset
151 case 8: return new (C, 3) PackINode(n1, n2);
a61af66fc99e Initial load
duke
parents:
diff changeset
152 case 16: return new (C, 3) PackLNode(n1, n2);
a61af66fc99e Initial load
duke
parents:
diff changeset
153 }
a61af66fc99e Initial load
duke
parents:
diff changeset
154 }
a61af66fc99e Initial load
duke
parents:
diff changeset
155 ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
156 return NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
157 }
a61af66fc99e Initial load
duke
parents:
diff changeset
158
a61af66fc99e Initial load
duke
parents:
diff changeset
159 // Return the vector operator for the specified scalar operation
a61af66fc99e Initial load
duke
parents:
diff changeset
160 // and vector length. One use is to check if the code generator
a61af66fc99e Initial load
duke
parents:
diff changeset
161 // supports the vector operation.
a61af66fc99e Initial load
duke
parents:
diff changeset
162 int VectorNode::opcode(int sopc, uint vlen, const Type* opd_t) {
a61af66fc99e Initial load
duke
parents:
diff changeset
163 BasicType bt = opd_t->array_element_basic_type();
a61af66fc99e Initial load
duke
parents:
diff changeset
164 if (!(is_power_of_2(vlen) && vlen <= max_vlen(bt)))
a61af66fc99e Initial load
duke
parents:
diff changeset
165 return 0; // unimplemented
a61af66fc99e Initial load
duke
parents:
diff changeset
166 switch (sopc) {
a61af66fc99e Initial load
duke
parents:
diff changeset
167 case Op_AddI:
a61af66fc99e Initial load
duke
parents:
diff changeset
168 switch (bt) {
a61af66fc99e Initial load
duke
parents:
diff changeset
169 case T_BOOLEAN:
a61af66fc99e Initial load
duke
parents:
diff changeset
170 case T_BYTE: return Op_AddVB;
a61af66fc99e Initial load
duke
parents:
diff changeset
171 case T_CHAR: return Op_AddVC;
a61af66fc99e Initial load
duke
parents:
diff changeset
172 case T_SHORT: return Op_AddVS;
a61af66fc99e Initial load
duke
parents:
diff changeset
173 case T_INT: return Op_AddVI;
a61af66fc99e Initial load
duke
parents:
diff changeset
174 }
a61af66fc99e Initial load
duke
parents:
diff changeset
175 ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
176 case Op_AddL:
a61af66fc99e Initial load
duke
parents:
diff changeset
177 assert(bt == T_LONG, "must be");
a61af66fc99e Initial load
duke
parents:
diff changeset
178 return Op_AddVL;
a61af66fc99e Initial load
duke
parents:
diff changeset
179 case Op_AddF:
a61af66fc99e Initial load
duke
parents:
diff changeset
180 assert(bt == T_FLOAT, "must be");
a61af66fc99e Initial load
duke
parents:
diff changeset
181 return Op_AddVF;
a61af66fc99e Initial load
duke
parents:
diff changeset
182 case Op_AddD:
a61af66fc99e Initial load
duke
parents:
diff changeset
183 assert(bt == T_DOUBLE, "must be");
a61af66fc99e Initial load
duke
parents:
diff changeset
184 return Op_AddVD;
a61af66fc99e Initial load
duke
parents:
diff changeset
185 case Op_SubI:
a61af66fc99e Initial load
duke
parents:
diff changeset
186 switch (bt) {
a61af66fc99e Initial load
duke
parents:
diff changeset
187 case T_BOOLEAN:
a61af66fc99e Initial load
duke
parents:
diff changeset
188 case T_BYTE: return Op_SubVB;
a61af66fc99e Initial load
duke
parents:
diff changeset
189 case T_CHAR: return Op_SubVC;
a61af66fc99e Initial load
duke
parents:
diff changeset
190 case T_SHORT: return Op_SubVS;
a61af66fc99e Initial load
duke
parents:
diff changeset
191 case T_INT: return Op_SubVI;
a61af66fc99e Initial load
duke
parents:
diff changeset
192 }
a61af66fc99e Initial load
duke
parents:
diff changeset
193 ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
194 case Op_SubL:
a61af66fc99e Initial load
duke
parents:
diff changeset
195 assert(bt == T_LONG, "must be");
a61af66fc99e Initial load
duke
parents:
diff changeset
196 return Op_SubVL;
a61af66fc99e Initial load
duke
parents:
diff changeset
197 case Op_SubF:
a61af66fc99e Initial load
duke
parents:
diff changeset
198 assert(bt == T_FLOAT, "must be");
a61af66fc99e Initial load
duke
parents:
diff changeset
199 return Op_SubVF;
a61af66fc99e Initial load
duke
parents:
diff changeset
200 case Op_SubD:
a61af66fc99e Initial load
duke
parents:
diff changeset
201 assert(bt == T_DOUBLE, "must be");
a61af66fc99e Initial load
duke
parents:
diff changeset
202 return Op_SubVD;
a61af66fc99e Initial load
duke
parents:
diff changeset
203 case Op_MulF:
a61af66fc99e Initial load
duke
parents:
diff changeset
204 assert(bt == T_FLOAT, "must be");
a61af66fc99e Initial load
duke
parents:
diff changeset
205 return Op_MulVF;
a61af66fc99e Initial load
duke
parents:
diff changeset
206 case Op_MulD:
a61af66fc99e Initial load
duke
parents:
diff changeset
207 assert(bt == T_DOUBLE, "must be");
a61af66fc99e Initial load
duke
parents:
diff changeset
208 return Op_MulVD;
a61af66fc99e Initial load
duke
parents:
diff changeset
209 case Op_DivF:
a61af66fc99e Initial load
duke
parents:
diff changeset
210 assert(bt == T_FLOAT, "must be");
a61af66fc99e Initial load
duke
parents:
diff changeset
211 return Op_DivVF;
a61af66fc99e Initial load
duke
parents:
diff changeset
212 case Op_DivD:
a61af66fc99e Initial load
duke
parents:
diff changeset
213 assert(bt == T_DOUBLE, "must be");
a61af66fc99e Initial load
duke
parents:
diff changeset
214 return Op_DivVD;
a61af66fc99e Initial load
duke
parents:
diff changeset
215 case Op_LShiftI:
a61af66fc99e Initial load
duke
parents:
diff changeset
216 switch (bt) {
a61af66fc99e Initial load
duke
parents:
diff changeset
217 case T_BOOLEAN:
a61af66fc99e Initial load
duke
parents:
diff changeset
218 case T_BYTE: return Op_LShiftVB;
a61af66fc99e Initial load
duke
parents:
diff changeset
219 case T_CHAR: return Op_LShiftVC;
a61af66fc99e Initial load
duke
parents:
diff changeset
220 case T_SHORT: return Op_LShiftVS;
a61af66fc99e Initial load
duke
parents:
diff changeset
221 case T_INT: return Op_LShiftVI;
a61af66fc99e Initial load
duke
parents:
diff changeset
222 }
a61af66fc99e Initial load
duke
parents:
diff changeset
223 ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
224 case Op_URShiftI:
a61af66fc99e Initial load
duke
parents:
diff changeset
225 switch (bt) {
a61af66fc99e Initial load
duke
parents:
diff changeset
226 case T_BOOLEAN:
a61af66fc99e Initial load
duke
parents:
diff changeset
227 case T_BYTE: return Op_URShiftVB;
a61af66fc99e Initial load
duke
parents:
diff changeset
228 case T_CHAR: return Op_URShiftVC;
a61af66fc99e Initial load
duke
parents:
diff changeset
229 case T_SHORT: return Op_URShiftVS;
a61af66fc99e Initial load
duke
parents:
diff changeset
230 case T_INT: return Op_URShiftVI;
a61af66fc99e Initial load
duke
parents:
diff changeset
231 }
a61af66fc99e Initial load
duke
parents:
diff changeset
232 ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
233 case Op_AndI:
a61af66fc99e Initial load
duke
parents:
diff changeset
234 case Op_AndL:
a61af66fc99e Initial load
duke
parents:
diff changeset
235 return Op_AndV;
a61af66fc99e Initial load
duke
parents:
diff changeset
236 case Op_OrI:
a61af66fc99e Initial load
duke
parents:
diff changeset
237 case Op_OrL:
a61af66fc99e Initial load
duke
parents:
diff changeset
238 return Op_OrV;
a61af66fc99e Initial load
duke
parents:
diff changeset
239 case Op_XorI:
a61af66fc99e Initial load
duke
parents:
diff changeset
240 case Op_XorL:
a61af66fc99e Initial load
duke
parents:
diff changeset
241 return Op_XorV;
a61af66fc99e Initial load
duke
parents:
diff changeset
242
a61af66fc99e Initial load
duke
parents:
diff changeset
243 case Op_LoadB:
558
3b5ac9e7e6ea 6796746: rename LoadC (char) opcode class to LoadUS (unsigned short)
twisti
parents: 196
diff changeset
244 case Op_LoadUS:
0
a61af66fc99e Initial load
duke
parents:
diff changeset
245 case Op_LoadS:
a61af66fc99e Initial load
duke
parents:
diff changeset
246 case Op_LoadI:
a61af66fc99e Initial load
duke
parents:
diff changeset
247 case Op_LoadL:
a61af66fc99e Initial load
duke
parents:
diff changeset
248 case Op_LoadF:
a61af66fc99e Initial load
duke
parents:
diff changeset
249 case Op_LoadD:
a61af66fc99e Initial load
duke
parents:
diff changeset
250 return VectorLoadNode::opcode(sopc, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
251
a61af66fc99e Initial load
duke
parents:
diff changeset
252 case Op_StoreB:
a61af66fc99e Initial load
duke
parents:
diff changeset
253 case Op_StoreC:
a61af66fc99e Initial load
duke
parents:
diff changeset
254 case Op_StoreI:
a61af66fc99e Initial load
duke
parents:
diff changeset
255 case Op_StoreL:
a61af66fc99e Initial load
duke
parents:
diff changeset
256 case Op_StoreF:
a61af66fc99e Initial load
duke
parents:
diff changeset
257 case Op_StoreD:
a61af66fc99e Initial load
duke
parents:
diff changeset
258 return VectorStoreNode::opcode(sopc, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
259 }
a61af66fc99e Initial load
duke
parents:
diff changeset
260 return 0; // Unimplemented
a61af66fc99e Initial load
duke
parents:
diff changeset
261 }
a61af66fc99e Initial load
duke
parents:
diff changeset
262
a61af66fc99e Initial load
duke
parents:
diff changeset
263 // Helper for above.
a61af66fc99e Initial load
duke
parents:
diff changeset
264 int VectorLoadNode::opcode(int sopc, uint vlen) {
a61af66fc99e Initial load
duke
parents:
diff changeset
265 switch (sopc) {
a61af66fc99e Initial load
duke
parents:
diff changeset
266 case Op_LoadB:
a61af66fc99e Initial load
duke
parents:
diff changeset
267 switch (vlen) {
a61af66fc99e Initial load
duke
parents:
diff changeset
268 case 2: return 0; // Unimplemented
a61af66fc99e Initial load
duke
parents:
diff changeset
269 case 4: return Op_Load4B;
a61af66fc99e Initial load
duke
parents:
diff changeset
270 case 8: return Op_Load8B;
a61af66fc99e Initial load
duke
parents:
diff changeset
271 case 16: return Op_Load16B;
a61af66fc99e Initial load
duke
parents:
diff changeset
272 }
a61af66fc99e Initial load
duke
parents:
diff changeset
273 break;
558
3b5ac9e7e6ea 6796746: rename LoadC (char) opcode class to LoadUS (unsigned short)
twisti
parents: 196
diff changeset
274 case Op_LoadUS:
0
a61af66fc99e Initial load
duke
parents:
diff changeset
275 switch (vlen) {
a61af66fc99e Initial load
duke
parents:
diff changeset
276 case 2: return Op_Load2C;
a61af66fc99e Initial load
duke
parents:
diff changeset
277 case 4: return Op_Load4C;
a61af66fc99e Initial load
duke
parents:
diff changeset
278 case 8: return Op_Load8C;
a61af66fc99e Initial load
duke
parents:
diff changeset
279 }
a61af66fc99e Initial load
duke
parents:
diff changeset
280 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
281 case Op_LoadS:
a61af66fc99e Initial load
duke
parents:
diff changeset
282 switch (vlen) {
a61af66fc99e Initial load
duke
parents:
diff changeset
283 case 2: return Op_Load2S;
a61af66fc99e Initial load
duke
parents:
diff changeset
284 case 4: return Op_Load4S;
a61af66fc99e Initial load
duke
parents:
diff changeset
285 case 8: return Op_Load8S;
a61af66fc99e Initial load
duke
parents:
diff changeset
286 }
a61af66fc99e Initial load
duke
parents:
diff changeset
287 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
288 case Op_LoadI:
a61af66fc99e Initial load
duke
parents:
diff changeset
289 switch (vlen) {
a61af66fc99e Initial load
duke
parents:
diff changeset
290 case 2: return Op_Load2I;
a61af66fc99e Initial load
duke
parents:
diff changeset
291 case 4: return Op_Load4I;
a61af66fc99e Initial load
duke
parents:
diff changeset
292 }
a61af66fc99e Initial load
duke
parents:
diff changeset
293 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
294 case Op_LoadL:
a61af66fc99e Initial load
duke
parents:
diff changeset
295 if (vlen == 2) return Op_Load2L;
a61af66fc99e Initial load
duke
parents:
diff changeset
296 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
297 case Op_LoadF:
a61af66fc99e Initial load
duke
parents:
diff changeset
298 switch (vlen) {
a61af66fc99e Initial load
duke
parents:
diff changeset
299 case 2: return Op_Load2F;
a61af66fc99e Initial load
duke
parents:
diff changeset
300 case 4: return Op_Load4F;
a61af66fc99e Initial load
duke
parents:
diff changeset
301 }
a61af66fc99e Initial load
duke
parents:
diff changeset
302 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
303 case Op_LoadD:
a61af66fc99e Initial load
duke
parents:
diff changeset
304 if (vlen == 2) return Op_Load2D;
a61af66fc99e Initial load
duke
parents:
diff changeset
305 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
306 }
a61af66fc99e Initial load
duke
parents:
diff changeset
307 return 0; // Unimplemented
a61af66fc99e Initial load
duke
parents:
diff changeset
308 }
a61af66fc99e Initial load
duke
parents:
diff changeset
309
a61af66fc99e Initial load
duke
parents:
diff changeset
310 // Helper for above
a61af66fc99e Initial load
duke
parents:
diff changeset
311 int VectorStoreNode::opcode(int sopc, uint vlen) {
a61af66fc99e Initial load
duke
parents:
diff changeset
312 switch (sopc) {
a61af66fc99e Initial load
duke
parents:
diff changeset
313 case Op_StoreB:
a61af66fc99e Initial load
duke
parents:
diff changeset
314 switch (vlen) {
a61af66fc99e Initial load
duke
parents:
diff changeset
315 case 2: return 0; // Unimplemented
a61af66fc99e Initial load
duke
parents:
diff changeset
316 case 4: return Op_Store4B;
a61af66fc99e Initial load
duke
parents:
diff changeset
317 case 8: return Op_Store8B;
a61af66fc99e Initial load
duke
parents:
diff changeset
318 case 16: return Op_Store16B;
a61af66fc99e Initial load
duke
parents:
diff changeset
319 }
a61af66fc99e Initial load
duke
parents:
diff changeset
320 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
321 case Op_StoreC:
a61af66fc99e Initial load
duke
parents:
diff changeset
322 switch (vlen) {
a61af66fc99e Initial load
duke
parents:
diff changeset
323 case 2: return Op_Store2C;
a61af66fc99e Initial load
duke
parents:
diff changeset
324 case 4: return Op_Store4C;
a61af66fc99e Initial load
duke
parents:
diff changeset
325 case 8: return Op_Store8C;
a61af66fc99e Initial load
duke
parents:
diff changeset
326 }
a61af66fc99e Initial load
duke
parents:
diff changeset
327 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
328 case Op_StoreI:
a61af66fc99e Initial load
duke
parents:
diff changeset
329 switch (vlen) {
a61af66fc99e Initial load
duke
parents:
diff changeset
330 case 2: return Op_Store2I;
a61af66fc99e Initial load
duke
parents:
diff changeset
331 case 4: return Op_Store4I;
a61af66fc99e Initial load
duke
parents:
diff changeset
332 }
a61af66fc99e Initial load
duke
parents:
diff changeset
333 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
334 case Op_StoreL:
a61af66fc99e Initial load
duke
parents:
diff changeset
335 if (vlen == 2) return Op_Store2L;
a61af66fc99e Initial load
duke
parents:
diff changeset
336 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
337 case Op_StoreF:
a61af66fc99e Initial load
duke
parents:
diff changeset
338 switch (vlen) {
a61af66fc99e Initial load
duke
parents:
diff changeset
339 case 2: return Op_Store2F;
a61af66fc99e Initial load
duke
parents:
diff changeset
340 case 4: return Op_Store4F;
a61af66fc99e Initial load
duke
parents:
diff changeset
341 }
a61af66fc99e Initial load
duke
parents:
diff changeset
342 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
343 case Op_StoreD:
a61af66fc99e Initial load
duke
parents:
diff changeset
344 if (vlen == 2) return Op_Store2D;
a61af66fc99e Initial load
duke
parents:
diff changeset
345 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
346 }
a61af66fc99e Initial load
duke
parents:
diff changeset
347 return 0; // Unimplemented
a61af66fc99e Initial load
duke
parents:
diff changeset
348 }
a61af66fc99e Initial load
duke
parents:
diff changeset
349
a61af66fc99e Initial load
duke
parents:
diff changeset
350 // Return the vector version of a scalar operation node.
a61af66fc99e Initial load
duke
parents:
diff changeset
351 VectorNode* VectorNode::make(Compile* C, int sopc, Node* n1, Node* n2, uint vlen, const Type* opd_t) {
a61af66fc99e Initial load
duke
parents:
diff changeset
352 int vopc = opcode(sopc, vlen, opd_t);
a61af66fc99e Initial load
duke
parents:
diff changeset
353
a61af66fc99e Initial load
duke
parents:
diff changeset
354 switch (vopc) {
a61af66fc99e Initial load
duke
parents:
diff changeset
355 case Op_AddVB: return new (C, 3) AddVBNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
356 case Op_AddVC: return new (C, 3) AddVCNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
357 case Op_AddVS: return new (C, 3) AddVSNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
358 case Op_AddVI: return new (C, 3) AddVINode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
359 case Op_AddVL: return new (C, 3) AddVLNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
360 case Op_AddVF: return new (C, 3) AddVFNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
361 case Op_AddVD: return new (C, 3) AddVDNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
362
a61af66fc99e Initial load
duke
parents:
diff changeset
363 case Op_SubVB: return new (C, 3) SubVBNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
364 case Op_SubVC: return new (C, 3) SubVCNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
365 case Op_SubVS: return new (C, 3) SubVSNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
366 case Op_SubVI: return new (C, 3) SubVINode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
367 case Op_SubVL: return new (C, 3) SubVLNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
368 case Op_SubVF: return new (C, 3) SubVFNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
369 case Op_SubVD: return new (C, 3) SubVDNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
370
a61af66fc99e Initial load
duke
parents:
diff changeset
371 case Op_MulVF: return new (C, 3) MulVFNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
372 case Op_MulVD: return new (C, 3) MulVDNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
373
a61af66fc99e Initial load
duke
parents:
diff changeset
374 case Op_DivVF: return new (C, 3) DivVFNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
375 case Op_DivVD: return new (C, 3) DivVDNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
376
a61af66fc99e Initial load
duke
parents:
diff changeset
377 case Op_LShiftVB: return new (C, 3) LShiftVBNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
378 case Op_LShiftVC: return new (C, 3) LShiftVCNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
379 case Op_LShiftVS: return new (C, 3) LShiftVSNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
380 case Op_LShiftVI: return new (C, 3) LShiftVINode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
381
a61af66fc99e Initial load
duke
parents:
diff changeset
382 case Op_URShiftVB: return new (C, 3) URShiftVBNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
383 case Op_URShiftVC: return new (C, 3) URShiftVCNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
384 case Op_URShiftVS: return new (C, 3) URShiftVSNode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
385 case Op_URShiftVI: return new (C, 3) URShiftVINode(n1, n2, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
386
a61af66fc99e Initial load
duke
parents:
diff changeset
387 case Op_AndV: return new (C, 3) AndVNode(n1, n2, vlen, opd_t->array_element_basic_type());
a61af66fc99e Initial load
duke
parents:
diff changeset
388 case Op_OrV: return new (C, 3) OrVNode (n1, n2, vlen, opd_t->array_element_basic_type());
a61af66fc99e Initial load
duke
parents:
diff changeset
389 case Op_XorV: return new (C, 3) XorVNode(n1, n2, vlen, opd_t->array_element_basic_type());
a61af66fc99e Initial load
duke
parents:
diff changeset
390 }
a61af66fc99e Initial load
duke
parents:
diff changeset
391 ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
392 return NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
393 }
a61af66fc99e Initial load
duke
parents:
diff changeset
394
a61af66fc99e Initial load
duke
parents:
diff changeset
395 // Return the vector version of a scalar load node.
a61af66fc99e Initial load
duke
parents:
diff changeset
396 VectorLoadNode* VectorLoadNode::make(Compile* C, int opc, Node* ctl, Node* mem,
a61af66fc99e Initial load
duke
parents:
diff changeset
397 Node* adr, const TypePtr* atyp, uint vlen) {
a61af66fc99e Initial load
duke
parents:
diff changeset
398 int vopc = opcode(opc, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
399
a61af66fc99e Initial load
duke
parents:
diff changeset
400 switch(vopc) {
a61af66fc99e Initial load
duke
parents:
diff changeset
401 case Op_Load16B: return new (C, 3) Load16BNode(ctl, mem, adr, atyp);
a61af66fc99e Initial load
duke
parents:
diff changeset
402 case Op_Load8B: return new (C, 3) Load8BNode(ctl, mem, adr, atyp);
a61af66fc99e Initial load
duke
parents:
diff changeset
403 case Op_Load4B: return new (C, 3) Load4BNode(ctl, mem, adr, atyp);
a61af66fc99e Initial load
duke
parents:
diff changeset
404
a61af66fc99e Initial load
duke
parents:
diff changeset
405 case Op_Load8C: return new (C, 3) Load8CNode(ctl, mem, adr, atyp);
a61af66fc99e Initial load
duke
parents:
diff changeset
406 case Op_Load4C: return new (C, 3) Load4CNode(ctl, mem, adr, atyp);
a61af66fc99e Initial load
duke
parents:
diff changeset
407 case Op_Load2C: return new (C, 3) Load2CNode(ctl, mem, adr, atyp);
a61af66fc99e Initial load
duke
parents:
diff changeset
408
a61af66fc99e Initial load
duke
parents:
diff changeset
409 case Op_Load8S: return new (C, 3) Load8SNode(ctl, mem, adr, atyp);
a61af66fc99e Initial load
duke
parents:
diff changeset
410 case Op_Load4S: return new (C, 3) Load4SNode(ctl, mem, adr, atyp);
a61af66fc99e Initial load
duke
parents:
diff changeset
411 case Op_Load2S: return new (C, 3) Load2SNode(ctl, mem, adr, atyp);
a61af66fc99e Initial load
duke
parents:
diff changeset
412
a61af66fc99e Initial load
duke
parents:
diff changeset
413 case Op_Load4I: return new (C, 3) Load4INode(ctl, mem, adr, atyp);
a61af66fc99e Initial load
duke
parents:
diff changeset
414 case Op_Load2I: return new (C, 3) Load2INode(ctl, mem, adr, atyp);
a61af66fc99e Initial load
duke
parents:
diff changeset
415
a61af66fc99e Initial load
duke
parents:
diff changeset
416 case Op_Load2L: return new (C, 3) Load2LNode(ctl, mem, adr, atyp);
a61af66fc99e Initial load
duke
parents:
diff changeset
417
a61af66fc99e Initial load
duke
parents:
diff changeset
418 case Op_Load4F: return new (C, 3) Load4FNode(ctl, mem, adr, atyp);
a61af66fc99e Initial load
duke
parents:
diff changeset
419 case Op_Load2F: return new (C, 3) Load2FNode(ctl, mem, adr, atyp);
a61af66fc99e Initial load
duke
parents:
diff changeset
420
a61af66fc99e Initial load
duke
parents:
diff changeset
421 case Op_Load2D: return new (C, 3) Load2DNode(ctl, mem, adr, atyp);
a61af66fc99e Initial load
duke
parents:
diff changeset
422 }
a61af66fc99e Initial load
duke
parents:
diff changeset
423 ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
424 return NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
425 }
a61af66fc99e Initial load
duke
parents:
diff changeset
426
a61af66fc99e Initial load
duke
parents:
diff changeset
427 // Return the vector version of a scalar store node.
a61af66fc99e Initial load
duke
parents:
diff changeset
428 VectorStoreNode* VectorStoreNode::make(Compile* C, int opc, Node* ctl, Node* mem,
3842
c7b60b601eb4 7069452: Cleanup NodeFlags
kvn
parents: 1972
diff changeset
429 Node* adr, const TypePtr* atyp, Node* val,
0
a61af66fc99e Initial load
duke
parents:
diff changeset
430 uint vlen) {
a61af66fc99e Initial load
duke
parents:
diff changeset
431 int vopc = opcode(opc, vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
432
a61af66fc99e Initial load
duke
parents:
diff changeset
433 switch(vopc) {
a61af66fc99e Initial load
duke
parents:
diff changeset
434 case Op_Store16B: return new (C, 4) Store16BNode(ctl, mem, adr, atyp, val);
a61af66fc99e Initial load
duke
parents:
diff changeset
435 case Op_Store8B: return new (C, 4) Store8BNode(ctl, mem, adr, atyp, val);
a61af66fc99e Initial load
duke
parents:
diff changeset
436 case Op_Store4B: return new (C, 4) Store4BNode(ctl, mem, adr, atyp, val);
a61af66fc99e Initial load
duke
parents:
diff changeset
437
a61af66fc99e Initial load
duke
parents:
diff changeset
438 case Op_Store8C: return new (C, 4) Store8CNode(ctl, mem, adr, atyp, val);
a61af66fc99e Initial load
duke
parents:
diff changeset
439 case Op_Store4C: return new (C, 4) Store4CNode(ctl, mem, adr, atyp, val);
a61af66fc99e Initial load
duke
parents:
diff changeset
440 case Op_Store2C: return new (C, 4) Store2CNode(ctl, mem, adr, atyp, val);
a61af66fc99e Initial load
duke
parents:
diff changeset
441
a61af66fc99e Initial load
duke
parents:
diff changeset
442 case Op_Store4I: return new (C, 4) Store4INode(ctl, mem, adr, atyp, val);
a61af66fc99e Initial load
duke
parents:
diff changeset
443 case Op_Store2I: return new (C, 4) Store2INode(ctl, mem, adr, atyp, val);
a61af66fc99e Initial load
duke
parents:
diff changeset
444
a61af66fc99e Initial load
duke
parents:
diff changeset
445 case Op_Store2L: return new (C, 4) Store2LNode(ctl, mem, adr, atyp, val);
a61af66fc99e Initial load
duke
parents:
diff changeset
446
a61af66fc99e Initial load
duke
parents:
diff changeset
447 case Op_Store4F: return new (C, 4) Store4FNode(ctl, mem, adr, atyp, val);
a61af66fc99e Initial load
duke
parents:
diff changeset
448 case Op_Store2F: return new (C, 4) Store2FNode(ctl, mem, adr, atyp, val);
a61af66fc99e Initial load
duke
parents:
diff changeset
449
a61af66fc99e Initial load
duke
parents:
diff changeset
450 case Op_Store2D: return new (C, 4) Store2DNode(ctl, mem, adr, atyp, val);
a61af66fc99e Initial load
duke
parents:
diff changeset
451 }
a61af66fc99e Initial load
duke
parents:
diff changeset
452 ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
453 return NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
454 }
a61af66fc99e Initial load
duke
parents:
diff changeset
455
a61af66fc99e Initial load
duke
parents:
diff changeset
456 // Extract a scalar element of vector.
a61af66fc99e Initial load
duke
parents:
diff changeset
457 Node* ExtractNode::make(Compile* C, Node* v, uint position, const Type* opd_t) {
a61af66fc99e Initial load
duke
parents:
diff changeset
458 BasicType bt = opd_t->array_element_basic_type();
a61af66fc99e Initial load
duke
parents:
diff changeset
459 assert(position < VectorNode::max_vlen(bt), "pos in range");
a61af66fc99e Initial load
duke
parents:
diff changeset
460 ConINode* pos = ConINode::make(C, (int)position);
a61af66fc99e Initial load
duke
parents:
diff changeset
461 switch (bt) {
a61af66fc99e Initial load
duke
parents:
diff changeset
462 case T_BOOLEAN:
a61af66fc99e Initial load
duke
parents:
diff changeset
463 case T_BYTE:
a61af66fc99e Initial load
duke
parents:
diff changeset
464 return new (C, 3) ExtractBNode(v, pos);
a61af66fc99e Initial load
duke
parents:
diff changeset
465 case T_CHAR:
a61af66fc99e Initial load
duke
parents:
diff changeset
466 return new (C, 3) ExtractCNode(v, pos);
a61af66fc99e Initial load
duke
parents:
diff changeset
467 case T_SHORT:
a61af66fc99e Initial load
duke
parents:
diff changeset
468 return new (C, 3) ExtractSNode(v, pos);
a61af66fc99e Initial load
duke
parents:
diff changeset
469 case T_INT:
a61af66fc99e Initial load
duke
parents:
diff changeset
470 return new (C, 3) ExtractINode(v, pos);
a61af66fc99e Initial load
duke
parents:
diff changeset
471 case T_LONG:
a61af66fc99e Initial load
duke
parents:
diff changeset
472 return new (C, 3) ExtractLNode(v, pos);
a61af66fc99e Initial load
duke
parents:
diff changeset
473 case T_FLOAT:
a61af66fc99e Initial load
duke
parents:
diff changeset
474 return new (C, 3) ExtractFNode(v, pos);
a61af66fc99e Initial load
duke
parents:
diff changeset
475 case T_DOUBLE:
a61af66fc99e Initial load
duke
parents:
diff changeset
476 return new (C, 3) ExtractDNode(v, pos);
a61af66fc99e Initial load
duke
parents:
diff changeset
477 }
a61af66fc99e Initial load
duke
parents:
diff changeset
478 ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
479 return NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
480 }