annotate src/share/vm/opto/vectornode.cpp @ 452:00b023ae2d78

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