annotate src/share/vm/opto/vectornode.hpp @ 3249:e1162778c1c8

7009266: G1: assert(obj->is_oop_or_null(true )) failed: Error Summary: A referent object that is only weakly reachable at the start of concurrent marking but is re-attached to the strongly reachable object graph during marking may not be marked as live. This can cause the reference object to be processed prematurely and leave dangling pointers to the referent object. Implement a read barrier for the java.lang.ref.Reference::referent field by intrinsifying the Reference.get() method, and intercepting accesses though JNI, reflection, and Unsafe, so that when a non-null referent object is read it is also logged in an SATB buffer. Reviewed-by: kvn, iveresov, never, tonyp, dholmes
author johnc
date Thu, 07 Apr 2011 09:53:20 -0700
parents f95d63e2154a
children 08eb13460b3a
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: 196
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 196
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: 196
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 #ifndef SHARE_VM_OPTO_VECTORNODE_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
25 #define SHARE_VM_OPTO_VECTORNODE_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
26
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
27 #include "opto/matcher.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
28 #include "opto/memnode.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
29 #include "opto/node.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
30 #include "opto/opcodes.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
31
0
a61af66fc99e Initial load
duke
parents:
diff changeset
32 //------------------------------VectorNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
33 // Vector Operation
a61af66fc99e Initial load
duke
parents:
diff changeset
34 class VectorNode : public Node {
a61af66fc99e Initial load
duke
parents:
diff changeset
35 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
36 uint _length; // vector length
a61af66fc99e Initial load
duke
parents:
diff changeset
37 virtual BasicType elt_basic_type() const = 0; // Vector element basic type
a61af66fc99e Initial load
duke
parents:
diff changeset
38
a61af66fc99e Initial load
duke
parents:
diff changeset
39 static const Type* vect_type(BasicType elt_bt, uint len);
a61af66fc99e Initial load
duke
parents:
diff changeset
40 static const Type* vect_type(const Type* elt_type, uint len) {
a61af66fc99e Initial load
duke
parents:
diff changeset
41 return vect_type(elt_type->array_element_basic_type(), len);
a61af66fc99e Initial load
duke
parents:
diff changeset
42 }
a61af66fc99e Initial load
duke
parents:
diff changeset
43
a61af66fc99e Initial load
duke
parents:
diff changeset
44 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
45 friend class VectorLoadNode; // For vect_type
a61af66fc99e Initial load
duke
parents:
diff changeset
46 friend class VectorStoreNode; // ditto.
a61af66fc99e Initial load
duke
parents:
diff changeset
47
a61af66fc99e Initial load
duke
parents:
diff changeset
48 VectorNode(Node* n1, uint vlen) : Node(NULL, n1), _length(vlen) {
a61af66fc99e Initial load
duke
parents:
diff changeset
49 init_flags(Flag_is_Vector);
a61af66fc99e Initial load
duke
parents:
diff changeset
50 }
a61af66fc99e Initial load
duke
parents:
diff changeset
51 VectorNode(Node* n1, Node* n2, uint vlen) : Node(NULL, n1, n2), _length(vlen) {
a61af66fc99e Initial load
duke
parents:
diff changeset
52 init_flags(Flag_is_Vector);
a61af66fc99e Initial load
duke
parents:
diff changeset
53 }
a61af66fc99e Initial load
duke
parents:
diff changeset
54 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
55
a61af66fc99e Initial load
duke
parents:
diff changeset
56 uint length() const { return _length; } // Vector length
a61af66fc99e Initial load
duke
parents:
diff changeset
57
a61af66fc99e Initial load
duke
parents:
diff changeset
58 static uint max_vlen(BasicType bt) { // max vector length
29
d5fc211aea19 6633953: type2aelembytes{T_ADDRESS} should be 8 bytes in 64 bit VM
kvn
parents: 0
diff changeset
59 return (uint)(Matcher::vector_width_in_bytes() / type2aelembytes(bt));
0
a61af66fc99e Initial load
duke
parents:
diff changeset
60 }
a61af66fc99e Initial load
duke
parents:
diff changeset
61
a61af66fc99e Initial load
duke
parents:
diff changeset
62 // Element and vector type
a61af66fc99e Initial load
duke
parents:
diff changeset
63 const Type* elt_type() const { return Type::get_const_basic_type(elt_basic_type()); }
a61af66fc99e Initial load
duke
parents:
diff changeset
64 const Type* vect_type() const { return vect_type(elt_basic_type(), length()); }
a61af66fc99e Initial load
duke
parents:
diff changeset
65
a61af66fc99e Initial load
duke
parents:
diff changeset
66 virtual const Type *bottom_type() const { return vect_type(); }
a61af66fc99e Initial load
duke
parents:
diff changeset
67 virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(); }
a61af66fc99e Initial load
duke
parents:
diff changeset
68
a61af66fc99e Initial load
duke
parents:
diff changeset
69 // Vector opcode from scalar opcode
a61af66fc99e Initial load
duke
parents:
diff changeset
70 static int opcode(int sopc, uint vlen, const Type* opd_t);
a61af66fc99e Initial load
duke
parents:
diff changeset
71
a61af66fc99e Initial load
duke
parents:
diff changeset
72 static VectorNode* scalar2vector(Compile* C, Node* s, uint vlen, const Type* opd_t);
a61af66fc99e Initial load
duke
parents:
diff changeset
73
a61af66fc99e Initial load
duke
parents:
diff changeset
74 static VectorNode* make(Compile* C, int sopc, Node* n1, Node* n2, uint vlen, const Type* elt_t);
a61af66fc99e Initial load
duke
parents:
diff changeset
75
a61af66fc99e Initial load
duke
parents:
diff changeset
76 };
a61af66fc99e Initial load
duke
parents:
diff changeset
77
a61af66fc99e Initial load
duke
parents:
diff changeset
78 //===========================Vector=ALU=Operations====================================
a61af66fc99e Initial load
duke
parents:
diff changeset
79
a61af66fc99e Initial load
duke
parents:
diff changeset
80 //------------------------------AddVBNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
81 // Vector add byte
a61af66fc99e Initial load
duke
parents:
diff changeset
82 class AddVBNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
83 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
84 virtual BasicType elt_basic_type() const { return T_BYTE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
85 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
86 AddVBNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
87 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
88 };
a61af66fc99e Initial load
duke
parents:
diff changeset
89
a61af66fc99e Initial load
duke
parents:
diff changeset
90 //------------------------------AddVCNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
91 // Vector add char
a61af66fc99e Initial load
duke
parents:
diff changeset
92 class AddVCNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
93 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
94 virtual BasicType elt_basic_type() const { return T_CHAR; }
a61af66fc99e Initial load
duke
parents:
diff changeset
95 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
96 AddVCNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
97 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
98 };
a61af66fc99e Initial load
duke
parents:
diff changeset
99
a61af66fc99e Initial load
duke
parents:
diff changeset
100 //------------------------------AddVSNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
101 // Vector add short
a61af66fc99e Initial load
duke
parents:
diff changeset
102 class AddVSNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
103 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
104 virtual BasicType elt_basic_type() const { return T_SHORT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
105 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
106 AddVSNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
107 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
108 };
a61af66fc99e Initial load
duke
parents:
diff changeset
109
a61af66fc99e Initial load
duke
parents:
diff changeset
110 //------------------------------AddVINode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
111 // Vector add int
a61af66fc99e Initial load
duke
parents:
diff changeset
112 class AddVINode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
113 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
114 virtual BasicType elt_basic_type() const { return T_INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
115 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
116 AddVINode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
117 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
118 };
a61af66fc99e Initial load
duke
parents:
diff changeset
119
a61af66fc99e Initial load
duke
parents:
diff changeset
120 //------------------------------AddVLNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
121 // Vector add long
a61af66fc99e Initial load
duke
parents:
diff changeset
122 class AddVLNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
123 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
124 virtual BasicType elt_basic_type() const { return T_LONG; }
a61af66fc99e Initial load
duke
parents:
diff changeset
125 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
126 AddVLNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
127 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
128 };
a61af66fc99e Initial load
duke
parents:
diff changeset
129
a61af66fc99e Initial load
duke
parents:
diff changeset
130 //------------------------------AddVFNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
131 // Vector add float
a61af66fc99e Initial load
duke
parents:
diff changeset
132 class AddVFNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
133 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
134 virtual BasicType elt_basic_type() const { return T_FLOAT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
135 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
136 AddVFNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
137 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
138 };
a61af66fc99e Initial load
duke
parents:
diff changeset
139
a61af66fc99e Initial load
duke
parents:
diff changeset
140 //------------------------------AddVDNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
141 // Vector add double
a61af66fc99e Initial load
duke
parents:
diff changeset
142 class AddVDNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
143 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
144 virtual BasicType elt_basic_type() const { return T_DOUBLE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
145 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
146 AddVDNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
147 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
148 };
a61af66fc99e Initial load
duke
parents:
diff changeset
149
a61af66fc99e Initial load
duke
parents:
diff changeset
150 //------------------------------SubVBNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
151 // Vector subtract byte
a61af66fc99e Initial load
duke
parents:
diff changeset
152 class SubVBNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
153 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
154 virtual BasicType elt_basic_type() const { return T_BYTE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
155 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
156 SubVBNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
157 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
158 };
a61af66fc99e Initial load
duke
parents:
diff changeset
159
a61af66fc99e Initial load
duke
parents:
diff changeset
160 //------------------------------SubVCNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
161 // Vector subtract char
a61af66fc99e Initial load
duke
parents:
diff changeset
162 class SubVCNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
163 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
164 virtual BasicType elt_basic_type() const { return T_CHAR; }
a61af66fc99e Initial load
duke
parents:
diff changeset
165 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
166 SubVCNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
167 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
168 };
a61af66fc99e Initial load
duke
parents:
diff changeset
169
a61af66fc99e Initial load
duke
parents:
diff changeset
170 //------------------------------SubVSNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
171 // Vector subtract short
a61af66fc99e Initial load
duke
parents:
diff changeset
172 class SubVSNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
173 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
174 virtual BasicType elt_basic_type() const { return T_SHORT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
175 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
176 SubVSNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
177 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
178 };
a61af66fc99e Initial load
duke
parents:
diff changeset
179
a61af66fc99e Initial load
duke
parents:
diff changeset
180 //------------------------------SubVINode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
181 // Vector subtract int
a61af66fc99e Initial load
duke
parents:
diff changeset
182 class SubVINode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
183 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
184 virtual BasicType elt_basic_type() const { return T_INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
185 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
186 SubVINode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
187 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
188 };
a61af66fc99e Initial load
duke
parents:
diff changeset
189
a61af66fc99e Initial load
duke
parents:
diff changeset
190 //------------------------------SubVLNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
191 // Vector subtract long
a61af66fc99e Initial load
duke
parents:
diff changeset
192 class SubVLNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
193 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
194 virtual BasicType elt_basic_type() const { return T_LONG; }
a61af66fc99e Initial load
duke
parents:
diff changeset
195 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
196 SubVLNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
197 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
198 };
a61af66fc99e Initial load
duke
parents:
diff changeset
199
a61af66fc99e Initial load
duke
parents:
diff changeset
200 //------------------------------SubVFNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
201 // Vector subtract float
a61af66fc99e Initial load
duke
parents:
diff changeset
202 class SubVFNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
203 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
204 virtual BasicType elt_basic_type() const { return T_FLOAT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
205 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
206 SubVFNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
207 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
208 };
a61af66fc99e Initial load
duke
parents:
diff changeset
209
a61af66fc99e Initial load
duke
parents:
diff changeset
210 //------------------------------SubVDNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
211 // Vector subtract double
a61af66fc99e Initial load
duke
parents:
diff changeset
212 class SubVDNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
213 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
214 virtual BasicType elt_basic_type() const { return T_DOUBLE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
215 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
216 SubVDNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
217 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
218 };
a61af66fc99e Initial load
duke
parents:
diff changeset
219
a61af66fc99e Initial load
duke
parents:
diff changeset
220 //------------------------------MulVFNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
221 // Vector multiply float
a61af66fc99e Initial load
duke
parents:
diff changeset
222 class MulVFNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
223 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
224 virtual BasicType elt_basic_type() const { return T_FLOAT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
225 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
226 MulVFNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
227 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
228 };
a61af66fc99e Initial load
duke
parents:
diff changeset
229
a61af66fc99e Initial load
duke
parents:
diff changeset
230 //------------------------------MulVDNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
231 // Vector multiply double
a61af66fc99e Initial load
duke
parents:
diff changeset
232 class MulVDNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
233 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
234 virtual BasicType elt_basic_type() const { return T_DOUBLE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
235 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
236 MulVDNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
237 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
238 };
a61af66fc99e Initial load
duke
parents:
diff changeset
239
a61af66fc99e Initial load
duke
parents:
diff changeset
240 //------------------------------DivVFNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
241 // Vector divide float
a61af66fc99e Initial load
duke
parents:
diff changeset
242 class DivVFNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
243 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
244 virtual BasicType elt_basic_type() const { return T_FLOAT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
245 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
246 DivVFNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
247 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
248 };
a61af66fc99e Initial load
duke
parents:
diff changeset
249
a61af66fc99e Initial load
duke
parents:
diff changeset
250 //------------------------------DivVDNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
251 // Vector Divide double
a61af66fc99e Initial load
duke
parents:
diff changeset
252 class DivVDNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
253 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
254 virtual BasicType elt_basic_type() const { return T_DOUBLE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
255 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
256 DivVDNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
257 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
258 };
a61af66fc99e Initial load
duke
parents:
diff changeset
259
a61af66fc99e Initial load
duke
parents:
diff changeset
260 //------------------------------LShiftVBNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
261 // Vector lshift byte
a61af66fc99e Initial load
duke
parents:
diff changeset
262 class LShiftVBNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
263 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
264 virtual BasicType elt_basic_type() const { return T_BYTE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
265 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
266 LShiftVBNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
267 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
268 };
a61af66fc99e Initial load
duke
parents:
diff changeset
269
a61af66fc99e Initial load
duke
parents:
diff changeset
270 //------------------------------LShiftVCNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
271 // Vector lshift chars
a61af66fc99e Initial load
duke
parents:
diff changeset
272 class LShiftVCNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
273 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
274 virtual BasicType elt_basic_type() const { return T_CHAR; }
a61af66fc99e Initial load
duke
parents:
diff changeset
275 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
276 LShiftVCNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
277 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
278 };
a61af66fc99e Initial load
duke
parents:
diff changeset
279
a61af66fc99e Initial load
duke
parents:
diff changeset
280 //------------------------------LShiftVSNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
281 // Vector lshift shorts
a61af66fc99e Initial load
duke
parents:
diff changeset
282 class LShiftVSNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
283 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
284 virtual BasicType elt_basic_type() const { return T_SHORT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
285 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
286 LShiftVSNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
287 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
288 };
a61af66fc99e Initial load
duke
parents:
diff changeset
289
a61af66fc99e Initial load
duke
parents:
diff changeset
290 //------------------------------LShiftVINode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
291 // Vector lshift ints
a61af66fc99e Initial load
duke
parents:
diff changeset
292 class LShiftVINode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
293 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
294 virtual BasicType elt_basic_type() const { return T_INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
295 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
296 LShiftVINode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
297 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
298 };
a61af66fc99e Initial load
duke
parents:
diff changeset
299
a61af66fc99e Initial load
duke
parents:
diff changeset
300 //------------------------------URShiftVBNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
301 // Vector urshift bytes
a61af66fc99e Initial load
duke
parents:
diff changeset
302 class URShiftVBNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
303 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
304 virtual BasicType elt_basic_type() const { return T_BYTE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
305 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
306 URShiftVBNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
307 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
308 };
a61af66fc99e Initial load
duke
parents:
diff changeset
309
a61af66fc99e Initial load
duke
parents:
diff changeset
310 //------------------------------URShiftVCNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
311 // Vector urshift char
a61af66fc99e Initial load
duke
parents:
diff changeset
312 class URShiftVCNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
313 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
314 virtual BasicType elt_basic_type() const { return T_SHORT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
315 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
316 URShiftVCNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
317 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
318 };
a61af66fc99e Initial load
duke
parents:
diff changeset
319
a61af66fc99e Initial load
duke
parents:
diff changeset
320 //------------------------------URShiftVSNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
321 // Vector urshift shorts
a61af66fc99e Initial load
duke
parents:
diff changeset
322 class URShiftVSNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
323 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
324 virtual BasicType elt_basic_type() const { return T_SHORT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
325 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
326 URShiftVSNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
327 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
328 };
a61af66fc99e Initial load
duke
parents:
diff changeset
329
a61af66fc99e Initial load
duke
parents:
diff changeset
330 //------------------------------URShiftVINode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
331 // Vector urshift ints
a61af66fc99e Initial load
duke
parents:
diff changeset
332 class URShiftVINode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
333 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
334 virtual BasicType elt_basic_type() const { return T_INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
335 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
336 URShiftVINode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
337 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
338 };
a61af66fc99e Initial load
duke
parents:
diff changeset
339
a61af66fc99e Initial load
duke
parents:
diff changeset
340 //------------------------------AndVNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
341 // Vector and
a61af66fc99e Initial load
duke
parents:
diff changeset
342 class AndVNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
343 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
344 BasicType _bt;
a61af66fc99e Initial load
duke
parents:
diff changeset
345 virtual BasicType elt_basic_type() const { return _bt; }
a61af66fc99e Initial load
duke
parents:
diff changeset
346 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
347 AndVNode(Node* in1, Node* in2, uint vlen, BasicType bt) : VectorNode(in1,in2,vlen), _bt(bt) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
348 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
349 };
a61af66fc99e Initial load
duke
parents:
diff changeset
350
a61af66fc99e Initial load
duke
parents:
diff changeset
351 //------------------------------OrVNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
352 // Vector or
a61af66fc99e Initial load
duke
parents:
diff changeset
353 class OrVNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
354 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
355 BasicType _bt;
a61af66fc99e Initial load
duke
parents:
diff changeset
356 virtual BasicType elt_basic_type() const { return _bt; }
a61af66fc99e Initial load
duke
parents:
diff changeset
357 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
358 OrVNode(Node* in1, Node* in2, uint vlen, BasicType bt) : VectorNode(in1,in2,vlen), _bt(bt) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
359 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
360 };
a61af66fc99e Initial load
duke
parents:
diff changeset
361
a61af66fc99e Initial load
duke
parents:
diff changeset
362 //------------------------------XorVNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
363 // Vector xor
a61af66fc99e Initial load
duke
parents:
diff changeset
364 class XorVNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
365 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
366 BasicType _bt;
a61af66fc99e Initial load
duke
parents:
diff changeset
367 virtual BasicType elt_basic_type() const { return _bt; }
a61af66fc99e Initial load
duke
parents:
diff changeset
368 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
369 XorVNode(Node* in1, Node* in2, uint vlen, BasicType bt) : VectorNode(in1,in2,vlen), _bt(bt) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
370 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
371 };
a61af66fc99e Initial load
duke
parents:
diff changeset
372
a61af66fc99e Initial load
duke
parents:
diff changeset
373 //================================= M E M O R Y ==================================
a61af66fc99e Initial load
duke
parents:
diff changeset
374
a61af66fc99e Initial load
duke
parents:
diff changeset
375
a61af66fc99e Initial load
duke
parents:
diff changeset
376 //------------------------------VectorLoadNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
377 // Vector Load from memory
a61af66fc99e Initial load
duke
parents:
diff changeset
378 class VectorLoadNode : public LoadNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
379 virtual uint size_of() const { return sizeof(*this); }
a61af66fc99e Initial load
duke
parents:
diff changeset
380
a61af66fc99e Initial load
duke
parents:
diff changeset
381 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
382 virtual BasicType elt_basic_type() const = 0; // Vector element basic type
a61af66fc99e Initial load
duke
parents:
diff changeset
383 // For use in constructor
a61af66fc99e Initial load
duke
parents:
diff changeset
384 static const Type* vect_type(const Type* elt_type, uint len) {
a61af66fc99e Initial load
duke
parents:
diff changeset
385 return VectorNode::vect_type(elt_type, len);
a61af66fc99e Initial load
duke
parents:
diff changeset
386 }
a61af66fc99e Initial load
duke
parents:
diff changeset
387
a61af66fc99e Initial load
duke
parents:
diff changeset
388 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
389 VectorLoadNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const Type *rt)
a61af66fc99e Initial load
duke
parents:
diff changeset
390 : LoadNode(c,mem,adr,at,rt) {
a61af66fc99e Initial load
duke
parents:
diff changeset
391 init_flags(Flag_is_Vector);
a61af66fc99e Initial load
duke
parents:
diff changeset
392 }
a61af66fc99e Initial load
duke
parents:
diff changeset
393 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
394
a61af66fc99e Initial load
duke
parents:
diff changeset
395 virtual uint length() const = 0; // Vector length
a61af66fc99e Initial load
duke
parents:
diff changeset
396
a61af66fc99e Initial load
duke
parents:
diff changeset
397 // Element and vector type
a61af66fc99e Initial load
duke
parents:
diff changeset
398 const Type* elt_type() const { return Type::get_const_basic_type(elt_basic_type()); }
a61af66fc99e Initial load
duke
parents:
diff changeset
399 const Type* vect_type() const { return VectorNode::vect_type(elt_basic_type(), length()); }
a61af66fc99e Initial load
duke
parents:
diff changeset
400
a61af66fc99e Initial load
duke
parents:
diff changeset
401 virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(); }
a61af66fc99e Initial load
duke
parents:
diff changeset
402 virtual BasicType memory_type() const { return T_VOID; }
29
d5fc211aea19 6633953: type2aelembytes{T_ADDRESS} should be 8 bytes in 64 bit VM
kvn
parents: 0
diff changeset
403 virtual int memory_size() const { return length()*type2aelembytes(elt_basic_type()); }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
404
a61af66fc99e Initial load
duke
parents:
diff changeset
405 // Vector opcode from scalar opcode
a61af66fc99e Initial load
duke
parents:
diff changeset
406 static int opcode(int sopc, uint vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
407
a61af66fc99e Initial load
duke
parents:
diff changeset
408 static VectorLoadNode* make(Compile* C, int opc, Node* ctl, Node* mem,
a61af66fc99e Initial load
duke
parents:
diff changeset
409 Node* adr, const TypePtr* atyp, uint vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
410 };
a61af66fc99e Initial load
duke
parents:
diff changeset
411
a61af66fc99e Initial load
duke
parents:
diff changeset
412 //------------------------------Load16BNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
413 // Vector load of 16 bytes (8bits signed) from memory
a61af66fc99e Initial load
duke
parents:
diff changeset
414 class Load16BNode : public VectorLoadNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
415 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
416 virtual BasicType elt_basic_type() const { return T_BYTE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
417 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
418 Load16BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::BYTE)
a61af66fc99e Initial load
duke
parents:
diff changeset
419 : VectorLoadNode(c,mem,adr,at,vect_type(ti,16)) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
420 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
421 virtual int store_Opcode() const { return Op_Store16B; }
a61af66fc99e Initial load
duke
parents:
diff changeset
422 virtual uint length() const { return 16; }
a61af66fc99e Initial load
duke
parents:
diff changeset
423 };
a61af66fc99e Initial load
duke
parents:
diff changeset
424
a61af66fc99e Initial load
duke
parents:
diff changeset
425 //------------------------------Load8BNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
426 // Vector load of 8 bytes (8bits signed) from memory
a61af66fc99e Initial load
duke
parents:
diff changeset
427 class Load8BNode : public VectorLoadNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
428 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
429 virtual BasicType elt_basic_type() const { return T_BYTE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
430 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
431 Load8BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::BYTE)
a61af66fc99e Initial load
duke
parents:
diff changeset
432 : VectorLoadNode(c,mem,adr,at,vect_type(ti,8)) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
433 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
434 virtual int store_Opcode() const { return Op_Store8B; }
a61af66fc99e Initial load
duke
parents:
diff changeset
435 virtual uint length() const { return 8; }
a61af66fc99e Initial load
duke
parents:
diff changeset
436 };
a61af66fc99e Initial load
duke
parents:
diff changeset
437
a61af66fc99e Initial load
duke
parents:
diff changeset
438 //------------------------------Load4BNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
439 // Vector load of 4 bytes (8bits signed) from memory
a61af66fc99e Initial load
duke
parents:
diff changeset
440 class Load4BNode : public VectorLoadNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
441 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
442 virtual BasicType elt_basic_type() const { return T_BYTE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
443 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
444 Load4BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::BYTE)
a61af66fc99e Initial load
duke
parents:
diff changeset
445 : VectorLoadNode(c,mem,adr,at,vect_type(ti,4)) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
446 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
447 virtual int store_Opcode() const { return Op_Store4B; }
a61af66fc99e Initial load
duke
parents:
diff changeset
448 virtual uint length() const { return 4; }
a61af66fc99e Initial load
duke
parents:
diff changeset
449 };
a61af66fc99e Initial load
duke
parents:
diff changeset
450
a61af66fc99e Initial load
duke
parents:
diff changeset
451 //------------------------------Load8CNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
452 // Vector load of 8 chars (16bits unsigned) from memory
a61af66fc99e Initial load
duke
parents:
diff changeset
453 class Load8CNode : public VectorLoadNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
454 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
455 virtual BasicType elt_basic_type() const { return T_CHAR; }
a61af66fc99e Initial load
duke
parents:
diff changeset
456 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
457 Load8CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::CHAR)
a61af66fc99e Initial load
duke
parents:
diff changeset
458 : VectorLoadNode(c,mem,adr,at,vect_type(ti,8)) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
459 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
460 virtual int store_Opcode() const { return Op_Store8C; }
a61af66fc99e Initial load
duke
parents:
diff changeset
461 virtual uint length() const { return 8; }
a61af66fc99e Initial load
duke
parents:
diff changeset
462 };
a61af66fc99e Initial load
duke
parents:
diff changeset
463
a61af66fc99e Initial load
duke
parents:
diff changeset
464 //------------------------------Load4CNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
465 // Vector load of 4 chars (16bits unsigned) from memory
a61af66fc99e Initial load
duke
parents:
diff changeset
466 class Load4CNode : public VectorLoadNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
467 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
468 virtual BasicType elt_basic_type() const { return T_CHAR; }
a61af66fc99e Initial load
duke
parents:
diff changeset
469 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
470 Load4CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::CHAR)
a61af66fc99e Initial load
duke
parents:
diff changeset
471 : VectorLoadNode(c,mem,adr,at,vect_type(ti,4)) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
472 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
473 virtual int store_Opcode() const { return Op_Store4C; }
a61af66fc99e Initial load
duke
parents:
diff changeset
474 virtual uint length() const { return 4; }
a61af66fc99e Initial load
duke
parents:
diff changeset
475 };
a61af66fc99e Initial load
duke
parents:
diff changeset
476
a61af66fc99e Initial load
duke
parents:
diff changeset
477 //------------------------------Load2CNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
478 // Vector load of 2 chars (16bits unsigned) from memory
a61af66fc99e Initial load
duke
parents:
diff changeset
479 class Load2CNode : public VectorLoadNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
480 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
481 virtual BasicType elt_basic_type() const { return T_CHAR; }
a61af66fc99e Initial load
duke
parents:
diff changeset
482 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
483 Load2CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::CHAR)
a61af66fc99e Initial load
duke
parents:
diff changeset
484 : VectorLoadNode(c,mem,adr,at,vect_type(ti,2)) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
485 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
486 virtual int store_Opcode() const { return Op_Store2C; }
a61af66fc99e Initial load
duke
parents:
diff changeset
487 virtual uint length() const { return 2; }
a61af66fc99e Initial load
duke
parents:
diff changeset
488 };
a61af66fc99e Initial load
duke
parents:
diff changeset
489
a61af66fc99e Initial load
duke
parents:
diff changeset
490 //------------------------------Load8SNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
491 // Vector load of 8 shorts (16bits signed) from memory
a61af66fc99e Initial load
duke
parents:
diff changeset
492 class Load8SNode : public VectorLoadNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
493 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
494 virtual BasicType elt_basic_type() const { return T_SHORT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
495 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
496 Load8SNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::SHORT)
a61af66fc99e Initial load
duke
parents:
diff changeset
497 : VectorLoadNode(c,mem,adr,at,vect_type(ti,8)) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
498 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
499 virtual int store_Opcode() const { return Op_Store8C; }
a61af66fc99e Initial load
duke
parents:
diff changeset
500 virtual uint length() const { return 8; }
a61af66fc99e Initial load
duke
parents:
diff changeset
501 };
a61af66fc99e Initial load
duke
parents:
diff changeset
502
a61af66fc99e Initial load
duke
parents:
diff changeset
503 //------------------------------Load4SNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
504 // Vector load of 4 shorts (16bits signed) from memory
a61af66fc99e Initial load
duke
parents:
diff changeset
505 class Load4SNode : public VectorLoadNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
506 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
507 virtual BasicType elt_basic_type() const { return T_SHORT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
508 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
509 Load4SNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::SHORT)
a61af66fc99e Initial load
duke
parents:
diff changeset
510 : VectorLoadNode(c,mem,adr,at,vect_type(ti,4)) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
511 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
512 virtual int store_Opcode() const { return Op_Store4C; }
a61af66fc99e Initial load
duke
parents:
diff changeset
513 virtual uint length() const { return 4; }
a61af66fc99e Initial load
duke
parents:
diff changeset
514 };
a61af66fc99e Initial load
duke
parents:
diff changeset
515
a61af66fc99e Initial load
duke
parents:
diff changeset
516 //------------------------------Load2SNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
517 // Vector load of 2 shorts (16bits signed) from memory
a61af66fc99e Initial load
duke
parents:
diff changeset
518 class Load2SNode : public VectorLoadNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
519 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
520 virtual BasicType elt_basic_type() const { return T_SHORT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
521 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
522 Load2SNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::SHORT)
a61af66fc99e Initial load
duke
parents:
diff changeset
523 : VectorLoadNode(c,mem,adr,at,vect_type(ti,2)) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
524 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
525 virtual int store_Opcode() const { return Op_Store2C; }
a61af66fc99e Initial load
duke
parents:
diff changeset
526 virtual uint length() const { return 2; }
a61af66fc99e Initial load
duke
parents:
diff changeset
527 };
a61af66fc99e Initial load
duke
parents:
diff changeset
528
a61af66fc99e Initial load
duke
parents:
diff changeset
529 //------------------------------Load4INode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
530 // Vector load of 4 integers (32bits signed) from memory
a61af66fc99e Initial load
duke
parents:
diff changeset
531 class Load4INode : public VectorLoadNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
532 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
533 virtual BasicType elt_basic_type() const { return T_INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
534 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
535 Load4INode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::INT)
a61af66fc99e Initial load
duke
parents:
diff changeset
536 : VectorLoadNode(c,mem,adr,at,vect_type(ti,4)) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
537 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
538 virtual int store_Opcode() const { return Op_Store4I; }
a61af66fc99e Initial load
duke
parents:
diff changeset
539 virtual uint length() const { return 4; }
a61af66fc99e Initial load
duke
parents:
diff changeset
540 };
a61af66fc99e Initial load
duke
parents:
diff changeset
541
a61af66fc99e Initial load
duke
parents:
diff changeset
542 //------------------------------Load2INode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
543 // Vector load of 2 integers (32bits signed) from memory
a61af66fc99e Initial load
duke
parents:
diff changeset
544 class Load2INode : public VectorLoadNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
545 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
546 virtual BasicType elt_basic_type() const { return T_INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
547 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
548 Load2INode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::INT)
a61af66fc99e Initial load
duke
parents:
diff changeset
549 : VectorLoadNode(c,mem,adr,at,vect_type(ti,2)) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
550 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
551 virtual int store_Opcode() const { return Op_Store2I; }
a61af66fc99e Initial load
duke
parents:
diff changeset
552 virtual uint length() const { return 2; }
a61af66fc99e Initial load
duke
parents:
diff changeset
553 };
a61af66fc99e Initial load
duke
parents:
diff changeset
554
a61af66fc99e Initial load
duke
parents:
diff changeset
555 //------------------------------Load2LNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
556 // Vector load of 2 longs (64bits signed) from memory
a61af66fc99e Initial load
duke
parents:
diff changeset
557 class Load2LNode : public VectorLoadNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
558 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
559 virtual BasicType elt_basic_type() const { return T_LONG; }
a61af66fc99e Initial load
duke
parents:
diff changeset
560 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
561 Load2LNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeLong *tl = TypeLong::LONG)
a61af66fc99e Initial load
duke
parents:
diff changeset
562 : VectorLoadNode(c,mem,adr,at,vect_type(tl,2)) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
563 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
564 virtual int store_Opcode() const { return Op_Store2L; }
a61af66fc99e Initial load
duke
parents:
diff changeset
565 virtual uint length() const { return 2; }
a61af66fc99e Initial load
duke
parents:
diff changeset
566 };
a61af66fc99e Initial load
duke
parents:
diff changeset
567
a61af66fc99e Initial load
duke
parents:
diff changeset
568 //------------------------------Load4FNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
569 // Vector load of 4 floats (32bits) from memory
a61af66fc99e Initial load
duke
parents:
diff changeset
570 class Load4FNode : public VectorLoadNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
571 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
572 virtual BasicType elt_basic_type() const { return T_FLOAT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
573 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
574 Load4FNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const Type *t = Type::FLOAT)
a61af66fc99e Initial load
duke
parents:
diff changeset
575 : VectorLoadNode(c,mem,adr,at,vect_type(t,4)) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
576 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
577 virtual int store_Opcode() const { return Op_Store4F; }
a61af66fc99e Initial load
duke
parents:
diff changeset
578 virtual uint length() const { return 4; }
a61af66fc99e Initial load
duke
parents:
diff changeset
579 };
a61af66fc99e Initial load
duke
parents:
diff changeset
580
a61af66fc99e Initial load
duke
parents:
diff changeset
581 //------------------------------Load2FNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
582 // Vector load of 2 floats (32bits) from memory
a61af66fc99e Initial load
duke
parents:
diff changeset
583 class Load2FNode : public VectorLoadNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
584 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
585 virtual BasicType elt_basic_type() const { return T_FLOAT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
586 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
587 Load2FNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const Type *t = Type::FLOAT)
a61af66fc99e Initial load
duke
parents:
diff changeset
588 : VectorLoadNode(c,mem,adr,at,vect_type(t,2)) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
589 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
590 virtual int store_Opcode() const { return Op_Store2F; }
a61af66fc99e Initial load
duke
parents:
diff changeset
591 virtual uint length() const { return 2; }
a61af66fc99e Initial load
duke
parents:
diff changeset
592 };
a61af66fc99e Initial load
duke
parents:
diff changeset
593
a61af66fc99e Initial load
duke
parents:
diff changeset
594 //------------------------------Load2DNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
595 // Vector load of 2 doubles (64bits) from memory
a61af66fc99e Initial load
duke
parents:
diff changeset
596 class Load2DNode : public VectorLoadNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
597 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
598 virtual BasicType elt_basic_type() const { return T_DOUBLE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
599 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
600 Load2DNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const Type *t = Type::DOUBLE)
a61af66fc99e Initial load
duke
parents:
diff changeset
601 : VectorLoadNode(c,mem,adr,at,vect_type(t,2)) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
602 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
603 virtual int store_Opcode() const { return Op_Store2D; }
a61af66fc99e Initial load
duke
parents:
diff changeset
604 virtual uint length() const { return 2; }
a61af66fc99e Initial load
duke
parents:
diff changeset
605 };
a61af66fc99e Initial load
duke
parents:
diff changeset
606
a61af66fc99e Initial load
duke
parents:
diff changeset
607
a61af66fc99e Initial load
duke
parents:
diff changeset
608 //------------------------------VectorStoreNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
609 // Vector Store to memory
a61af66fc99e Initial load
duke
parents:
diff changeset
610 class VectorStoreNode : public StoreNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
611 virtual uint size_of() const { return sizeof(*this); }
a61af66fc99e Initial load
duke
parents:
diff changeset
612
a61af66fc99e Initial load
duke
parents:
diff changeset
613 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
614 virtual BasicType elt_basic_type() const = 0; // Vector element basic type
a61af66fc99e Initial load
duke
parents:
diff changeset
615
a61af66fc99e Initial load
duke
parents:
diff changeset
616 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
617 VectorStoreNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
a61af66fc99e Initial load
duke
parents:
diff changeset
618 : StoreNode(c,mem,adr,at,val) {
a61af66fc99e Initial load
duke
parents:
diff changeset
619 init_flags(Flag_is_Vector);
a61af66fc99e Initial load
duke
parents:
diff changeset
620 }
a61af66fc99e Initial load
duke
parents:
diff changeset
621 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
622
a61af66fc99e Initial load
duke
parents:
diff changeset
623 virtual uint length() const = 0; // Vector length
a61af66fc99e Initial load
duke
parents:
diff changeset
624
a61af66fc99e Initial load
duke
parents:
diff changeset
625 // Element and vector type
a61af66fc99e Initial load
duke
parents:
diff changeset
626 const Type* elt_type() const { return Type::get_const_basic_type(elt_basic_type()); }
a61af66fc99e Initial load
duke
parents:
diff changeset
627 const Type* vect_type() const { return VectorNode::vect_type(elt_basic_type(), length()); }
a61af66fc99e Initial load
duke
parents:
diff changeset
628
a61af66fc99e Initial load
duke
parents:
diff changeset
629 virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(); }
a61af66fc99e Initial load
duke
parents:
diff changeset
630 virtual BasicType memory_type() const { return T_VOID; }
29
d5fc211aea19 6633953: type2aelembytes{T_ADDRESS} should be 8 bytes in 64 bit VM
kvn
parents: 0
diff changeset
631 virtual int memory_size() const { return length()*type2aelembytes(elt_basic_type()); }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
632
a61af66fc99e Initial load
duke
parents:
diff changeset
633 // Vector opcode from scalar opcode
a61af66fc99e Initial load
duke
parents:
diff changeset
634 static int opcode(int sopc, uint vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
635
a61af66fc99e Initial load
duke
parents:
diff changeset
636 static VectorStoreNode* make(Compile* C, int opc, Node* ctl, Node* mem,
a61af66fc99e Initial load
duke
parents:
diff changeset
637 Node* adr, const TypePtr* atyp, VectorNode* val,
a61af66fc99e Initial load
duke
parents:
diff changeset
638 uint vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
639 };
a61af66fc99e Initial load
duke
parents:
diff changeset
640
a61af66fc99e Initial load
duke
parents:
diff changeset
641 //------------------------------Store16BNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
642 // Vector store of 16 bytes (8bits signed) to memory
a61af66fc99e Initial load
duke
parents:
diff changeset
643 class Store16BNode : public VectorStoreNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
644 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
645 virtual BasicType elt_basic_type() const { return T_BYTE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
646 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
647 Store16BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
a61af66fc99e Initial load
duke
parents:
diff changeset
648 : VectorStoreNode(c,mem,adr,at,val) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
649 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
650 virtual uint length() const { return 16; }
a61af66fc99e Initial load
duke
parents:
diff changeset
651 };
a61af66fc99e Initial load
duke
parents:
diff changeset
652
a61af66fc99e Initial load
duke
parents:
diff changeset
653 //------------------------------Store8BNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
654 // Vector store of 8 bytes (8bits signed) to memory
a61af66fc99e Initial load
duke
parents:
diff changeset
655 class Store8BNode : public VectorStoreNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
656 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
657 virtual BasicType elt_basic_type() const { return T_BYTE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
658 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
659 Store8BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
a61af66fc99e Initial load
duke
parents:
diff changeset
660 : VectorStoreNode(c,mem,adr,at,val) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
661 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
662 virtual uint length() const { return 8; }
a61af66fc99e Initial load
duke
parents:
diff changeset
663 };
a61af66fc99e Initial load
duke
parents:
diff changeset
664
a61af66fc99e Initial load
duke
parents:
diff changeset
665 //------------------------------Store4BNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
666 // Vector store of 4 bytes (8bits signed) to memory
a61af66fc99e Initial load
duke
parents:
diff changeset
667 class Store4BNode : public VectorStoreNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
668 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
669 virtual BasicType elt_basic_type() const { return T_BYTE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
670 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
671 Store4BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
a61af66fc99e Initial load
duke
parents:
diff changeset
672 : VectorStoreNode(c,mem,adr,at,val) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
673 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
674 virtual uint length() const { return 4; }
a61af66fc99e Initial load
duke
parents:
diff changeset
675 };
a61af66fc99e Initial load
duke
parents:
diff changeset
676
a61af66fc99e Initial load
duke
parents:
diff changeset
677 //------------------------------Store8CNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
678 // Vector store of 8 chars (16bits signed/unsigned) to memory
a61af66fc99e Initial load
duke
parents:
diff changeset
679 class Store8CNode : public VectorStoreNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
680 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
681 virtual BasicType elt_basic_type() const { return T_CHAR; }
a61af66fc99e Initial load
duke
parents:
diff changeset
682 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
683 Store8CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
a61af66fc99e Initial load
duke
parents:
diff changeset
684 : VectorStoreNode(c,mem,adr,at,val) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
685 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
686 virtual uint length() const { return 8; }
a61af66fc99e Initial load
duke
parents:
diff changeset
687 };
a61af66fc99e Initial load
duke
parents:
diff changeset
688
a61af66fc99e Initial load
duke
parents:
diff changeset
689 //------------------------------Store4CNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
690 // Vector store of 4 chars (16bits signed/unsigned) to memory
a61af66fc99e Initial load
duke
parents:
diff changeset
691 class Store4CNode : public VectorStoreNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
692 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
693 virtual BasicType elt_basic_type() const { return T_CHAR; }
a61af66fc99e Initial load
duke
parents:
diff changeset
694 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
695 Store4CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
a61af66fc99e Initial load
duke
parents:
diff changeset
696 : VectorStoreNode(c,mem,adr,at,val) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
697 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
698 virtual uint length() const { return 4; }
a61af66fc99e Initial load
duke
parents:
diff changeset
699 };
a61af66fc99e Initial load
duke
parents:
diff changeset
700
a61af66fc99e Initial load
duke
parents:
diff changeset
701 //------------------------------Store2CNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
702 // Vector store of 2 chars (16bits signed/unsigned) to memory
a61af66fc99e Initial load
duke
parents:
diff changeset
703 class Store2CNode : public VectorStoreNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
704 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
705 virtual BasicType elt_basic_type() const { return T_CHAR; }
a61af66fc99e Initial load
duke
parents:
diff changeset
706 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
707 Store2CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
a61af66fc99e Initial load
duke
parents:
diff changeset
708 : VectorStoreNode(c,mem,adr,at,val) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
709 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
710 virtual uint length() const { return 2; }
a61af66fc99e Initial load
duke
parents:
diff changeset
711 };
a61af66fc99e Initial load
duke
parents:
diff changeset
712
a61af66fc99e Initial load
duke
parents:
diff changeset
713 //------------------------------Store4INode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
714 // Vector store of 4 integers (32bits signed) to memory
a61af66fc99e Initial load
duke
parents:
diff changeset
715 class Store4INode : public VectorStoreNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
716 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
717 virtual BasicType elt_basic_type() const { return T_INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
718 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
719 Store4INode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
a61af66fc99e Initial load
duke
parents:
diff changeset
720 : VectorStoreNode(c,mem,adr,at,val) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
721 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
722 virtual uint length() const { return 4; }
a61af66fc99e Initial load
duke
parents:
diff changeset
723 };
a61af66fc99e Initial load
duke
parents:
diff changeset
724
a61af66fc99e Initial load
duke
parents:
diff changeset
725 //------------------------------Store2INode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
726 // Vector store of 2 integers (32bits signed) to memory
a61af66fc99e Initial load
duke
parents:
diff changeset
727 class Store2INode : public VectorStoreNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
728 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
729 virtual BasicType elt_basic_type() const { return T_INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
730 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
731 Store2INode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
a61af66fc99e Initial load
duke
parents:
diff changeset
732 : VectorStoreNode(c,mem,adr,at,val) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
733 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
734 virtual uint length() const { return 2; }
a61af66fc99e Initial load
duke
parents:
diff changeset
735 };
a61af66fc99e Initial load
duke
parents:
diff changeset
736
a61af66fc99e Initial load
duke
parents:
diff changeset
737 //------------------------------Store2LNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
738 // Vector store of 2 longs (64bits signed) to memory
a61af66fc99e Initial load
duke
parents:
diff changeset
739 class Store2LNode : public VectorStoreNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
740 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
741 virtual BasicType elt_basic_type() const { return T_LONG; }
a61af66fc99e Initial load
duke
parents:
diff changeset
742 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
743 Store2LNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
a61af66fc99e Initial load
duke
parents:
diff changeset
744 : VectorStoreNode(c,mem,adr,at,val) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
745 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
746 virtual uint length() const { return 2; }
a61af66fc99e Initial load
duke
parents:
diff changeset
747 };
a61af66fc99e Initial load
duke
parents:
diff changeset
748
a61af66fc99e Initial load
duke
parents:
diff changeset
749 //------------------------------Store4FNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
750 // Vector store of 4 floats (32bits) to memory
a61af66fc99e Initial load
duke
parents:
diff changeset
751 class Store4FNode : public VectorStoreNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
752 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
753 virtual BasicType elt_basic_type() const { return T_FLOAT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
754 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
755 Store4FNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
a61af66fc99e Initial load
duke
parents:
diff changeset
756 : VectorStoreNode(c,mem,adr,at,val) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
757 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
758 virtual uint length() const { return 4; }
a61af66fc99e Initial load
duke
parents:
diff changeset
759 };
a61af66fc99e Initial load
duke
parents:
diff changeset
760
a61af66fc99e Initial load
duke
parents:
diff changeset
761 //------------------------------Store2FNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
762 // Vector store of 2 floats (32bits) to memory
a61af66fc99e Initial load
duke
parents:
diff changeset
763 class Store2FNode : public VectorStoreNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
764 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
765 virtual BasicType elt_basic_type() const { return T_FLOAT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
766 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
767 Store2FNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
a61af66fc99e Initial load
duke
parents:
diff changeset
768 : VectorStoreNode(c,mem,adr,at,val) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
769 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
770 virtual uint length() const { return 2; }
a61af66fc99e Initial load
duke
parents:
diff changeset
771 };
a61af66fc99e Initial load
duke
parents:
diff changeset
772
a61af66fc99e Initial load
duke
parents:
diff changeset
773 //------------------------------Store2DNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
774 // Vector store of 2 doubles (64bits) to memory
a61af66fc99e Initial load
duke
parents:
diff changeset
775 class Store2DNode : public VectorStoreNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
776 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
777 virtual BasicType elt_basic_type() const { return T_DOUBLE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
778 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
779 Store2DNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
a61af66fc99e Initial load
duke
parents:
diff changeset
780 : VectorStoreNode(c,mem,adr,at,val) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
781 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
782 virtual uint length() const { return 2; }
a61af66fc99e Initial load
duke
parents:
diff changeset
783 };
a61af66fc99e Initial load
duke
parents:
diff changeset
784
a61af66fc99e Initial load
duke
parents:
diff changeset
785 //=========================Promote_Scalar_to_Vector====================================
a61af66fc99e Initial load
duke
parents:
diff changeset
786
a61af66fc99e Initial load
duke
parents:
diff changeset
787 //------------------------------Replicate16BNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
788 // Replicate byte scalar to be vector of 16 bytes
a61af66fc99e Initial load
duke
parents:
diff changeset
789 class Replicate16BNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
790 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
791 virtual BasicType elt_basic_type() const { return T_BYTE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
792 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
793 Replicate16BNode(Node* in1) : VectorNode(in1, 16) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
794 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
795 };
a61af66fc99e Initial load
duke
parents:
diff changeset
796
a61af66fc99e Initial load
duke
parents:
diff changeset
797 //------------------------------Replicate8BNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
798 // Replicate byte scalar to be vector of 8 bytes
a61af66fc99e Initial load
duke
parents:
diff changeset
799 class Replicate8BNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
800 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
801 virtual BasicType elt_basic_type() const { return T_BYTE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
802 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
803 Replicate8BNode(Node* in1) : VectorNode(in1, 8) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
804 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
805 };
a61af66fc99e Initial load
duke
parents:
diff changeset
806
a61af66fc99e Initial load
duke
parents:
diff changeset
807 //------------------------------Replicate4BNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
808 // Replicate byte scalar to be vector of 4 bytes
a61af66fc99e Initial load
duke
parents:
diff changeset
809 class Replicate4BNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
810 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
811 virtual BasicType elt_basic_type() const { return T_BYTE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
812 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
813 Replicate4BNode(Node* in1) : VectorNode(in1, 4) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
814 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
815 };
a61af66fc99e Initial load
duke
parents:
diff changeset
816
a61af66fc99e Initial load
duke
parents:
diff changeset
817 //------------------------------Replicate8CNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
818 // Replicate char scalar to be vector of 8 chars
a61af66fc99e Initial load
duke
parents:
diff changeset
819 class Replicate8CNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
820 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
821 virtual BasicType elt_basic_type() const { return T_CHAR; }
a61af66fc99e Initial load
duke
parents:
diff changeset
822 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
823 Replicate8CNode(Node* in1) : VectorNode(in1, 8) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
824 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
825 };
a61af66fc99e Initial load
duke
parents:
diff changeset
826
a61af66fc99e Initial load
duke
parents:
diff changeset
827 //------------------------------Replicate4CNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
828 // Replicate char scalar to be vector of 4 chars
a61af66fc99e Initial load
duke
parents:
diff changeset
829 class Replicate4CNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
830 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
831 virtual BasicType elt_basic_type() const { return T_CHAR; }
a61af66fc99e Initial load
duke
parents:
diff changeset
832 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
833 Replicate4CNode(Node* in1) : VectorNode(in1, 4) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
834 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
835 };
a61af66fc99e Initial load
duke
parents:
diff changeset
836
a61af66fc99e Initial load
duke
parents:
diff changeset
837 //------------------------------Replicate2CNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
838 // Replicate char scalar to be vector of 2 chars
a61af66fc99e Initial load
duke
parents:
diff changeset
839 class Replicate2CNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
840 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
841 virtual BasicType elt_basic_type() const { return T_CHAR; }
a61af66fc99e Initial load
duke
parents:
diff changeset
842 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
843 Replicate2CNode(Node* in1) : VectorNode(in1, 2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
844 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
845 };
a61af66fc99e Initial load
duke
parents:
diff changeset
846
a61af66fc99e Initial load
duke
parents:
diff changeset
847 //------------------------------Replicate8SNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
848 // Replicate short scalar to be vector of 8 shorts
a61af66fc99e Initial load
duke
parents:
diff changeset
849 class Replicate8SNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
850 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
851 virtual BasicType elt_basic_type() const { return T_SHORT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
852 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
853 Replicate8SNode(Node* in1) : VectorNode(in1, 8) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
854 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
855 };
a61af66fc99e Initial load
duke
parents:
diff changeset
856
a61af66fc99e Initial load
duke
parents:
diff changeset
857 //------------------------------Replicate4SNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
858 // Replicate short scalar to be vector of 4 shorts
a61af66fc99e Initial load
duke
parents:
diff changeset
859 class Replicate4SNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
860 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
861 virtual BasicType elt_basic_type() const { return T_SHORT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
862 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
863 Replicate4SNode(Node* in1) : VectorNode(in1, 4) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
864 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
865 };
a61af66fc99e Initial load
duke
parents:
diff changeset
866
a61af66fc99e Initial load
duke
parents:
diff changeset
867 //------------------------------Replicate2SNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
868 // Replicate short scalar to be vector of 2 shorts
a61af66fc99e Initial load
duke
parents:
diff changeset
869 class Replicate2SNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
870 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
871 virtual BasicType elt_basic_type() const { return T_SHORT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
872 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
873 Replicate2SNode(Node* in1) : VectorNode(in1, 2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
874 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
875 };
a61af66fc99e Initial load
duke
parents:
diff changeset
876
a61af66fc99e Initial load
duke
parents:
diff changeset
877 //------------------------------Replicate4INode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
878 // Replicate int scalar to be vector of 4 ints
a61af66fc99e Initial load
duke
parents:
diff changeset
879 class Replicate4INode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
880 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
881 virtual BasicType elt_basic_type() const { return T_INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
882 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
883 Replicate4INode(Node* in1) : VectorNode(in1, 4) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
884 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
885 };
a61af66fc99e Initial load
duke
parents:
diff changeset
886
a61af66fc99e Initial load
duke
parents:
diff changeset
887 //------------------------------Replicate2INode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
888 // Replicate int scalar to be vector of 2 ints
a61af66fc99e Initial load
duke
parents:
diff changeset
889 class Replicate2INode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
890 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
891 virtual BasicType elt_basic_type() const { return T_INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
892 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
893 Replicate2INode(Node* in1) : VectorNode(in1, 2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
894 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
895 };
a61af66fc99e Initial load
duke
parents:
diff changeset
896
a61af66fc99e Initial load
duke
parents:
diff changeset
897 //------------------------------Replicate2LNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
898 // Replicate long scalar to be vector of 2 longs
a61af66fc99e Initial load
duke
parents:
diff changeset
899 class Replicate2LNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
900 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
901 virtual BasicType elt_basic_type() const { return T_LONG; }
a61af66fc99e Initial load
duke
parents:
diff changeset
902 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
903 Replicate2LNode(Node* in1) : VectorNode(in1, 2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
904 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
905 };
a61af66fc99e Initial load
duke
parents:
diff changeset
906
a61af66fc99e Initial load
duke
parents:
diff changeset
907 //------------------------------Replicate4FNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
908 // Replicate float scalar to be vector of 4 floats
a61af66fc99e Initial load
duke
parents:
diff changeset
909 class Replicate4FNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
910 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
911 virtual BasicType elt_basic_type() const { return T_FLOAT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
912 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
913 Replicate4FNode(Node* in1) : VectorNode(in1, 4) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
914 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
915 };
a61af66fc99e Initial load
duke
parents:
diff changeset
916
a61af66fc99e Initial load
duke
parents:
diff changeset
917 //------------------------------Replicate2FNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
918 // Replicate float scalar to be vector of 2 floats
a61af66fc99e Initial load
duke
parents:
diff changeset
919 class Replicate2FNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
920 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
921 virtual BasicType elt_basic_type() const { return T_FLOAT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
922 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
923 Replicate2FNode(Node* in1) : VectorNode(in1, 2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
924 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
925 };
a61af66fc99e Initial load
duke
parents:
diff changeset
926
a61af66fc99e Initial load
duke
parents:
diff changeset
927 //------------------------------Replicate2DNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
928 // Replicate double scalar to be vector of 2 doubles
a61af66fc99e Initial load
duke
parents:
diff changeset
929 class Replicate2DNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
930 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
931 virtual BasicType elt_basic_type() const { return T_DOUBLE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
932 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
933 Replicate2DNode(Node* in1) : VectorNode(in1, 2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
934 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
935 };
a61af66fc99e Initial load
duke
parents:
diff changeset
936
a61af66fc99e Initial load
duke
parents:
diff changeset
937 //========================Pack_Scalars_into_a_Vector==============================
a61af66fc99e Initial load
duke
parents:
diff changeset
938
a61af66fc99e Initial load
duke
parents:
diff changeset
939 //------------------------------PackNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
940 // Pack parent class (not for code generation).
a61af66fc99e Initial load
duke
parents:
diff changeset
941 class PackNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
942 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
943 PackNode(Node* in1) : VectorNode(in1, 1) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
944 PackNode(Node* in1, Node* n2) : VectorNode(in1, n2, 2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
945 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
946
a61af66fc99e Initial load
duke
parents:
diff changeset
947 void add_opd(Node* n) {
a61af66fc99e Initial load
duke
parents:
diff changeset
948 add_req(n);
a61af66fc99e Initial load
duke
parents:
diff changeset
949 _length++;
a61af66fc99e Initial load
duke
parents:
diff changeset
950 assert(_length == req() - 1, "vector length matches edge count");
a61af66fc99e Initial load
duke
parents:
diff changeset
951 }
a61af66fc99e Initial load
duke
parents:
diff changeset
952
a61af66fc99e Initial load
duke
parents:
diff changeset
953 // Create a binary tree form for Packs. [lo, hi) (half-open) range
a61af66fc99e Initial load
duke
parents:
diff changeset
954 Node* binaryTreePack(Compile* C, int lo, int hi);
a61af66fc99e Initial load
duke
parents:
diff changeset
955
a61af66fc99e Initial load
duke
parents:
diff changeset
956 static PackNode* make(Compile* C, Node* s, const Type* elt_t);
a61af66fc99e Initial load
duke
parents:
diff changeset
957 };
a61af66fc99e Initial load
duke
parents:
diff changeset
958
a61af66fc99e Initial load
duke
parents:
diff changeset
959 //------------------------------PackBNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
960 // Pack byte scalars into vector
a61af66fc99e Initial load
duke
parents:
diff changeset
961 class PackBNode : public PackNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
962 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
963 virtual BasicType elt_basic_type() const { return T_BYTE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
964 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
965 PackBNode(Node* in1) : PackNode(in1) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
966 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
967 };
a61af66fc99e Initial load
duke
parents:
diff changeset
968
a61af66fc99e Initial load
duke
parents:
diff changeset
969 //------------------------------PackCNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
970 // Pack char scalars into vector
a61af66fc99e Initial load
duke
parents:
diff changeset
971 class PackCNode : public PackNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
972 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
973 virtual BasicType elt_basic_type() const { return T_CHAR; }
a61af66fc99e Initial load
duke
parents:
diff changeset
974 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
975 PackCNode(Node* in1) : PackNode(in1) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
976 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
977 };
a61af66fc99e Initial load
duke
parents:
diff changeset
978
a61af66fc99e Initial load
duke
parents:
diff changeset
979 //------------------------------PackSNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
980 // Pack short scalars into a vector
a61af66fc99e Initial load
duke
parents:
diff changeset
981 class PackSNode : public PackNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
982 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
983 virtual BasicType elt_basic_type() const { return T_SHORT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
984 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
985 PackSNode(Node* in1) : PackNode(in1) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
986 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
987 };
a61af66fc99e Initial load
duke
parents:
diff changeset
988
a61af66fc99e Initial load
duke
parents:
diff changeset
989 //------------------------------PackINode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
990 // Pack integer scalars into a vector
a61af66fc99e Initial load
duke
parents:
diff changeset
991 class PackINode : public PackNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
992 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
993 virtual BasicType elt_basic_type() const { return T_INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
994 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
995 PackINode(Node* in1) : PackNode(in1) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
996 PackINode(Node* in1, Node* in2) : PackNode(in1, in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
997 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
998 };
a61af66fc99e Initial load
duke
parents:
diff changeset
999
a61af66fc99e Initial load
duke
parents:
diff changeset
1000 //------------------------------PackLNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
1001 // Pack long scalars into a vector
a61af66fc99e Initial load
duke
parents:
diff changeset
1002 class PackLNode : public PackNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
1003 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
1004 virtual BasicType elt_basic_type() const { return T_LONG; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1005 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
1006 PackLNode(Node* in1) : PackNode(in1) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
1007 PackLNode(Node* in1, Node* in2) : PackNode(in1, in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
1008 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
1009 };
a61af66fc99e Initial load
duke
parents:
diff changeset
1010
a61af66fc99e Initial load
duke
parents:
diff changeset
1011 //------------------------------PackFNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
1012 // Pack float scalars into vector
a61af66fc99e Initial load
duke
parents:
diff changeset
1013 class PackFNode : public PackNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
1014 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
1015 virtual BasicType elt_basic_type() const { return T_FLOAT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1016 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
1017 PackFNode(Node* in1) : PackNode(in1) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
1018 PackFNode(Node* in1, Node* in2) : PackNode(in1, in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
1019 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
1020 };
a61af66fc99e Initial load
duke
parents:
diff changeset
1021
a61af66fc99e Initial load
duke
parents:
diff changeset
1022 //------------------------------PackDNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
1023 // Pack double scalars into a vector
a61af66fc99e Initial load
duke
parents:
diff changeset
1024 class PackDNode : public PackNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
1025 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
1026 virtual BasicType elt_basic_type() const { return T_DOUBLE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1027 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
1028 PackDNode(Node* in1) : PackNode(in1) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
1029 PackDNode(Node* in1, Node* in2) : PackNode(in1, in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
1030 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
1031 };
a61af66fc99e Initial load
duke
parents:
diff changeset
1032
a61af66fc99e Initial load
duke
parents:
diff changeset
1033 // The Pack2xN nodes assist code generation. They are created from
a61af66fc99e Initial load
duke
parents:
diff changeset
1034 // Pack4C, etc. nodes in final_graph_reshape in the form of a
a61af66fc99e Initial load
duke
parents:
diff changeset
1035 // balanced, binary tree.
a61af66fc99e Initial load
duke
parents:
diff changeset
1036
a61af66fc99e Initial load
duke
parents:
diff changeset
1037 //------------------------------Pack2x1BNode-----------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
1038 // Pack 2 1-byte integers into vector of 2 bytes
a61af66fc99e Initial load
duke
parents:
diff changeset
1039 class Pack2x1BNode : public PackNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
1040 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
1041 virtual BasicType elt_basic_type() const { return T_BYTE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1042 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
1043 Pack2x1BNode(Node *in1, Node* in2) : PackNode(in1, in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
1044 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
1045 virtual uint ideal_reg() const { return Op_RegI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1046 };
a61af66fc99e Initial load
duke
parents:
diff changeset
1047
a61af66fc99e Initial load
duke
parents:
diff changeset
1048 //------------------------------Pack2x2BNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
1049 // Pack 2 2-byte integers into vector of 4 bytes
a61af66fc99e Initial load
duke
parents:
diff changeset
1050 class Pack2x2BNode : public PackNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
1051 protected:
a61af66fc99e Initial load
duke
parents:
diff changeset
1052 virtual BasicType elt_basic_type() const { return T_CHAR; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1053 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
1054 Pack2x2BNode(Node *in1, Node* in2) : PackNode(in1, in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
1055 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
1056 virtual uint ideal_reg() const { return Op_RegI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1057 };
a61af66fc99e Initial load
duke
parents:
diff changeset
1058
a61af66fc99e Initial load
duke
parents:
diff changeset
1059 //========================Extract_Scalar_from_Vector===============================
a61af66fc99e Initial load
duke
parents:
diff changeset
1060
a61af66fc99e Initial load
duke
parents:
diff changeset
1061 //------------------------------ExtractNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
1062 // Extract a scalar from a vector at position "pos"
a61af66fc99e Initial load
duke
parents:
diff changeset
1063 class ExtractNode : public Node {
a61af66fc99e Initial load
duke
parents:
diff changeset
1064 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
1065 ExtractNode(Node* src, ConINode* pos) : Node(NULL, src, (Node*)pos) {
a61af66fc99e Initial load
duke
parents:
diff changeset
1066 assert(in(2)->get_int() >= 0, "positive constants");
a61af66fc99e Initial load
duke
parents:
diff changeset
1067 }
a61af66fc99e Initial load
duke
parents:
diff changeset
1068 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
1069 uint pos() const { return in(2)->get_int(); }
a61af66fc99e Initial load
duke
parents:
diff changeset
1070
a61af66fc99e Initial load
duke
parents:
diff changeset
1071 static Node* make(Compile* C, Node* v, uint position, const Type* opd_t);
a61af66fc99e Initial load
duke
parents:
diff changeset
1072 };
a61af66fc99e Initial load
duke
parents:
diff changeset
1073
a61af66fc99e Initial load
duke
parents:
diff changeset
1074 //------------------------------ExtractBNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
1075 // Extract a byte from a vector at position "pos"
a61af66fc99e Initial load
duke
parents:
diff changeset
1076 class ExtractBNode : public ExtractNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
1077 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
1078 ExtractBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
1079 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
1080 virtual const Type *bottom_type() const { return TypeInt::INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1081 virtual uint ideal_reg() const { return Op_RegI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1082 };
a61af66fc99e Initial load
duke
parents:
diff changeset
1083
a61af66fc99e Initial load
duke
parents:
diff changeset
1084 //------------------------------ExtractCNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
1085 // Extract a char from a vector at position "pos"
a61af66fc99e Initial load
duke
parents:
diff changeset
1086 class ExtractCNode : public ExtractNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
1087 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
1088 ExtractCNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
1089 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
1090 virtual const Type *bottom_type() const { return TypeInt::INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1091 virtual uint ideal_reg() const { return Op_RegI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1092 };
a61af66fc99e Initial load
duke
parents:
diff changeset
1093
a61af66fc99e Initial load
duke
parents:
diff changeset
1094 //------------------------------ExtractSNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
1095 // Extract a short from a vector at position "pos"
a61af66fc99e Initial load
duke
parents:
diff changeset
1096 class ExtractSNode : public ExtractNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
1097 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
1098 ExtractSNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
1099 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
1100 virtual const Type *bottom_type() const { return TypeInt::INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1101 virtual uint ideal_reg() const { return Op_RegI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1102 };
a61af66fc99e Initial load
duke
parents:
diff changeset
1103
a61af66fc99e Initial load
duke
parents:
diff changeset
1104 //------------------------------ExtractINode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
1105 // Extract an int from a vector at position "pos"
a61af66fc99e Initial load
duke
parents:
diff changeset
1106 class ExtractINode : public ExtractNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
1107 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
1108 ExtractINode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
1109 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
1110 virtual const Type *bottom_type() const { return TypeInt::INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1111 virtual uint ideal_reg() const { return Op_RegI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1112 };
a61af66fc99e Initial load
duke
parents:
diff changeset
1113
a61af66fc99e Initial load
duke
parents:
diff changeset
1114 //------------------------------ExtractLNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
1115 // Extract a long from a vector at position "pos"
a61af66fc99e Initial load
duke
parents:
diff changeset
1116 class ExtractLNode : public ExtractNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
1117 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
1118 ExtractLNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
1119 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
1120 virtual const Type *bottom_type() const { return TypeLong::LONG; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1121 virtual uint ideal_reg() const { return Op_RegL; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1122 };
a61af66fc99e Initial load
duke
parents:
diff changeset
1123
a61af66fc99e Initial load
duke
parents:
diff changeset
1124 //------------------------------ExtractFNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
1125 // Extract a float from a vector at position "pos"
a61af66fc99e Initial load
duke
parents:
diff changeset
1126 class ExtractFNode : public ExtractNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
1127 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
1128 ExtractFNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
1129 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
1130 virtual const Type *bottom_type() const { return Type::FLOAT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1131 virtual uint ideal_reg() const { return Op_RegF; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1132 };
a61af66fc99e Initial load
duke
parents:
diff changeset
1133
a61af66fc99e Initial load
duke
parents:
diff changeset
1134 //------------------------------ExtractDNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
1135 // Extract a double from a vector at position "pos"
a61af66fc99e Initial load
duke
parents:
diff changeset
1136 class ExtractDNode : public ExtractNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
1137 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
1138 ExtractDNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
1139 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
1140 virtual const Type *bottom_type() const { return Type::DOUBLE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1141 virtual uint ideal_reg() const { return Op_RegD; }
a61af66fc99e Initial load
duke
parents:
diff changeset
1142 };
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
1143
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
1144 #endif // SHARE_VM_OPTO_VECTORNODE_HPP