Mercurial > hg > graal-jvmci-8
annotate src/cpu/x86/vm/assembler_x86.hpp @ 24154:c2e117633778
use openjdk prefix if bootstrap jdk is an openjdk
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 07 Jul 2017 14:56:32 +0200 |
parents | f13e777eb255 |
children |
rev | line source |
---|---|
0 | 1 /* |
7951 | 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
0 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1503
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1503
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:
1503
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #ifndef CPU_X86_VM_ASSEMBLER_X86_HPP |
26 #define CPU_X86_VM_ASSEMBLER_X86_HPP | |
27 | |
7199
cd3d6a6b95d9
8003240: x86: move MacroAssembler into separate file
twisti
parents:
7198
diff
changeset
|
28 #include "asm/register.hpp" |
cd3d6a6b95d9
8003240: x86: move MacroAssembler into separate file
twisti
parents:
7198
diff
changeset
|
29 |
0 | 30 class BiasedLockingCounters; |
31 | |
32 // Contains all the definitions needed for x86 assembly code generation. | |
33 | |
34 // Calling convention | |
35 class Argument VALUE_OBJ_CLASS_SPEC { | |
36 public: | |
37 enum { | |
38 #ifdef _LP64 | |
39 #ifdef _WIN64 | |
40 n_int_register_parameters_c = 4, // rcx, rdx, r8, r9 (c_rarg0, c_rarg1, ...) | |
41 n_float_register_parameters_c = 4, // xmm0 - xmm3 (c_farg0, c_farg1, ... ) | |
42 #else | |
43 n_int_register_parameters_c = 6, // rdi, rsi, rdx, rcx, r8, r9 (c_rarg0, c_rarg1, ...) | |
44 n_float_register_parameters_c = 8, // xmm0 - xmm7 (c_farg0, c_farg1, ... ) | |
45 #endif // _WIN64 | |
46 n_int_register_parameters_j = 6, // j_rarg0, j_rarg1, ... | |
47 n_float_register_parameters_j = 8 // j_farg0, j_farg1, ... | |
48 #else | |
49 n_register_parameters = 0 // 0 registers used to pass arguments | |
50 #endif // _LP64 | |
51 }; | |
52 }; | |
53 | |
54 | |
55 #ifdef _LP64 | |
56 // Symbolically name the register arguments used by the c calling convention. | |
57 // Windows is different from linux/solaris. So much for standards... | |
58 | |
59 #ifdef _WIN64 | |
60 | |
61 REGISTER_DECLARATION(Register, c_rarg0, rcx); | |
62 REGISTER_DECLARATION(Register, c_rarg1, rdx); | |
63 REGISTER_DECLARATION(Register, c_rarg2, r8); | |
64 REGISTER_DECLARATION(Register, c_rarg3, r9); | |
65 | |
304 | 66 REGISTER_DECLARATION(XMMRegister, c_farg0, xmm0); |
67 REGISTER_DECLARATION(XMMRegister, c_farg1, xmm1); | |
68 REGISTER_DECLARATION(XMMRegister, c_farg2, xmm2); | |
69 REGISTER_DECLARATION(XMMRegister, c_farg3, xmm3); | |
0 | 70 |
71 #else | |
72 | |
73 REGISTER_DECLARATION(Register, c_rarg0, rdi); | |
74 REGISTER_DECLARATION(Register, c_rarg1, rsi); | |
75 REGISTER_DECLARATION(Register, c_rarg2, rdx); | |
76 REGISTER_DECLARATION(Register, c_rarg3, rcx); | |
77 REGISTER_DECLARATION(Register, c_rarg4, r8); | |
78 REGISTER_DECLARATION(Register, c_rarg5, r9); | |
79 | |
304 | 80 REGISTER_DECLARATION(XMMRegister, c_farg0, xmm0); |
81 REGISTER_DECLARATION(XMMRegister, c_farg1, xmm1); | |
82 REGISTER_DECLARATION(XMMRegister, c_farg2, xmm2); | |
83 REGISTER_DECLARATION(XMMRegister, c_farg3, xmm3); | |
84 REGISTER_DECLARATION(XMMRegister, c_farg4, xmm4); | |
85 REGISTER_DECLARATION(XMMRegister, c_farg5, xmm5); | |
86 REGISTER_DECLARATION(XMMRegister, c_farg6, xmm6); | |
87 REGISTER_DECLARATION(XMMRegister, c_farg7, xmm7); | |
0 | 88 |
89 #endif // _WIN64 | |
90 | |
91 // Symbolically name the register arguments used by the Java calling convention. | |
92 // We have control over the convention for java so we can do what we please. | |
93 // What pleases us is to offset the java calling convention so that when | |
94 // we call a suitable jni method the arguments are lined up and we don't | |
95 // have to do little shuffling. A suitable jni method is non-static and a | |
96 // small number of arguments (two fewer args on windows) | |
97 // | |
98 // |-------------------------------------------------------| | |
99 // | c_rarg0 c_rarg1 c_rarg2 c_rarg3 c_rarg4 c_rarg5 | | |
100 // |-------------------------------------------------------| | |
101 // | rcx rdx r8 r9 rdi* rsi* | windows (* not a c_rarg) | |
102 // | rdi rsi rdx rcx r8 r9 | solaris/linux | |
103 // |-------------------------------------------------------| | |
104 // | j_rarg5 j_rarg0 j_rarg1 j_rarg2 j_rarg3 j_rarg4 | | |
105 // |-------------------------------------------------------| | |
106 | |
107 REGISTER_DECLARATION(Register, j_rarg0, c_rarg1); | |
108 REGISTER_DECLARATION(Register, j_rarg1, c_rarg2); | |
109 REGISTER_DECLARATION(Register, j_rarg2, c_rarg3); | |
110 // Windows runs out of register args here | |
111 #ifdef _WIN64 | |
112 REGISTER_DECLARATION(Register, j_rarg3, rdi); | |
113 REGISTER_DECLARATION(Register, j_rarg4, rsi); | |
114 #else | |
115 REGISTER_DECLARATION(Register, j_rarg3, c_rarg4); | |
116 REGISTER_DECLARATION(Register, j_rarg4, c_rarg5); | |
117 #endif /* _WIN64 */ | |
118 REGISTER_DECLARATION(Register, j_rarg5, c_rarg0); | |
119 | |
304 | 120 REGISTER_DECLARATION(XMMRegister, j_farg0, xmm0); |
121 REGISTER_DECLARATION(XMMRegister, j_farg1, xmm1); | |
122 REGISTER_DECLARATION(XMMRegister, j_farg2, xmm2); | |
123 REGISTER_DECLARATION(XMMRegister, j_farg3, xmm3); | |
124 REGISTER_DECLARATION(XMMRegister, j_farg4, xmm4); | |
125 REGISTER_DECLARATION(XMMRegister, j_farg5, xmm5); | |
126 REGISTER_DECLARATION(XMMRegister, j_farg6, xmm6); | |
127 REGISTER_DECLARATION(XMMRegister, j_farg7, xmm7); | |
0 | 128 |
129 REGISTER_DECLARATION(Register, rscratch1, r10); // volatile | |
130 REGISTER_DECLARATION(Register, rscratch2, r11); // volatile | |
131 | |
304 | 132 REGISTER_DECLARATION(Register, r12_heapbase, r12); // callee-saved |
0 | 133 REGISTER_DECLARATION(Register, r15_thread, r15); // callee-saved |
134 | |
304 | 135 #else |
136 // rscratch1 will apear in 32bit code that is dead but of course must compile | |
137 // Using noreg ensures if the dead code is incorrectly live and executed it | |
138 // will cause an assertion failure | |
139 #define rscratch1 noreg | |
2002 | 140 #define rscratch2 noreg |
304 | 141 |
0 | 142 #endif // _LP64 |
143 | |
23050
e8260b6328fb
8068945: Use RBP register as proper frame pointer in JIT compiled code on x86
zmajo
parents:
20438
diff
changeset
|
144 // JSR 292 |
e8260b6328fb
8068945: Use RBP register as proper frame pointer in JIT compiled code on x86
zmajo
parents:
20438
diff
changeset
|
145 // On x86, the SP does not have to be saved when invoking method handle intrinsics |
e8260b6328fb
8068945: Use RBP register as proper frame pointer in JIT compiled code on x86
zmajo
parents:
20438
diff
changeset
|
146 // or compiled lambda forms. We indicate that by setting rbp_mh_SP_save to noreg. |
e8260b6328fb
8068945: Use RBP register as proper frame pointer in JIT compiled code on x86
zmajo
parents:
20438
diff
changeset
|
147 REGISTER_DECLARATION(Register, rbp_mh_SP_save, noreg); |
1564 | 148 |
0 | 149 // Address is an abstraction used to represent a memory location |
150 // using any of the amd64 addressing modes with one object. | |
151 // | |
152 // Note: A register location is represented via a Register, not | |
153 // via an address for efficiency & simplicity reasons. | |
154 | |
155 class ArrayAddress; | |
156 | |
157 class Address VALUE_OBJ_CLASS_SPEC { | |
158 public: | |
159 enum ScaleFactor { | |
160 no_scale = -1, | |
161 times_1 = 0, | |
162 times_2 = 1, | |
163 times_4 = 2, | |
304 | 164 times_8 = 3, |
165 times_ptr = LP64_ONLY(times_8) NOT_LP64(times_4) | |
0 | 166 }; |
622
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
167 static ScaleFactor times(int size) { |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
168 assert(size >= 1 && size <= 8 && is_power_of_2(size), "bad scale size"); |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
169 if (size == 8) return times_8; |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
170 if (size == 4) return times_4; |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
171 if (size == 2) return times_2; |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
172 return times_1; |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
173 } |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
174 static int scale_size(ScaleFactor scale) { |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
175 assert(scale != no_scale, ""); |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
176 assert(((1 << (int)times_1) == 1 && |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
177 (1 << (int)times_2) == 2 && |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
178 (1 << (int)times_4) == 4 && |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
179 (1 << (int)times_8) == 8), ""); |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
180 return (1 << (int)scale); |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
181 } |
0 | 182 |
183 private: | |
184 Register _base; | |
185 Register _index; | |
186 ScaleFactor _scale; | |
187 int _disp; | |
188 RelocationHolder _rspec; | |
189 | |
304 | 190 // Easily misused constructors make them private |
191 // %%% can we make these go away? | |
192 NOT_LP64(Address(address loc, RelocationHolder spec);) | |
193 Address(int disp, address loc, relocInfo::relocType rtype); | |
194 Address(int disp, address loc, RelocationHolder spec); | |
0 | 195 |
196 public: | |
304 | 197 |
198 int disp() { return _disp; } | |
0 | 199 // creation |
200 Address() | |
201 : _base(noreg), | |
202 _index(noreg), | |
203 _scale(no_scale), | |
204 _disp(0) { | |
205 } | |
206 | |
207 // No default displacement otherwise Register can be implicitly | |
208 // converted to 0(Register) which is quite a different animal. | |
209 | |
210 Address(Register base, int disp) | |
211 : _base(base), | |
212 _index(noreg), | |
213 _scale(no_scale), | |
214 _disp(disp) { | |
215 } | |
216 | |
217 Address(Register base, Register index, ScaleFactor scale, int disp = 0) | |
218 : _base (base), | |
219 _index(index), | |
220 _scale(scale), | |
221 _disp (disp) { | |
222 assert(!index->is_valid() == (scale == Address::no_scale), | |
223 "inconsistent address"); | |
224 } | |
225 | |
665
c89f86385056
6814659: separable cleanups and subroutines for 6655638
jrose
parents:
644
diff
changeset
|
226 Address(Register base, RegisterOrConstant index, ScaleFactor scale = times_1, int disp = 0) |
622
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
227 : _base (base), |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
228 _index(index.register_or_noreg()), |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
229 _scale(scale), |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
230 _disp (disp + (index.constant_or_zero() * scale_size(scale))) { |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
231 if (!index.is_register()) scale = Address::no_scale; |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
232 assert(!_index->is_valid() == (scale == Address::no_scale), |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
233 "inconsistent address"); |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
234 } |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
235 |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
236 Address plus_disp(int disp) const { |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
237 Address a = (*this); |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
238 a._disp += disp; |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
239 return a; |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
240 } |
3363
167b70ff3abc
6939861: JVM should handle more conversion operations
never
parents:
3336
diff
changeset
|
241 Address plus_disp(RegisterOrConstant disp, ScaleFactor scale = times_1) const { |
167b70ff3abc
6939861: JVM should handle more conversion operations
never
parents:
3336
diff
changeset
|
242 Address a = (*this); |
167b70ff3abc
6939861: JVM should handle more conversion operations
never
parents:
3336
diff
changeset
|
243 a._disp += disp.constant_or_zero() * scale_size(scale); |
167b70ff3abc
6939861: JVM should handle more conversion operations
never
parents:
3336
diff
changeset
|
244 if (disp.is_register()) { |
167b70ff3abc
6939861: JVM should handle more conversion operations
never
parents:
3336
diff
changeset
|
245 assert(!a.index()->is_valid(), "competing indexes"); |
167b70ff3abc
6939861: JVM should handle more conversion operations
never
parents:
3336
diff
changeset
|
246 a._index = disp.as_register(); |
167b70ff3abc
6939861: JVM should handle more conversion operations
never
parents:
3336
diff
changeset
|
247 a._scale = scale; |
167b70ff3abc
6939861: JVM should handle more conversion operations
never
parents:
3336
diff
changeset
|
248 } |
167b70ff3abc
6939861: JVM should handle more conversion operations
never
parents:
3336
diff
changeset
|
249 return a; |
167b70ff3abc
6939861: JVM should handle more conversion operations
never
parents:
3336
diff
changeset
|
250 } |
167b70ff3abc
6939861: JVM should handle more conversion operations
never
parents:
3336
diff
changeset
|
251 bool is_same_address(Address a) const { |
167b70ff3abc
6939861: JVM should handle more conversion operations
never
parents:
3336
diff
changeset
|
252 // disregard _rspec |
167b70ff3abc
6939861: JVM should handle more conversion operations
never
parents:
3336
diff
changeset
|
253 return _base == a._base && _disp == a._disp && _index == a._index && _scale == a._scale; |
167b70ff3abc
6939861: JVM should handle more conversion operations
never
parents:
3336
diff
changeset
|
254 } |
622
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
255 |
0 | 256 // The following two overloads are used in connection with the |
257 // ByteSize type (see sizes.hpp). They simplify the use of | |
258 // ByteSize'd arguments in assembly code. Note that their equivalent | |
259 // for the optimized build are the member functions with int disp | |
260 // argument since ByteSize is mapped to an int type in that case. | |
261 // | |
262 // Note: DO NOT introduce similar overloaded functions for WordSize | |
263 // arguments as in the optimized mode, both ByteSize and WordSize | |
264 // are mapped to the same type and thus the compiler cannot make a | |
265 // distinction anymore (=> compiler errors). | |
266 | |
267 #ifdef ASSERT | |
268 Address(Register base, ByteSize disp) | |
269 : _base(base), | |
270 _index(noreg), | |
271 _scale(no_scale), | |
272 _disp(in_bytes(disp)) { | |
273 } | |
274 | |
275 Address(Register base, Register index, ScaleFactor scale, ByteSize disp) | |
276 : _base(base), | |
277 _index(index), | |
278 _scale(scale), | |
279 _disp(in_bytes(disp)) { | |
280 assert(!index->is_valid() == (scale == Address::no_scale), | |
281 "inconsistent address"); | |
282 } | |
622
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
283 |
665
c89f86385056
6814659: separable cleanups and subroutines for 6655638
jrose
parents:
644
diff
changeset
|
284 Address(Register base, RegisterOrConstant index, ScaleFactor scale, ByteSize disp) |
622
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
285 : _base (base), |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
286 _index(index.register_or_noreg()), |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
287 _scale(scale), |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
288 _disp (in_bytes(disp) + (index.constant_or_zero() * scale_size(scale))) { |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
289 if (!index.is_register()) scale = Address::no_scale; |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
290 assert(!_index->is_valid() == (scale == Address::no_scale), |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
291 "inconsistent address"); |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
292 } |
56aae7be60d4
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
420
diff
changeset
|
293 |
0 | 294 #endif // ASSERT |
295 | |
296 // accessors | |
342
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
71
diff
changeset
|
297 bool uses(Register reg) const { return _base == reg || _index == reg; } |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
71
diff
changeset
|
298 Register base() const { return _base; } |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
71
diff
changeset
|
299 Register index() const { return _index; } |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
71
diff
changeset
|
300 ScaleFactor scale() const { return _scale; } |
37f87013dfd8
6711316: Open source the Garbage-First garbage collector
ysr
parents:
71
diff
changeset
|
301 int disp() const { return _disp; } |
0 | 302 |
303 // Convert the raw encoding form into the form expected by the constructor for | |
304 // Address. An index of 4 (rsp) corresponds to having no index, so convert | |
305 // that to noreg for the Address constructor. | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6614
diff
changeset
|
306 static Address make_raw(int base, int index, int scale, int disp, relocInfo::relocType disp_reloc); |
0 | 307 |
308 static Address make_array(ArrayAddress); | |
309 | |
310 private: | |
311 bool base_needs_rex() const { | |
312 return _base != noreg && _base->encoding() >= 8; | |
313 } | |
314 | |
315 bool index_needs_rex() const { | |
316 return _index != noreg &&_index->encoding() >= 8; | |
317 } | |
318 | |
319 relocInfo::relocType reloc() const { return _rspec.type(); } | |
320 | |
321 friend class Assembler; | |
322 friend class MacroAssembler; | |
323 friend class LIR_Assembler; // base/index/scale/disp | |
324 }; | |
325 | |
326 // | |
327 // AddressLiteral has been split out from Address because operands of this type | |
328 // need to be treated specially on 32bit vs. 64bit platforms. By splitting it out | |
329 // the few instructions that need to deal with address literals are unique and the | |
330 // MacroAssembler does not have to implement every instruction in the Assembler | |
331 // in order to search for address literals that may need special handling depending | |
332 // on the instruction and the platform. As small step on the way to merging i486/amd64 | |
333 // directories. | |
334 // | |
335 class AddressLiteral VALUE_OBJ_CLASS_SPEC { | |
336 friend class ArrayAddress; | |
337 RelocationHolder _rspec; | |
338 // Typically we use AddressLiterals we want to use their rval | |
339 // However in some situations we want the lval (effect address) of the item. | |
340 // We provide a special factory for making those lvals. | |
341 bool _is_lval; | |
342 | |
343 // If the target is far we'll need to load the ea of this to | |
344 // a register to reach it. Otherwise if near we can do rip | |
345 // relative addressing. | |
346 | |
347 address _target; | |
348 | |
349 protected: | |
350 // creation | |
351 AddressLiteral() | |
352 : _is_lval(false), | |
353 _target(NULL) | |
354 {} | |
355 | |
356 public: | |
357 | |
358 | |
359 AddressLiteral(address target, relocInfo::relocType rtype); | |
360 | |
361 AddressLiteral(address target, RelocationHolder const& rspec) | |
362 : _rspec(rspec), | |
363 _is_lval(false), | |
364 _target(target) | |
365 {} | |
366 | |
367 AddressLiteral addr() { | |
368 AddressLiteral ret = *this; | |
369 ret._is_lval = true; | |
370 return ret; | |
371 } | |
372 | |
373 | |
374 private: | |
375 | |
376 address target() { return _target; } | |
377 bool is_lval() { return _is_lval; } | |
378 | |
379 relocInfo::relocType reloc() const { return _rspec.type(); } | |
380 const RelocationHolder& rspec() const { return _rspec; } | |
381 | |
382 friend class Assembler; | |
383 friend class MacroAssembler; | |
384 friend class Address; | |
385 friend class LIR_Assembler; | |
386 }; | |
387 | |
388 // Convience classes | |
389 class RuntimeAddress: public AddressLiteral { | |
390 | |
391 public: | |
392 | |
393 RuntimeAddress(address target) : AddressLiteral(target, relocInfo::runtime_call_type) {} | |
394 | |
395 }; | |
396 | |
397 class ExternalAddress: public AddressLiteral { | |
2455
479b4b4b6950
6777083: assert(target != __null,"must not be null")
never
parents:
2415
diff
changeset
|
398 private: |
479b4b4b6950
6777083: assert(target != __null,"must not be null")
never
parents:
2415
diff
changeset
|
399 static relocInfo::relocType reloc_for_target(address target) { |
479b4b4b6950
6777083: assert(target != __null,"must not be null")
never
parents:
2415
diff
changeset
|
400 // Sometimes ExternalAddress is used for values which aren't |
479b4b4b6950
6777083: assert(target != __null,"must not be null")
never
parents:
2415
diff
changeset
|
401 // exactly addresses, like the card table base. |
479b4b4b6950
6777083: assert(target != __null,"must not be null")
never
parents:
2415
diff
changeset
|
402 // external_word_type can't be used for values in the first page |
479b4b4b6950
6777083: assert(target != __null,"must not be null")
never
parents:
2415
diff
changeset
|
403 // so just skip the reloc in that case. |
479b4b4b6950
6777083: assert(target != __null,"must not be null")
never
parents:
2415
diff
changeset
|
404 return external_word_Relocation::can_be_relocated(target) ? relocInfo::external_word_type : relocInfo::none; |
479b4b4b6950
6777083: assert(target != __null,"must not be null")
never
parents:
2415
diff
changeset
|
405 } |
479b4b4b6950
6777083: assert(target != __null,"must not be null")
never
parents:
2415
diff
changeset
|
406 |
479b4b4b6950
6777083: assert(target != __null,"must not be null")
never
parents:
2415
diff
changeset
|
407 public: |
479b4b4b6950
6777083: assert(target != __null,"must not be null")
never
parents:
2415
diff
changeset
|
408 |
479b4b4b6950
6777083: assert(target != __null,"must not be null")
never
parents:
2415
diff
changeset
|
409 ExternalAddress(address target) : AddressLiteral(target, reloc_for_target(target)) {} |
0 | 410 |
411 }; | |
412 | |
413 class InternalAddress: public AddressLiteral { | |
414 | |
415 public: | |
416 | |
417 InternalAddress(address target) : AddressLiteral(target, relocInfo::internal_word_type) {} | |
418 | |
419 }; | |
420 | |
421 // x86 can do array addressing as a single operation since disp can be an absolute | |
422 // address amd64 can't. We create a class that expresses the concept but does extra | |
423 // magic on amd64 to get the final result | |
424 | |
425 class ArrayAddress VALUE_OBJ_CLASS_SPEC { | |
426 private: | |
427 | |
428 AddressLiteral _base; | |
429 Address _index; | |
430 | |
431 public: | |
432 | |
433 ArrayAddress() {}; | |
434 ArrayAddress(AddressLiteral base, Address index): _base(base), _index(index) {}; | |
435 AddressLiteral base() { return _base; } | |
436 Address index() { return _index; } | |
437 | |
438 }; | |
439 | |
304 | 440 const int FPUStateSizeInWords = NOT_LP64(27) LP64_ONLY( 512 / wordSize); |
0 | 441 |
442 // The Intel x86/Amd64 Assembler: Pure assembler doing NO optimizations on the instruction | |
443 // level (e.g. mov rax, 0 is not translated into xor rax, rax!); i.e., what you write | |
444 // is what you get. The Assembler is generating code into a CodeBuffer. | |
445 | |
446 class Assembler : public AbstractAssembler { | |
447 friend class AbstractAssembler; // for the non-virtual hack | |
448 friend class LIR_Assembler; // as_Address() | |
304 | 449 friend class StubGenerator; |
0 | 450 |
451 public: | |
452 enum Condition { // The x86 condition codes used for conditional jumps/moves. | |
453 zero = 0x4, | |
454 notZero = 0x5, | |
455 equal = 0x4, | |
456 notEqual = 0x5, | |
457 less = 0xc, | |
458 lessEqual = 0xe, | |
459 greater = 0xf, | |
460 greaterEqual = 0xd, | |
461 below = 0x2, | |
462 belowEqual = 0x6, | |
463 above = 0x7, | |
464 aboveEqual = 0x3, | |
465 overflow = 0x0, | |
466 noOverflow = 0x1, | |
467 carrySet = 0x2, | |
468 carryClear = 0x3, | |
469 negative = 0x8, | |
470 positive = 0x9, | |
471 parity = 0xa, | |
472 noParity = 0xb | |
473 }; | |
474 | |
475 enum Prefix { | |
476 // segment overrides | |
477 CS_segment = 0x2e, | |
478 SS_segment = 0x36, | |
479 DS_segment = 0x3e, | |
480 ES_segment = 0x26, | |
481 FS_segment = 0x64, | |
482 GS_segment = 0x65, | |
483 | |
484 REX = 0x40, | |
485 | |
486 REX_B = 0x41, | |
487 REX_X = 0x42, | |
488 REX_XB = 0x43, | |
489 REX_R = 0x44, | |
490 REX_RB = 0x45, | |
491 REX_RX = 0x46, | |
492 REX_RXB = 0x47, | |
493 | |
494 REX_W = 0x48, | |
495 | |
496 REX_WB = 0x49, | |
497 REX_WX = 0x4A, | |
498 REX_WXB = 0x4B, | |
499 REX_WR = 0x4C, | |
500 REX_WRB = 0x4D, | |
501 REX_WRX = 0x4E, | |
4759 | 502 REX_WRXB = 0x4F, |
503 | |
504 VEX_3bytes = 0xC4, | |
505 VEX_2bytes = 0xC5 | |
506 }; | |
507 | |
508 enum VexPrefix { | |
509 VEX_B = 0x20, | |
510 VEX_X = 0x40, | |
511 VEX_R = 0x80, | |
512 VEX_W = 0x80 | |
513 }; | |
514 | |
515 enum VexSimdPrefix { | |
516 VEX_SIMD_NONE = 0x0, | |
517 VEX_SIMD_66 = 0x1, | |
518 VEX_SIMD_F3 = 0x2, | |
519 VEX_SIMD_F2 = 0x3 | |
520 }; | |
521 | |
522 enum VexOpcode { | |
523 VEX_OPCODE_NONE = 0x0, | |
524 VEX_OPCODE_0F = 0x1, | |
525 VEX_OPCODE_0F_38 = 0x2, | |
16784
88df5d7b1001
Correctly parse VEX encoded instructions in Assembler::locate_operand.
Roland Schatz <roland.schatz@oracle.com>
parents:
16064
diff
changeset
|
526 VEX_OPCODE_0F_3A = 0x3, |
88df5d7b1001
Correctly parse VEX encoded instructions in Assembler::locate_operand.
Roland Schatz <roland.schatz@oracle.com>
parents:
16064
diff
changeset
|
527 VEX_OPCODE_MASK = 0x1F |
0 | 528 }; |
529 | |
530 enum WhichOperand { | |
531 // input to locate_operand, and format code for relocations | |
304 | 532 imm_operand = 0, // embedded 32-bit|64-bit immediate operand |
0 | 533 disp32_operand = 1, // embedded 32-bit displacement or address |
534 call32_operand = 2, // embedded 32-bit self-relative displacement | |
304 | 535 #ifndef _LP64 |
0 | 536 _WhichOperand_limit = 3 |
304 | 537 #else |
538 narrow_oop_operand = 3, // embedded 32-bit immediate narrow oop | |
539 _WhichOperand_limit = 4 | |
540 #endif | |
0 | 541 }; |
542 | |
304 | 543 |
544 | |
545 // NOTE: The general philopsophy of the declarations here is that 64bit versions | |
546 // of instructions are freely declared without the need for wrapping them an ifdef. | |
547 // (Some dangerous instructions are ifdef's out of inappropriate jvm's.) | |
548 // In the .cpp file the implementations are wrapped so that they are dropped out | |
7951 | 549 // of the resulting jvm. This is done mostly to keep the footprint of MINIMAL |
304 | 550 // to the size it was prior to merging up the 32bit and 64bit assemblers. |
551 // | |
552 // This does mean you'll get a linker/runtime error if you use a 64bit only instruction | |
553 // in a 32bit vm. This is somewhat unfortunate but keeps the ifdef noise down. | |
554 | |
555 private: | |
556 | |
557 | |
558 // 64bit prefixes | |
559 int prefix_and_encode(int reg_enc, bool byteinst = false); | |
560 int prefixq_and_encode(int reg_enc); | |
561 | |
16064
03eda0a202e9
Better fix for prefix byte for AMD64 byte instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13561
diff
changeset
|
562 int prefix_and_encode(int dst_enc, int src_enc) { |
03eda0a202e9
Better fix for prefix byte for AMD64 byte instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13561
diff
changeset
|
563 return prefix_and_encode(dst_enc, false, src_enc, false); |
03eda0a202e9
Better fix for prefix byte for AMD64 byte instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13561
diff
changeset
|
564 } |
03eda0a202e9
Better fix for prefix byte for AMD64 byte instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13561
diff
changeset
|
565 int prefix_and_encode(int dst_enc, bool dst_is_byte, int src_enc, bool src_is_byte); |
304 | 566 int prefixq_and_encode(int dst_enc, int src_enc); |
567 | |
568 void prefix(Register reg); | |
569 void prefix(Address adr); | |
570 void prefixq(Address adr); | |
571 | |
572 void prefix(Address adr, Register reg, bool byteinst = false); | |
4759 | 573 void prefix(Address adr, XMMRegister reg); |
304 | 574 void prefixq(Address adr, Register reg); |
4759 | 575 void prefixq(Address adr, XMMRegister reg); |
304 | 576 |
577 void prefetch_prefix(Address src); | |
578 | |
4759 | 579 void rex_prefix(Address adr, XMMRegister xreg, |
580 VexSimdPrefix pre, VexOpcode opc, bool rex_w); | |
581 int rex_prefix_and_encode(int dst_enc, int src_enc, | |
582 VexSimdPrefix pre, VexOpcode opc, bool rex_w); | |
583 | |
584 void vex_prefix(bool vex_r, bool vex_b, bool vex_x, bool vex_w, | |
585 int nds_enc, VexSimdPrefix pre, VexOpcode opc, | |
586 bool vector256); | |
587 | |
588 void vex_prefix(Address adr, int nds_enc, int xreg_enc, | |
589 VexSimdPrefix pre, VexOpcode opc, | |
590 bool vex_w, bool vector256); | |
591 | |
4761
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
592 void vex_prefix(XMMRegister dst, XMMRegister nds, Address src, |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
593 VexSimdPrefix pre, bool vector256 = false) { |
6179
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
594 int dst_enc = dst->encoding(); |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
595 int nds_enc = nds->is_valid() ? nds->encoding() : 0; |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
596 vex_prefix(src, nds_enc, dst_enc, pre, VEX_OPCODE_0F, false, vector256); |
4761
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
597 } |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
598 |
14693
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
599 void vex_prefix_0F38(Register dst, Register nds, Address src) { |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
600 bool vex_w = false; |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
601 bool vector256 = false; |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
602 vex_prefix(src, nds->encoding(), dst->encoding(), |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
603 VEX_SIMD_NONE, VEX_OPCODE_0F_38, vex_w, vector256); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
604 } |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
605 |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
606 void vex_prefix_0F38_q(Register dst, Register nds, Address src) { |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
607 bool vex_w = true; |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
608 bool vector256 = false; |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
609 vex_prefix(src, nds->encoding(), dst->encoding(), |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
610 VEX_SIMD_NONE, VEX_OPCODE_0F_38, vex_w, vector256); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
611 } |
4759 | 612 int vex_prefix_and_encode(int dst_enc, int nds_enc, int src_enc, |
613 VexSimdPrefix pre, VexOpcode opc, | |
614 bool vex_w, bool vector256); | |
615 | |
14693
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
616 int vex_prefix_0F38_and_encode(Register dst, Register nds, Register src) { |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
617 bool vex_w = false; |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
618 bool vector256 = false; |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
619 return vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
620 VEX_SIMD_NONE, VEX_OPCODE_0F_38, vex_w, vector256); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
621 } |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
622 int vex_prefix_0F38_and_encode_q(Register dst, Register nds, Register src) { |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
623 bool vex_w = true; |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
624 bool vector256 = false; |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
625 return vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
626 VEX_SIMD_NONE, VEX_OPCODE_0F_38, vex_w, vector256); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
627 } |
4761
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
628 int vex_prefix_and_encode(XMMRegister dst, XMMRegister nds, XMMRegister src, |
6179
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
629 VexSimdPrefix pre, bool vector256 = false, |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
630 VexOpcode opc = VEX_OPCODE_0F) { |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
631 int src_enc = src->encoding(); |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
632 int dst_enc = dst->encoding(); |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
633 int nds_enc = nds->is_valid() ? nds->encoding() : 0; |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
634 return vex_prefix_and_encode(dst_enc, nds_enc, src_enc, pre, opc, false, vector256); |
4761
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
635 } |
4759 | 636 |
637 void simd_prefix(XMMRegister xreg, XMMRegister nds, Address adr, | |
638 VexSimdPrefix pre, VexOpcode opc = VEX_OPCODE_0F, | |
639 bool rex_w = false, bool vector256 = false); | |
640 | |
641 void simd_prefix(XMMRegister dst, Address src, | |
642 VexSimdPrefix pre, VexOpcode opc = VEX_OPCODE_0F) { | |
643 simd_prefix(dst, xnoreg, src, pre, opc); | |
644 } | |
6614
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
645 |
4759 | 646 void simd_prefix(Address dst, XMMRegister src, VexSimdPrefix pre) { |
647 simd_prefix(src, dst, pre); | |
648 } | |
649 void simd_prefix_q(XMMRegister dst, XMMRegister nds, Address src, | |
650 VexSimdPrefix pre) { | |
651 bool rex_w = true; | |
652 simd_prefix(dst, nds, src, pre, VEX_OPCODE_0F, rex_w); | |
653 } | |
654 | |
655 int simd_prefix_and_encode(XMMRegister dst, XMMRegister nds, XMMRegister src, | |
656 VexSimdPrefix pre, VexOpcode opc = VEX_OPCODE_0F, | |
657 bool rex_w = false, bool vector256 = false); | |
658 | |
659 // Move/convert 32-bit integer value. | |
660 int simd_prefix_and_encode(XMMRegister dst, XMMRegister nds, Register src, | |
661 VexSimdPrefix pre) { | |
662 // It is OK to cast from Register to XMMRegister to pass argument here | |
663 // since only encoding is used in simd_prefix_and_encode() and number of | |
664 // Gen and Xmm registers are the same. | |
665 return simd_prefix_and_encode(dst, nds, as_XMMRegister(src->encoding()), pre); | |
666 } | |
667 int simd_prefix_and_encode(XMMRegister dst, Register src, VexSimdPrefix pre) { | |
668 return simd_prefix_and_encode(dst, xnoreg, src, pre); | |
669 } | |
670 int simd_prefix_and_encode(Register dst, XMMRegister src, | |
671 VexSimdPrefix pre, VexOpcode opc = VEX_OPCODE_0F) { | |
672 return simd_prefix_and_encode(as_XMMRegister(dst->encoding()), xnoreg, src, pre, opc); | |
673 } | |
674 | |
675 // Move/convert 64-bit integer value. | |
676 int simd_prefix_and_encode_q(XMMRegister dst, XMMRegister nds, Register src, | |
677 VexSimdPrefix pre) { | |
678 bool rex_w = true; | |
679 return simd_prefix_and_encode(dst, nds, as_XMMRegister(src->encoding()), pre, VEX_OPCODE_0F, rex_w); | |
680 } | |
681 int simd_prefix_and_encode_q(XMMRegister dst, Register src, VexSimdPrefix pre) { | |
682 return simd_prefix_and_encode_q(dst, xnoreg, src, pre); | |
683 } | |
684 int simd_prefix_and_encode_q(Register dst, XMMRegister src, | |
685 VexSimdPrefix pre, VexOpcode opc = VEX_OPCODE_0F) { | |
686 bool rex_w = true; | |
687 return simd_prefix_and_encode(as_XMMRegister(dst->encoding()), xnoreg, src, pre, opc, rex_w); | |
688 } | |
689 | |
304 | 690 // Helper functions for groups of instructions |
691 void emit_arith_b(int op1, int op2, Register dst, int imm8); | |
692 | |
693 void emit_arith(int op1, int op2, Register dst, int32_t imm32); | |
4947
fd8114661503
7125136: SIGILL on linux amd64 in gc/ArrayJuggle/Juggle29
kvn
parents:
4761
diff
changeset
|
694 // Force generation of a 4 byte immediate value even if it fits into 8bit |
fd8114661503
7125136: SIGILL on linux amd64 in gc/ArrayJuggle/Juggle29
kvn
parents:
4761
diff
changeset
|
695 void emit_arith_imm32(int op1, int op2, Register dst, int32_t imm32); |
304 | 696 void emit_arith(int op1, int op2, Register dst, Register src); |
697 | |
6614
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
698 void emit_simd_arith(int opcode, XMMRegister dst, Address src, VexSimdPrefix pre); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
699 void emit_simd_arith(int opcode, XMMRegister dst, XMMRegister src, VexSimdPrefix pre); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
700 void emit_simd_arith_nonds(int opcode, XMMRegister dst, Address src, VexSimdPrefix pre); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
701 void emit_simd_arith_nonds(int opcode, XMMRegister dst, XMMRegister src, VexSimdPrefix pre); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
702 void emit_vex_arith(int opcode, XMMRegister dst, XMMRegister nds, |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
703 Address src, VexSimdPrefix pre, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
704 void emit_vex_arith(int opcode, XMMRegister dst, XMMRegister nds, |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
705 XMMRegister src, VexSimdPrefix pre, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
706 |
304 | 707 void emit_operand(Register reg, |
708 Register base, Register index, Address::ScaleFactor scale, | |
709 int disp, | |
710 RelocationHolder const& rspec, | |
711 int rip_relative_correction = 0); | |
712 | |
713 void emit_operand(Register reg, Address adr, int rip_relative_correction = 0); | |
714 | |
715 // operands that only take the original 32bit registers | |
716 void emit_operand32(Register reg, Address adr); | |
717 | |
718 void emit_operand(XMMRegister reg, | |
719 Register base, Register index, Address::ScaleFactor scale, | |
720 int disp, | |
721 RelocationHolder const& rspec); | |
722 | |
723 void emit_operand(XMMRegister reg, Address adr); | |
724 | |
725 void emit_operand(MMXRegister reg, Address adr); | |
726 | |
727 // workaround gcc (3.2.1-7) bug | |
728 void emit_operand(Address adr, MMXRegister reg); | |
729 | |
730 | |
731 // Immediate-to-memory forms | |
732 void emit_arith_operand(int op1, Register rm, Address adr, int32_t imm32); | |
733 | |
734 void emit_farith(int b1, int b2, int i); | |
735 | |
736 | |
737 protected: | |
738 #ifdef ASSERT | |
739 void check_relocation(RelocationHolder const& rspec, int format); | |
740 #endif | |
741 | |
742 void emit_data(jint data, relocInfo::relocType rtype, int format); | |
743 void emit_data(jint data, RelocationHolder const& rspec, int format); | |
744 void emit_data64(jlong data, relocInfo::relocType rtype, int format = 0); | |
745 void emit_data64(jlong data, RelocationHolder const& rspec, int format = 0); | |
746 | |
747 bool reachable(AddressLiteral adr) NOT_LP64({ return true;}); | |
748 | |
749 // These are all easily abused and hence protected | |
750 | |
751 // 32BIT ONLY SECTION | |
752 #ifndef _LP64 | |
753 // Make these disappear in 64bit mode since they would never be correct | |
754 void cmp_literal32(Register src1, int32_t imm32, RelocationHolder const& rspec); // 32BIT ONLY | |
755 void cmp_literal32(Address src1, int32_t imm32, RelocationHolder const& rspec); // 32BIT ONLY | |
756 | |
642
660978a2a31a
6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents:
624
diff
changeset
|
757 void mov_literal32(Register dst, int32_t imm32, RelocationHolder const& rspec); // 32BIT ONLY |
304 | 758 void mov_literal32(Address dst, int32_t imm32, RelocationHolder const& rspec); // 32BIT ONLY |
759 | |
760 void push_literal32(int32_t imm32, RelocationHolder const& rspec); // 32BIT ONLY | |
761 #else | |
762 // 64BIT ONLY SECTION | |
763 void mov_literal64(Register dst, intptr_t imm64, RelocationHolder const& rspec); // 64BIT ONLY | |
642
660978a2a31a
6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents:
624
diff
changeset
|
764 |
660978a2a31a
6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents:
624
diff
changeset
|
765 void cmp_narrow_oop(Register src1, int32_t imm32, RelocationHolder const& rspec); |
660978a2a31a
6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents:
624
diff
changeset
|
766 void cmp_narrow_oop(Address src1, int32_t imm32, RelocationHolder const& rspec); |
660978a2a31a
6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents:
624
diff
changeset
|
767 |
660978a2a31a
6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents:
624
diff
changeset
|
768 void mov_narrow_oop(Register dst, int32_t imm32, RelocationHolder const& rspec); |
660978a2a31a
6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents:
624
diff
changeset
|
769 void mov_narrow_oop(Address dst, int32_t imm32, RelocationHolder const& rspec); |
304 | 770 #endif // _LP64 |
771 | |
772 // These are unique in that we are ensured by the caller that the 32bit | |
773 // relative in these instructions will always be able to reach the potentially | |
774 // 64bit address described by entry. Since they can take a 64bit address they | |
775 // don't have the 32 suffix like the other instructions in this class. | |
776 | |
777 void call_literal(address entry, RelocationHolder const& rspec); | |
778 void jmp_literal(address entry, RelocationHolder const& rspec); | |
779 | |
780 // Avoid using directly section | |
781 // Instructions in this section are actually usable by anyone without danger | |
782 // of failure but have performance issues that are addressed my enhanced | |
783 // instructions which will do the proper thing base on the particular cpu. | |
784 // We protect them because we don't trust you... | |
785 | |
786 // Don't use next inc() and dec() methods directly. INC & DEC instructions | |
787 // could cause a partial flag stall since they don't set CF flag. | |
788 // Use MacroAssembler::decrement() & MacroAssembler::increment() methods | |
789 // which call inc() & dec() or add() & sub() in accordance with | |
790 // the product flag UseIncDec value. | |
791 | |
792 void decl(Register dst); | |
793 void decl(Address dst); | |
794 void decq(Register dst); | |
795 void decq(Address dst); | |
796 | |
797 void incl(Register dst); | |
798 void incl(Address dst); | |
799 void incq(Register dst); | |
800 void incq(Address dst); | |
801 | |
802 // New cpus require use of movsd and movss to avoid partial register stall | |
803 // when loading from memory. But for old Opteron use movlpd instead of movsd. | |
804 // The selection is done in MacroAssembler::movdbl() and movflt(). | |
805 | |
806 // Move Scalar Single-Precision Floating-Point Values | |
807 void movss(XMMRegister dst, Address src); | |
808 void movss(XMMRegister dst, XMMRegister src); | |
809 void movss(Address dst, XMMRegister src); | |
810 | |
811 // Move Scalar Double-Precision Floating-Point Values | |
812 void movsd(XMMRegister dst, Address src); | |
813 void movsd(XMMRegister dst, XMMRegister src); | |
814 void movsd(Address dst, XMMRegister src); | |
815 void movlpd(XMMRegister dst, Address src); | |
816 | |
817 // New cpus require use of movaps and movapd to avoid partial register stall | |
818 // when moving between registers. | |
819 void movaps(XMMRegister dst, XMMRegister src); | |
820 void movapd(XMMRegister dst, XMMRegister src); | |
821 | |
822 // End avoid using directly | |
823 | |
824 | |
825 // Instruction prefixes | |
826 void prefix(Prefix p); | |
827 | |
0 | 828 public: |
829 | |
830 // Creation | |
831 Assembler(CodeBuffer* code) : AbstractAssembler(code) {} | |
832 | |
833 // Decoding | |
834 static address locate_operand(address inst, WhichOperand which); | |
835 static address locate_next_instruction(address inst); | |
836 | |
304 | 837 // Utilities |
2404
b40d4fa697bf
6964776: c2 should ensure the polling page is reachable on 64 bit
iveresov
parents:
2320
diff
changeset
|
838 static bool is_polling_page_far() NOT_LP64({ return false;}); |
b40d4fa697bf
6964776: c2 should ensure the polling page is reachable on 64 bit
iveresov
parents:
2320
diff
changeset
|
839 |
304 | 840 // Generic instructions |
841 // Does 32bit or 64bit as needed for the platform. In some sense these | |
842 // belong in macro assembler but there is no need for both varieties to exist | |
843 | |
844 void lea(Register dst, Address src); | |
845 | |
846 void mov(Register dst, Register src); | |
847 | |
848 void pusha(); | |
849 void popa(); | |
850 | |
851 void pushf(); | |
852 void popf(); | |
853 | |
854 void push(int32_t imm32); | |
855 | |
856 void push(Register src); | |
857 | |
858 void pop(Register dst); | |
859 | |
860 // These are dummies to prevent surprise implicit conversions to Register | |
861 void push(void* v); | |
862 void pop(void* v); | |
863 | |
864 // These do register sized moves/scans | |
865 void rep_mov(); | |
7474
00af3a3a8df4
8005522: use fast-string instructions on x86 for zeroing
kvn
parents:
7204
diff
changeset
|
866 void rep_stos(); |
00af3a3a8df4
8005522: use fast-string instructions on x86 for zeroing
kvn
parents:
7204
diff
changeset
|
867 void rep_stosb(); |
304 | 868 void repne_scan(); |
869 #ifdef _LP64 | |
870 void repne_scanl(); | |
871 #endif | |
872 | |
873 // Vanilla instructions in lexical order | |
874 | |
2100
b1a2afa37ec4
7003271: Hotspot should track cumulative Java heap bytes allocated on a per-thread basis
phh
parents:
2008
diff
changeset
|
875 void adcl(Address dst, int32_t imm32); |
b1a2afa37ec4
7003271: Hotspot should track cumulative Java heap bytes allocated on a per-thread basis
phh
parents:
2008
diff
changeset
|
876 void adcl(Address dst, Register src); |
304 | 877 void adcl(Register dst, int32_t imm32); |
0 | 878 void adcl(Register dst, Address src); |
879 void adcl(Register dst, Register src); | |
880 | |
304 | 881 void adcq(Register dst, int32_t imm32); |
882 void adcq(Register dst, Address src); | |
883 void adcq(Register dst, Register src); | |
884 | |
885 void addl(Address dst, int32_t imm32); | |
0 | 886 void addl(Address dst, Register src); |
304 | 887 void addl(Register dst, int32_t imm32); |
0 | 888 void addl(Register dst, Address src); |
889 void addl(Register dst, Register src); | |
890 | |
304 | 891 void addq(Address dst, int32_t imm32); |
892 void addq(Address dst, Register src); | |
893 void addq(Register dst, int32_t imm32); | |
894 void addq(Register dst, Address src); | |
895 void addq(Register dst, Register src); | |
896 | |
20438
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
897 #ifdef _LP64 |
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
898 //Add Unsigned Integers with Carry Flag |
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
899 void adcxq(Register dst, Register src); |
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
900 |
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
901 //Add Unsigned Integers with Overflow Flag |
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
902 void adoxq(Register dst, Register src); |
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
903 #endif |
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
904 |
0 | 905 void addr_nop_4(); |
906 void addr_nop_5(); | |
907 void addr_nop_7(); | |
908 void addr_nop_8(); | |
909 | |
304 | 910 // Add Scalar Double-Precision Floating-Point Values |
911 void addsd(XMMRegister dst, Address src); | |
912 void addsd(XMMRegister dst, XMMRegister src); | |
913 | |
914 // Add Scalar Single-Precision Floating-Point Values | |
915 void addss(XMMRegister dst, Address src); | |
916 void addss(XMMRegister dst, XMMRegister src); | |
917 | |
6894 | 918 // AES instructions |
919 void aesdec(XMMRegister dst, Address src); | |
920 void aesdec(XMMRegister dst, XMMRegister src); | |
921 void aesdeclast(XMMRegister dst, Address src); | |
922 void aesdeclast(XMMRegister dst, XMMRegister src); | |
923 void aesenc(XMMRegister dst, Address src); | |
924 void aesenc(XMMRegister dst, XMMRegister src); | |
925 void aesenclast(XMMRegister dst, Address src); | |
926 void aesenclast(XMMRegister dst, XMMRegister src); | |
927 | |
928 | |
4759 | 929 void andl(Address dst, int32_t imm32); |
304 | 930 void andl(Register dst, int32_t imm32); |
931 void andl(Register dst, Address src); | |
932 void andl(Register dst, Register src); | |
933 | |
3457 | 934 void andq(Address dst, int32_t imm32); |
304 | 935 void andq(Register dst, int32_t imm32); |
936 void andq(Register dst, Address src); | |
937 void andq(Register dst, Register src); | |
938 | |
14693
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
939 // BMI instructions |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
940 void andnl(Register dst, Register src1, Register src2); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
941 void andnl(Register dst, Register src1, Address src2); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
942 void andnq(Register dst, Register src1, Register src2); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
943 void andnq(Register dst, Register src1, Address src2); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
944 |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
945 void blsil(Register dst, Register src); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
946 void blsil(Register dst, Address src); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
947 void blsiq(Register dst, Register src); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
948 void blsiq(Register dst, Address src); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
949 |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
950 void blsmskl(Register dst, Register src); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
951 void blsmskl(Register dst, Address src); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
952 void blsmskq(Register dst, Register src); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
953 void blsmskq(Register dst, Address src); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
954 |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
955 void blsrl(Register dst, Register src); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
956 void blsrl(Register dst, Address src); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
957 void blsrq(Register dst, Register src); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
958 void blsrq(Register dst, Address src); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
959 |
775
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
710
diff
changeset
|
960 void bsfl(Register dst, Register src); |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
710
diff
changeset
|
961 void bsrl(Register dst, Register src); |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
710
diff
changeset
|
962 |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
710
diff
changeset
|
963 #ifdef _LP64 |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
710
diff
changeset
|
964 void bsfq(Register dst, Register src); |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
710
diff
changeset
|
965 void bsrq(Register dst, Register src); |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
710
diff
changeset
|
966 #endif |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
710
diff
changeset
|
967 |
304 | 968 void bswapl(Register reg); |
969 | |
970 void bswapq(Register reg); | |
971 | |
0 | 972 void call(Label& L, relocInfo::relocType rtype); |
973 void call(Register reg); // push pc; pc <- reg | |
974 void call(Address adr); // push pc; pc <- adr | |
975 | |
304 | 976 void cdql(); |
977 | |
978 void cdqq(); | |
979 | |
7199
cd3d6a6b95d9
8003240: x86: move MacroAssembler into separate file
twisti
parents:
7198
diff
changeset
|
980 void cld(); |
304 | 981 |
982 void clflush(Address adr); | |
983 | |
984 void cmovl(Condition cc, Register dst, Register src); | |
985 void cmovl(Condition cc, Register dst, Address src); | |
986 | |
987 void cmovq(Condition cc, Register dst, Register src); | |
988 void cmovq(Condition cc, Register dst, Address src); | |
989 | |
990 | |
991 void cmpb(Address dst, int imm8); | |
992 | |
993 void cmpl(Address dst, int32_t imm32); | |
994 | |
995 void cmpl(Register dst, int32_t imm32); | |
996 void cmpl(Register dst, Register src); | |
997 void cmpl(Register dst, Address src); | |
998 | |
999 void cmpq(Address dst, int32_t imm32); | |
1000 void cmpq(Address dst, Register src); | |
1001 | |
1002 void cmpq(Register dst, int32_t imm32); | |
1003 void cmpq(Register dst, Register src); | |
1004 void cmpq(Register dst, Address src); | |
1005 | |
1006 // these are dummies used to catch attempting to convert NULL to Register | |
1007 void cmpl(Register dst, void* junk); // dummy | |
1008 void cmpq(Register dst, void* junk); // dummy | |
1009 | |
1010 void cmpw(Address dst, int imm16); | |
1011 | |
1012 void cmpxchg8 (Address adr); | |
1013 | |
1014 void cmpxchgl(Register reg, Address adr); | |
1015 | |
1016 void cmpxchgq(Register reg, Address adr); | |
1017 | |
1018 // Ordered Compare Scalar Double-Precision Floating-Point Values and set EFLAGS | |
1019 void comisd(XMMRegister dst, Address src); | |
4759 | 1020 void comisd(XMMRegister dst, XMMRegister src); |
304 | 1021 |
1022 // Ordered Compare Scalar Single-Precision Floating-Point Values and set EFLAGS | |
1023 void comiss(XMMRegister dst, Address src); | |
4759 | 1024 void comiss(XMMRegister dst, XMMRegister src); |
304 | 1025 |
1026 // Identify processor type and features | |
7199
cd3d6a6b95d9
8003240: x86: move MacroAssembler into separate file
twisti
parents:
7198
diff
changeset
|
1027 void cpuid(); |
304 | 1028 |
1029 // Convert Scalar Double-Precision Floating-Point Value to Scalar Single-Precision Floating-Point Value | |
1030 void cvtsd2ss(XMMRegister dst, XMMRegister src); | |
4759 | 1031 void cvtsd2ss(XMMRegister dst, Address src); |
304 | 1032 |
1033 // Convert Doubleword Integer to Scalar Double-Precision Floating-Point Value | |
1034 void cvtsi2sdl(XMMRegister dst, Register src); | |
4759 | 1035 void cvtsi2sdl(XMMRegister dst, Address src); |
304 | 1036 void cvtsi2sdq(XMMRegister dst, Register src); |
4759 | 1037 void cvtsi2sdq(XMMRegister dst, Address src); |
304 | 1038 |
1039 // Convert Doubleword Integer to Scalar Single-Precision Floating-Point Value | |
1040 void cvtsi2ssl(XMMRegister dst, Register src); | |
4759 | 1041 void cvtsi2ssl(XMMRegister dst, Address src); |
304 | 1042 void cvtsi2ssq(XMMRegister dst, Register src); |
4759 | 1043 void cvtsi2ssq(XMMRegister dst, Address src); |
304 | 1044 |
1045 // Convert Packed Signed Doubleword Integers to Packed Double-Precision Floating-Point Value | |
1046 void cvtdq2pd(XMMRegister dst, XMMRegister src); | |
1047 | |
1048 // Convert Packed Signed Doubleword Integers to Packed Single-Precision Floating-Point Value | |
1049 void cvtdq2ps(XMMRegister dst, XMMRegister src); | |
1050 | |
1051 // Convert Scalar Single-Precision Floating-Point Value to Scalar Double-Precision Floating-Point Value | |
1052 void cvtss2sd(XMMRegister dst, XMMRegister src); | |
4759 | 1053 void cvtss2sd(XMMRegister dst, Address src); |
304 | 1054 |
1055 // Convert with Truncation Scalar Double-Precision Floating-Point Value to Doubleword Integer | |
1056 void cvttsd2sil(Register dst, Address src); | |
1057 void cvttsd2sil(Register dst, XMMRegister src); | |
1058 void cvttsd2siq(Register dst, XMMRegister src); | |
1059 | |
1060 // Convert with Truncation Scalar Single-Precision Floating-Point Value to Doubleword Integer | |
1061 void cvttss2sil(Register dst, XMMRegister src); | |
1062 void cvttss2siq(Register dst, XMMRegister src); | |
1063 | |
1064 // Divide Scalar Double-Precision Floating-Point Values | |
1065 void divsd(XMMRegister dst, Address src); | |
1066 void divsd(XMMRegister dst, XMMRegister src); | |
1067 | |
1068 // Divide Scalar Single-Precision Floating-Point Values | |
1069 void divss(XMMRegister dst, Address src); | |
1070 void divss(XMMRegister dst, XMMRegister src); | |
1071 | |
1072 void emms(); | |
1073 | |
1074 void fabs(); | |
1075 | |
1076 void fadd(int i); | |
1077 | |
1078 void fadd_d(Address src); | |
1079 void fadd_s(Address src); | |
1080 | |
1081 // "Alternate" versions of x87 instructions place result down in FPU | |
1082 // stack instead of on TOS | |
1083 | |
1084 void fadda(int i); // "alternate" fadd | |
1085 void faddp(int i = 1); | |
1086 | |
1087 void fchs(); | |
1088 | |
1089 void fcom(int i); | |
1090 | |
1091 void fcomp(int i = 1); | |
1092 void fcomp_d(Address src); | |
1093 void fcomp_s(Address src); | |
1094 | |
1095 void fcompp(); | |
1096 | |
1097 void fcos(); | |
1098 | |
1099 void fdecstp(); | |
1100 | |
1101 void fdiv(int i); | |
1102 void fdiv_d(Address src); | |
1103 void fdivr_s(Address src); | |
1104 void fdiva(int i); // "alternate" fdiv | |
1105 void fdivp(int i = 1); | |
1106 | |
1107 void fdivr(int i); | |
1108 void fdivr_d(Address src); | |
1109 void fdiv_s(Address src); | |
1110 | |
1111 void fdivra(int i); // "alternate" reversed fdiv | |
1112 | |
1113 void fdivrp(int i = 1); | |
1114 | |
1115 void ffree(int i = 0); | |
1116 | |
1117 void fild_d(Address adr); | |
1118 void fild_s(Address adr); | |
1119 | |
1120 void fincstp(); | |
1121 | |
1122 void finit(); | |
1123 | |
1124 void fist_s (Address adr); | |
1125 void fistp_d(Address adr); | |
1126 void fistp_s(Address adr); | |
1127 | |
1128 void fld1(); | |
1129 | |
1130 void fld_d(Address adr); | |
1131 void fld_s(Address adr); | |
1132 void fld_s(int index); | |
1133 void fld_x(Address adr); // extended-precision (80-bit) format | |
1134 | |
1135 void fldcw(Address src); | |
1136 | |
1137 void fldenv(Address src); | |
1138 | |
1139 void fldlg2(); | |
1140 | |
1141 void fldln2(); | |
1142 | |
1143 void fldz(); | |
1144 | |
1145 void flog(); | |
1146 void flog10(); | |
1147 | |
1148 void fmul(int i); | |
1149 | |
1150 void fmul_d(Address src); | |
1151 void fmul_s(Address src); | |
1152 | |
1153 void fmula(int i); // "alternate" fmul | |
1154 | |
1155 void fmulp(int i = 1); | |
1156 | |
1157 void fnsave(Address dst); | |
1158 | |
1159 void fnstcw(Address src); | |
1160 | |
1161 void fnstsw_ax(); | |
1162 | |
1163 void fprem(); | |
1164 void fprem1(); | |
1165 | |
1166 void frstor(Address src); | |
1167 | |
1168 void fsin(); | |
1169 | |
1170 void fsqrt(); | |
1171 | |
1172 void fst_d(Address adr); | |
1173 void fst_s(Address adr); | |
1174 | |
1175 void fstp_d(Address adr); | |
1176 void fstp_d(int index); | |
1177 void fstp_s(Address adr); | |
1178 void fstp_x(Address adr); // extended-precision (80-bit) format | |
1179 | |
1180 void fsub(int i); | |
1181 void fsub_d(Address src); | |
1182 void fsub_s(Address src); | |
1183 | |
1184 void fsuba(int i); // "alternate" fsub | |
1185 | |
1186 void fsubp(int i = 1); | |
1187 | |
1188 void fsubr(int i); | |
1189 void fsubr_d(Address src); | |
1190 void fsubr_s(Address src); | |
1191 | |
1192 void fsubra(int i); // "alternate" reversed fsub | |
1193 | |
1194 void fsubrp(int i = 1); | |
1195 | |
1196 void ftan(); | |
1197 | |
1198 void ftst(); | |
1199 | |
1200 void fucomi(int i = 1); | |
1201 void fucomip(int i = 1); | |
1202 | |
1203 void fwait(); | |
1204 | |
1205 void fxch(int i = 1); | |
1206 | |
1207 void fxrstor(Address src); | |
1208 | |
1209 void fxsave(Address dst); | |
1210 | |
1211 void fyl2x(); | |
6084
6759698e3140
7133857: exp() and pow() should use the x87 ISA on x86
roland
parents:
4947
diff
changeset
|
1212 void frndint(); |
6759698e3140
7133857: exp() and pow() should use the x87 ISA on x86
roland
parents:
4947
diff
changeset
|
1213 void f2xm1(); |
6759698e3140
7133857: exp() and pow() should use the x87 ISA on x86
roland
parents:
4947
diff
changeset
|
1214 void fldl2e(); |
304 | 1215 |
1216 void hlt(); | |
1217 | |
1218 void idivl(Register src); | |
1920 | 1219 void divl(Register src); // Unsigned division |
304 | 1220 |
20438
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
1221 #ifdef _LP64 |
304 | 1222 void idivq(Register src); |
20438
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
1223 #endif |
304 | 1224 |
1225 void imull(Register dst, Register src); | |
1226 void imull(Register dst, Register src, int value); | |
12972
59e8ad757e19
8026844: Various Math functions needs intrinsification
rbackman
parents:
11080
diff
changeset
|
1227 void imull(Register dst, Address src); |
304 | 1228 |
20438
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
1229 #ifdef _LP64 |
304 | 1230 void imulq(Register dst, Register src); |
1231 void imulq(Register dst, Register src, int value); | |
12972
59e8ad757e19
8026844: Various Math functions needs intrinsification
rbackman
parents:
11080
diff
changeset
|
1232 void imulq(Register dst, Address src); |
59e8ad757e19
8026844: Various Math functions needs intrinsification
rbackman
parents:
11080
diff
changeset
|
1233 #endif |
304 | 1234 |
0 | 1235 // jcc is the generic conditional branch generator to run- |
1236 // time routines, jcc is used for branches to labels. jcc | |
1237 // takes a branch opcode (cc) and a label (L) and generates | |
1238 // either a backward branch or a forward branch and links it | |
1239 // to the label fixup chain. Usage: | |
1240 // | |
1241 // Label L; // unbound label | |
1242 // jcc(cc, L); // forward branch to unbound label | |
1243 // bind(L); // bind label to the current pc | |
1244 // jcc(cc, L); // backward branch to bound label | |
1245 // bind(L); // illegal: a label may be bound only once | |
1246 // | |
1247 // Note: The same Label can be used for forward and backward branches | |
1248 // but it may be bound only once. | |
1249 | |
3851 | 1250 void jcc(Condition cc, Label& L, bool maybe_short = true); |
0 | 1251 |
1252 // Conditional jump to a 8-bit offset to L. | |
1253 // WARNING: be very careful using this for forward jumps. If the label is | |
1254 // not bound within an 8-bit offset of this instruction, a run-time error | |
1255 // will occur. | |
1256 void jccb(Condition cc, Label& L); | |
1257 | |
304 | 1258 void jmp(Address entry); // pc <- entry |
1259 | |
1260 // Label operations & relative jumps (PPUM Appendix D) | |
3851 | 1261 void jmp(Label& L, bool maybe_short = true); // unconditional jump to L |
304 | 1262 |
1263 void jmp(Register entry); // pc <- entry | |
1264 | |
1265 // Unconditional 8-bit offset jump to L. | |
1266 // WARNING: be very careful using this for forward jumps. If the label is | |
1267 // not bound within an 8-bit offset of this instruction, a run-time error | |
1268 // will occur. | |
1269 void jmpb(Label& L); | |
1270 | |
1271 void ldmxcsr( Address src ); | |
1272 | |
1273 void leal(Register dst, Address src); | |
1274 | |
1275 void leaq(Register dst, Address src); | |
1276 | |
7199
cd3d6a6b95d9
8003240: x86: move MacroAssembler into separate file
twisti
parents:
7198
diff
changeset
|
1277 void lfence(); |
304 | 1278 |
1279 void lock(); | |
1280 | |
775
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
710
diff
changeset
|
1281 void lzcntl(Register dst, Register src); |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
710
diff
changeset
|
1282 |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
710
diff
changeset
|
1283 #ifdef _LP64 |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
710
diff
changeset
|
1284 void lzcntq(Register dst, Register src); |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
710
diff
changeset
|
1285 #endif |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
710
diff
changeset
|
1286 |
304 | 1287 enum Membar_mask_bits { |
1288 StoreStore = 1 << 3, | |
1289 LoadStore = 1 << 2, | |
1290 StoreLoad = 1 << 1, | |
1291 LoadLoad = 1 << 0 | |
1292 }; | |
1293 | |
671
d0994e5bebce
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
665
diff
changeset
|
1294 // Serializes memory and blows flags |
304 | 1295 void membar(Membar_mask_bits order_constraint) { |
671
d0994e5bebce
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
665
diff
changeset
|
1296 if (os::is_MP()) { |
d0994e5bebce
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
665
diff
changeset
|
1297 // We only have to handle StoreLoad |
d0994e5bebce
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
665
diff
changeset
|
1298 if (order_constraint & StoreLoad) { |
d0994e5bebce
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
665
diff
changeset
|
1299 // All usable chips support "locked" instructions which suffice |
d0994e5bebce
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
665
diff
changeset
|
1300 // as barriers, and are much faster than the alternative of |
d0994e5bebce
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
665
diff
changeset
|
1301 // using cpuid instruction. We use here a locked add [esp],0. |
d0994e5bebce
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
665
diff
changeset
|
1302 // This is conveniently otherwise a no-op except for blowing |
d0994e5bebce
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
665
diff
changeset
|
1303 // flags. |
d0994e5bebce
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
665
diff
changeset
|
1304 // Any change to this code may need to revisit other places in |
d0994e5bebce
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
665
diff
changeset
|
1305 // the code where this idiom is used, in particular the |
d0994e5bebce
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
665
diff
changeset
|
1306 // orderAccess code. |
d0994e5bebce
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
665
diff
changeset
|
1307 lock(); |
d0994e5bebce
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
665
diff
changeset
|
1308 addl(Address(rsp, 0), 0);// Assert the lock# signal here |
d0994e5bebce
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
665
diff
changeset
|
1309 } |
d0994e5bebce
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
665
diff
changeset
|
1310 } |
304 | 1311 } |
1312 | |
1313 void mfence(); | |
1314 | |
1315 // Moves | |
1316 | |
1317 void mov64(Register dst, int64_t imm64); | |
1318 | |
1319 void movb(Address dst, Register src); | |
1320 void movb(Address dst, int imm8); | |
1321 void movb(Register dst, Address src); | |
1322 | |
1323 void movdl(XMMRegister dst, Register src); | |
1324 void movdl(Register dst, XMMRegister src); | |
2320
41d4973cf100
6942326: x86 code in string_indexof() could read beyond reserved heap space
kvn
parents:
2262
diff
changeset
|
1325 void movdl(XMMRegister dst, Address src); |
6179
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1326 void movdl(Address dst, XMMRegister src); |
304 | 1327 |
1328 // Move Double Quadword | |
1329 void movdq(XMMRegister dst, Register src); | |
1330 void movdq(Register dst, XMMRegister src); | |
1331 | |
1332 // Move Aligned Double Quadword | |
1333 void movdqa(XMMRegister dst, XMMRegister src); | |
11080
b800986664f4
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
7955
diff
changeset
|
1334 void movdqa(XMMRegister dst, Address src); |
304 | 1335 |
405 | 1336 // Move Unaligned Double Quadword |
1337 void movdqu(Address dst, XMMRegister src); | |
1338 void movdqu(XMMRegister dst, Address src); | |
1339 void movdqu(XMMRegister dst, XMMRegister src); | |
1340 | |
6179
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1341 // Move Unaligned 256bit Vector |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1342 void vmovdqu(Address dst, XMMRegister src); |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1343 void vmovdqu(XMMRegister dst, Address src); |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1344 void vmovdqu(XMMRegister dst, XMMRegister src); |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1345 |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1346 // Move lower 64bit to high 64bit in 128bit register |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1347 void movlhps(XMMRegister dst, XMMRegister src); |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1348 |
304 | 1349 void movl(Register dst, int32_t imm32); |
1350 void movl(Address dst, int32_t imm32); | |
1351 void movl(Register dst, Register src); | |
1352 void movl(Register dst, Address src); | |
1353 void movl(Address dst, Register src); | |
1354 | |
1355 // These dummies prevent using movl from converting a zero (like NULL) into Register | |
1356 // by giving the compiler two choices it can't resolve | |
1357 | |
1358 void movl(Address dst, void* junk); | |
1359 void movl(Register dst, void* junk); | |
1360 | |
1361 #ifdef _LP64 | |
1362 void movq(Register dst, Register src); | |
1363 void movq(Register dst, Address src); | |
2100
b1a2afa37ec4
7003271: Hotspot should track cumulative Java heap bytes allocated on a per-thread basis
phh
parents:
2008
diff
changeset
|
1364 void movq(Address dst, Register src); |
304 | 1365 #endif |
1366 | |
1367 void movq(Address dst, MMXRegister src ); | |
1368 void movq(MMXRegister dst, Address src ); | |
1369 | |
1370 #ifdef _LP64 | |
1371 // These dummies prevent using movq from converting a zero (like NULL) into Register | |
1372 // by giving the compiler two choices it can't resolve | |
1373 | |
1374 void movq(Address dst, void* dummy); | |
1375 void movq(Register dst, void* dummy); | |
1376 #endif | |
1377 | |
1378 // Move Quadword | |
1379 void movq(Address dst, XMMRegister src); | |
1380 void movq(XMMRegister dst, Address src); | |
1381 | |
1382 void movsbl(Register dst, Address src); | |
1383 void movsbl(Register dst, Register src); | |
1384 | |
1385 #ifdef _LP64 | |
624 | 1386 void movsbq(Register dst, Address src); |
1387 void movsbq(Register dst, Register src); | |
1388 | |
304 | 1389 // Move signed 32bit immediate to 64bit extending sign |
2100
b1a2afa37ec4
7003271: Hotspot should track cumulative Java heap bytes allocated on a per-thread basis
phh
parents:
2008
diff
changeset
|
1390 void movslq(Address dst, int32_t imm64); |
304 | 1391 void movslq(Register dst, int32_t imm64); |
1392 | |
1393 void movslq(Register dst, Address src); | |
1394 void movslq(Register dst, Register src); | |
1395 void movslq(Register dst, void* src); // Dummy declaration to cause NULL to be ambiguous | |
1396 #endif | |
1397 | |
1398 void movswl(Register dst, Address src); | |
1399 void movswl(Register dst, Register src); | |
1400 | |
624 | 1401 #ifdef _LP64 |
1402 void movswq(Register dst, Address src); | |
1403 void movswq(Register dst, Register src); | |
1404 #endif | |
1405 | |
304 | 1406 void movw(Address dst, int imm16); |
1407 void movw(Register dst, Address src); | |
1408 void movw(Address dst, Register src); | |
1409 | |
1410 void movzbl(Register dst, Address src); | |
1411 void movzbl(Register dst, Register src); | |
1412 | |
624 | 1413 #ifdef _LP64 |
1414 void movzbq(Register dst, Address src); | |
1415 void movzbq(Register dst, Register src); | |
1416 #endif | |
1417 | |
304 | 1418 void movzwl(Register dst, Address src); |
1419 void movzwl(Register dst, Register src); | |
1420 | |
624 | 1421 #ifdef _LP64 |
1422 void movzwq(Register dst, Address src); | |
1423 void movzwq(Register dst, Register src); | |
1424 #endif | |
1425 | |
20438
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
1426 // Unsigned multiply with RAX destination register |
304 | 1427 void mull(Address src); |
1428 void mull(Register src); | |
1429 | |
20438
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
1430 #ifdef _LP64 |
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
1431 void mulq(Address src); |
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
1432 void mulq(Register src); |
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
1433 void mulxq(Register dst1, Register dst2, Register src); |
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
1434 #endif |
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
1435 |
304 | 1436 // Multiply Scalar Double-Precision Floating-Point Values |
1437 void mulsd(XMMRegister dst, Address src); | |
1438 void mulsd(XMMRegister dst, XMMRegister src); | |
1439 | |
1440 // Multiply Scalar Single-Precision Floating-Point Values | |
1441 void mulss(XMMRegister dst, Address src); | |
1442 void mulss(XMMRegister dst, XMMRegister src); | |
1443 | |
1444 void negl(Register dst); | |
1445 | |
1446 #ifdef _LP64 | |
1447 void negq(Register dst); | |
1448 #endif | |
1449 | |
1450 void nop(int i = 1); | |
1451 | |
1452 void notl(Register dst); | |
1453 | |
1454 #ifdef _LP64 | |
1455 void notq(Register dst); | |
1456 #endif | |
1457 | |
1458 void orl(Address dst, int32_t imm32); | |
1459 void orl(Register dst, int32_t imm32); | |
1460 void orl(Register dst, Address src); | |
1461 void orl(Register dst, Register src); | |
23813
daaf806995b3
8081778: Use Intel x64 CPU instructions for RSA acceleration
igerasim
parents:
23050
diff
changeset
|
1462 void orl(Address dst, Register src); |
304 | 1463 |
1464 void orq(Address dst, int32_t imm32); | |
1465 void orq(Register dst, int32_t imm32); | |
1466 void orq(Register dst, Address src); | |
1467 void orq(Register dst, Register src); | |
1468 | |
4759 | 1469 // Pack with unsigned saturation |
1470 void packuswb(XMMRegister dst, XMMRegister src); | |
1471 void packuswb(XMMRegister dst, Address src); | |
7637
b30b3c2a0cf2
6896617: Optimize sun.nio.cs.ISO_8859_1$Encode.encodeArrayLoop() on x86
kvn
parents:
7477
diff
changeset
|
1472 void vpackuswb(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
b30b3c2a0cf2
6896617: Optimize sun.nio.cs.ISO_8859_1$Encode.encodeArrayLoop() on x86
kvn
parents:
7477
diff
changeset
|
1473 |
b30b3c2a0cf2
6896617: Optimize sun.nio.cs.ISO_8859_1$Encode.encodeArrayLoop() on x86
kvn
parents:
7477
diff
changeset
|
1474 // Pemutation of 64bit words |
b30b3c2a0cf2
6896617: Optimize sun.nio.cs.ISO_8859_1$Encode.encodeArrayLoop() on x86
kvn
parents:
7477
diff
changeset
|
1475 void vpermq(XMMRegister dst, XMMRegister src, int imm8, bool vector256); |
4759 | 1476 |
17780 | 1477 void pause(); |
1478 | |
681 | 1479 // SSE4.2 string instructions |
1480 void pcmpestri(XMMRegister xmm1, XMMRegister xmm2, int imm8); | |
1481 void pcmpestri(XMMRegister xmm1, Address src, int imm8); | |
1482 | |
11080
b800986664f4
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
7955
diff
changeset
|
1483 // SSE 4.1 extract |
b800986664f4
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
7955
diff
changeset
|
1484 void pextrd(Register dst, XMMRegister src, int imm8); |
b800986664f4
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
7955
diff
changeset
|
1485 void pextrq(Register dst, XMMRegister src, int imm8); |
b800986664f4
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
7955
diff
changeset
|
1486 |
b800986664f4
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
7955
diff
changeset
|
1487 // SSE 4.1 insert |
b800986664f4
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
7955
diff
changeset
|
1488 void pinsrd(XMMRegister dst, Register src, int imm8); |
b800986664f4
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
7955
diff
changeset
|
1489 void pinsrq(XMMRegister dst, Register src, int imm8); |
b800986664f4
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
7955
diff
changeset
|
1490 |
4759 | 1491 // SSE4.1 packed move |
1492 void pmovzxbw(XMMRegister dst, XMMRegister src); | |
1493 void pmovzxbw(XMMRegister dst, Address src); | |
1494 | |
1060 | 1495 #ifndef _LP64 // no 32bit push/pop on amd64 |
304 | 1496 void popl(Address dst); |
1060 | 1497 #endif |
304 | 1498 |
1499 #ifdef _LP64 | |
1500 void popq(Address dst); | |
1501 #endif | |
1502 | |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
642
diff
changeset
|
1503 void popcntl(Register dst, Address src); |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
642
diff
changeset
|
1504 void popcntl(Register dst, Register src); |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
642
diff
changeset
|
1505 |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
642
diff
changeset
|
1506 #ifdef _LP64 |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
642
diff
changeset
|
1507 void popcntq(Register dst, Address src); |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
642
diff
changeset
|
1508 void popcntq(Register dst, Register src); |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
642
diff
changeset
|
1509 #endif |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
642
diff
changeset
|
1510 |
304 | 1511 // Prefetches (SSE, SSE2, 3DNOW only) |
1512 | |
1513 void prefetchnta(Address src); | |
1514 void prefetchr(Address src); | |
1515 void prefetcht0(Address src); | |
1516 void prefetcht1(Address src); | |
1517 void prefetcht2(Address src); | |
1518 void prefetchw(Address src); | |
1519 | |
6894 | 1520 // Shuffle Bytes |
1521 void pshufb(XMMRegister dst, XMMRegister src); | |
1522 void pshufb(XMMRegister dst, Address src); | |
1523 | |
304 | 1524 // Shuffle Packed Doublewords |
1525 void pshufd(XMMRegister dst, XMMRegister src, int mode); | |
1526 void pshufd(XMMRegister dst, Address src, int mode); | |
1527 | |
1528 // Shuffle Packed Low Words | |
1529 void pshuflw(XMMRegister dst, XMMRegister src, int mode); | |
1530 void pshuflw(XMMRegister dst, Address src, int mode); | |
1531 | |
2320
41d4973cf100
6942326: x86 code in string_indexof() could read beyond reserved heap space
kvn
parents:
2262
diff
changeset
|
1532 // Shift Right by bytes Logical DoubleQuadword Immediate |
41d4973cf100
6942326: x86 code in string_indexof() could read beyond reserved heap space
kvn
parents:
2262
diff
changeset
|
1533 void psrldq(XMMRegister dst, int shift); |
41d4973cf100
6942326: x86 code in string_indexof() could read beyond reserved heap space
kvn
parents:
2262
diff
changeset
|
1534 |
7477
038dd2875b94
8005419: Improve intrinsics code performance on x86 by using AVX2
kvn
parents:
7475
diff
changeset
|
1535 // Logical Compare 128bit |
681 | 1536 void ptest(XMMRegister dst, XMMRegister src); |
1537 void ptest(XMMRegister dst, Address src); | |
7477
038dd2875b94
8005419: Improve intrinsics code performance on x86 by using AVX2
kvn
parents:
7475
diff
changeset
|
1538 // Logical Compare 256bit |
038dd2875b94
8005419: Improve intrinsics code performance on x86 by using AVX2
kvn
parents:
7475
diff
changeset
|
1539 void vptest(XMMRegister dst, XMMRegister src); |
038dd2875b94
8005419: Improve intrinsics code performance on x86 by using AVX2
kvn
parents:
7475
diff
changeset
|
1540 void vptest(XMMRegister dst, Address src); |
681 | 1541 |
304 | 1542 // Interleave Low Bytes |
1543 void punpcklbw(XMMRegister dst, XMMRegister src); | |
4759 | 1544 void punpcklbw(XMMRegister dst, Address src); |
1545 | |
1546 // Interleave Low Doublewords | |
1547 void punpckldq(XMMRegister dst, XMMRegister src); | |
1548 void punpckldq(XMMRegister dst, Address src); | |
304 | 1549 |
6225 | 1550 // Interleave Low Quadwords |
1551 void punpcklqdq(XMMRegister dst, XMMRegister src); | |
1552 | |
1060 | 1553 #ifndef _LP64 // no 32bit push/pop on amd64 |
304 | 1554 void pushl(Address src); |
1060 | 1555 #endif |
304 | 1556 |
1557 void pushq(Address src); | |
1558 | |
1559 void rcll(Register dst, int imm8); | |
1560 | |
1561 void rclq(Register dst, int imm8); | |
1562 | |
23813
daaf806995b3
8081778: Use Intel x64 CPU instructions for RSA acceleration
igerasim
parents:
23050
diff
changeset
|
1563 void rcrq(Register dst, int imm8); |
daaf806995b3
8081778: Use Intel x64 CPU instructions for RSA acceleration
igerasim
parents:
23050
diff
changeset
|
1564 |
17780 | 1565 void rdtsc(); |
1566 | |
304 | 1567 void ret(int imm16); |
0 | 1568 |
20438
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
1569 #ifdef _LP64 |
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
1570 void rorq(Register dst, int imm8); |
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
1571 void rorxq(Register dst, Register src, int imm8); |
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
1572 #endif |
166d744df0de
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
20311
diff
changeset
|
1573 |
0 | 1574 void sahf(); |
1575 | |
304 | 1576 void sarl(Register dst, int imm8); |
1577 void sarl(Register dst); | |
1578 | |
1579 void sarq(Register dst, int imm8); | |
1580 void sarq(Register dst); | |
1581 | |
1582 void sbbl(Address dst, int32_t imm32); | |
1583 void sbbl(Register dst, int32_t imm32); | |
1584 void sbbl(Register dst, Address src); | |
1585 void sbbl(Register dst, Register src); | |
1586 | |
1587 void sbbq(Address dst, int32_t imm32); | |
1588 void sbbq(Register dst, int32_t imm32); | |
1589 void sbbq(Register dst, Address src); | |
1590 void sbbq(Register dst, Register src); | |
1591 | |
1592 void setb(Condition cc, Register dst); | |
1593 | |
1594 void shldl(Register dst, Register src); | |
1595 | |
1596 void shll(Register dst, int imm8); | |
1597 void shll(Register dst); | |
1598 | |
1599 void shlq(Register dst, int imm8); | |
1600 void shlq(Register dst); | |
1601 | |
1602 void shrdl(Register dst, Register src); | |
1603 | |
1604 void shrl(Register dst, int imm8); | |
1605 void shrl(Register dst); | |
1606 | |
1607 void shrq(Register dst, int imm8); | |
1608 void shrq(Register dst); | |
1609 | |
1610 void smovl(); // QQQ generic? | |
1611 | |
1612 // Compute Square Root of Scalar Double-Precision Floating-Point Value | |
1613 void sqrtsd(XMMRegister dst, Address src); | |
1614 void sqrtsd(XMMRegister dst, XMMRegister src); | |
1615 | |
2008 | 1616 // Compute Square Root of Scalar Single-Precision Floating-Point Value |
1617 void sqrtss(XMMRegister dst, Address src); | |
1618 void sqrtss(XMMRegister dst, XMMRegister src); | |
1619 | |
7199
cd3d6a6b95d9
8003240: x86: move MacroAssembler into separate file
twisti
parents:
7198
diff
changeset
|
1620 void std(); |
304 | 1621 |
1622 void stmxcsr( Address dst ); | |
1623 | |
1624 void subl(Address dst, int32_t imm32); | |
1625 void subl(Address dst, Register src); | |
1626 void subl(Register dst, int32_t imm32); | |
1627 void subl(Register dst, Address src); | |
1628 void subl(Register dst, Register src); | |
1629 | |
1630 void subq(Address dst, int32_t imm32); | |
1631 void subq(Address dst, Register src); | |
1632 void subq(Register dst, int32_t imm32); | |
1633 void subq(Register dst, Address src); | |
1634 void subq(Register dst, Register src); | |
1635 | |
4947
fd8114661503
7125136: SIGILL on linux amd64 in gc/ArrayJuggle/Juggle29
kvn
parents:
4761
diff
changeset
|
1636 // Force generation of a 4 byte immediate value even if it fits into 8bit |
fd8114661503
7125136: SIGILL on linux amd64 in gc/ArrayJuggle/Juggle29
kvn
parents:
4761
diff
changeset
|
1637 void subl_imm32(Register dst, int32_t imm32); |
fd8114661503
7125136: SIGILL on linux amd64 in gc/ArrayJuggle/Juggle29
kvn
parents:
4761
diff
changeset
|
1638 void subq_imm32(Register dst, int32_t imm32); |
304 | 1639 |
1640 // Subtract Scalar Double-Precision Floating-Point Values | |
1641 void subsd(XMMRegister dst, Address src); | |
0 | 1642 void subsd(XMMRegister dst, XMMRegister src); |
1643 | |
304 | 1644 // Subtract Scalar Single-Precision Floating-Point Values |
1645 void subss(XMMRegister dst, Address src); | |
1646 void subss(XMMRegister dst, XMMRegister src); | |
1647 | |
1648 void testb(Register dst, int imm8); | |
1649 | |
1650 void testl(Register dst, int32_t imm32); | |
1651 void testl(Register dst, Register src); | |
1652 void testl(Register dst, Address src); | |
1653 | |
1654 void testq(Register dst, int32_t imm32); | |
1655 void testq(Register dst, Register src); | |
1656 | |
14693
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
1657 // BMI - count trailing zeros |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
1658 void tzcntl(Register dst, Register src); |
9e9af3aa4278
8031321: Support Intel bit manipulation instructions
iveresov
parents:
12972
diff
changeset
|
1659 void tzcntq(Register dst, Register src); |
304 | 1660 |
1661 // Unordered Compare Scalar Double-Precision Floating-Point Values and set EFLAGS | |
1662 void ucomisd(XMMRegister dst, Address src); | |
0 | 1663 void ucomisd(XMMRegister dst, XMMRegister src); |
1664 | |
304 | 1665 // Unordered Compare Scalar Single-Precision Floating-Point Values and set EFLAGS |
1666 void ucomiss(XMMRegister dst, Address src); | |
1667 void ucomiss(XMMRegister dst, XMMRegister src); | |
1668 | |
17780 | 1669 void xabort(int8_t imm8); |
1670 | |
304 | 1671 void xaddl(Address dst, Register src); |
1672 | |
1673 void xaddq(Address dst, Register src); | |
1674 | |
17780 | 1675 void xbegin(Label& abort, relocInfo::relocType rtype = relocInfo::none); |
1676 | |
304 | 1677 void xchgl(Register reg, Address adr); |
1678 void xchgl(Register dst, Register src); | |
1679 | |
1680 void xchgq(Register reg, Address adr); | |
1681 void xchgq(Register dst, Register src); | |
1682 | |
17780 | 1683 void xend(); |
1684 | |
4759 | 1685 // Get Value of Extended Control Register |
7199
cd3d6a6b95d9
8003240: x86: move MacroAssembler into separate file
twisti
parents:
7198
diff
changeset
|
1686 void xgetbv(); |
4759 | 1687 |
304 | 1688 void xorl(Register dst, int32_t imm32); |
1689 void xorl(Register dst, Address src); | |
1690 void xorl(Register dst, Register src); | |
1691 | |
1692 void xorq(Register dst, Address src); | |
1693 void xorq(Register dst, Register src); | |
1694 | |
1695 void set_byte_if_not_zero(Register dst); // sets reg to 1 if not zero, otherwise 0 | |
4759 | 1696 |
6225 | 1697 // AVX 3-operands scalar instructions (encoded with VEX prefix) |
6614
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1698 |
4761
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1699 void vaddsd(XMMRegister dst, XMMRegister nds, Address src); |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1700 void vaddsd(XMMRegister dst, XMMRegister nds, XMMRegister src); |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1701 void vaddss(XMMRegister dst, XMMRegister nds, Address src); |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1702 void vaddss(XMMRegister dst, XMMRegister nds, XMMRegister src); |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1703 void vdivsd(XMMRegister dst, XMMRegister nds, Address src); |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1704 void vdivsd(XMMRegister dst, XMMRegister nds, XMMRegister src); |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1705 void vdivss(XMMRegister dst, XMMRegister nds, Address src); |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1706 void vdivss(XMMRegister dst, XMMRegister nds, XMMRegister src); |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1707 void vmulsd(XMMRegister dst, XMMRegister nds, Address src); |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1708 void vmulsd(XMMRegister dst, XMMRegister nds, XMMRegister src); |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1709 void vmulss(XMMRegister dst, XMMRegister nds, Address src); |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1710 void vmulss(XMMRegister dst, XMMRegister nds, XMMRegister src); |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1711 void vsubsd(XMMRegister dst, XMMRegister nds, Address src); |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1712 void vsubsd(XMMRegister dst, XMMRegister nds, XMMRegister src); |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1713 void vsubss(XMMRegister dst, XMMRegister nds, Address src); |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1714 void vsubss(XMMRegister dst, XMMRegister nds, XMMRegister src); |
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1715 |
6614
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1716 |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1717 //====================VECTOR ARITHMETIC===================================== |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1718 |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1719 // Add Packed Floating-Point Values |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1720 void addpd(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1721 void addps(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1722 void vaddpd(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1723 void vaddps(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1724 void vaddpd(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1725 void vaddps(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1726 |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1727 // Subtract Packed Floating-Point Values |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1728 void subpd(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1729 void subps(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1730 void vsubpd(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1731 void vsubps(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1732 void vsubpd(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1733 void vsubps(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1734 |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1735 // Multiply Packed Floating-Point Values |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1736 void mulpd(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1737 void mulps(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1738 void vmulpd(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1739 void vmulps(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1740 void vmulpd(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1741 void vmulps(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1742 |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1743 // Divide Packed Floating-Point Values |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1744 void divpd(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1745 void divps(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1746 void vdivpd(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1747 void vdivps(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1748 void vdivpd(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1749 void vdivps(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1750 |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1751 // Bitwise Logical AND of Packed Floating-Point Values |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1752 void andpd(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1753 void andps(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1754 void vandpd(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1755 void vandps(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1756 void vandpd(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1757 void vandps(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1758 |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1759 // Bitwise Logical XOR of Packed Floating-Point Values |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1760 void xorpd(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1761 void xorps(XMMRegister dst, XMMRegister src); |
6179
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1762 void vxorpd(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1763 void vxorps(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
6614
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1764 void vxorpd(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1765 void vxorps(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1766 |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1767 // Add packed integers |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1768 void paddb(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1769 void paddw(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1770 void paddd(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1771 void paddq(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1772 void vpaddb(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1773 void vpaddw(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1774 void vpaddd(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1775 void vpaddq(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1776 void vpaddb(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1777 void vpaddw(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1778 void vpaddd(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1779 void vpaddq(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1780 |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1781 // Sub packed integers |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1782 void psubb(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1783 void psubw(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1784 void psubd(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1785 void psubq(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1786 void vpsubb(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1787 void vpsubw(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1788 void vpsubd(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1789 void vpsubq(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1790 void vpsubb(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1791 void vpsubw(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1792 void vpsubd(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1793 void vpsubq(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1794 |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1795 // Multiply packed integers (only shorts and ints) |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1796 void pmullw(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1797 void pmulld(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1798 void vpmullw(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1799 void vpmulld(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1800 void vpmullw(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1801 void vpmulld(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1802 |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1803 // Shift left packed integers |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1804 void psllw(XMMRegister dst, int shift); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1805 void pslld(XMMRegister dst, int shift); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1806 void psllq(XMMRegister dst, int shift); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1807 void psllw(XMMRegister dst, XMMRegister shift); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1808 void pslld(XMMRegister dst, XMMRegister shift); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1809 void psllq(XMMRegister dst, XMMRegister shift); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1810 void vpsllw(XMMRegister dst, XMMRegister src, int shift, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1811 void vpslld(XMMRegister dst, XMMRegister src, int shift, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1812 void vpsllq(XMMRegister dst, XMMRegister src, int shift, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1813 void vpsllw(XMMRegister dst, XMMRegister src, XMMRegister shift, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1814 void vpslld(XMMRegister dst, XMMRegister src, XMMRegister shift, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1815 void vpsllq(XMMRegister dst, XMMRegister src, XMMRegister shift, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1816 |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1817 // Logical shift right packed integers |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1818 void psrlw(XMMRegister dst, int shift); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1819 void psrld(XMMRegister dst, int shift); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1820 void psrlq(XMMRegister dst, int shift); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1821 void psrlw(XMMRegister dst, XMMRegister shift); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1822 void psrld(XMMRegister dst, XMMRegister shift); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1823 void psrlq(XMMRegister dst, XMMRegister shift); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1824 void vpsrlw(XMMRegister dst, XMMRegister src, int shift, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1825 void vpsrld(XMMRegister dst, XMMRegister src, int shift, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1826 void vpsrlq(XMMRegister dst, XMMRegister src, int shift, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1827 void vpsrlw(XMMRegister dst, XMMRegister src, XMMRegister shift, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1828 void vpsrld(XMMRegister dst, XMMRegister src, XMMRegister shift, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1829 void vpsrlq(XMMRegister dst, XMMRegister src, XMMRegister shift, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1830 |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1831 // Arithmetic shift right packed integers (only shorts and ints, no instructions for longs) |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1832 void psraw(XMMRegister dst, int shift); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1833 void psrad(XMMRegister dst, int shift); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1834 void psraw(XMMRegister dst, XMMRegister shift); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1835 void psrad(XMMRegister dst, XMMRegister shift); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1836 void vpsraw(XMMRegister dst, XMMRegister src, int shift, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1837 void vpsrad(XMMRegister dst, XMMRegister src, int shift, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1838 void vpsraw(XMMRegister dst, XMMRegister src, XMMRegister shift, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1839 void vpsrad(XMMRegister dst, XMMRegister src, XMMRegister shift, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1840 |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1841 // And packed integers |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1842 void pand(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1843 void vpand(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1844 void vpand(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1845 |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1846 // Or packed integers |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1847 void por(XMMRegister dst, XMMRegister src); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1848 void vpor(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1849 void vpor(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1850 |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1851 // Xor packed integers |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1852 void pxor(XMMRegister dst, XMMRegister src); |
6225 | 1853 void vpxor(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256); |
6614
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1854 void vpxor(XMMRegister dst, XMMRegister nds, Address src, bool vector256); |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1855 |
006050192a5a
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
6266
diff
changeset
|
1856 // Copy low 128bit into high 128bit of YMM registers. |
6179
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1857 void vinsertf128h(XMMRegister dst, XMMRegister nds, XMMRegister src); |
6225 | 1858 void vinserti128h(XMMRegister dst, XMMRegister nds, XMMRegister src); |
6179
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1859 |
6792
137868b7aa6f
7196199: java/text/Bidi/Bug6665028.java failed: Bidi run count incorrect
kvn
parents:
6740
diff
changeset
|
1860 // Load/store high 128bit of YMM registers which does not destroy other half. |
137868b7aa6f
7196199: java/text/Bidi/Bug6665028.java failed: Bidi run count incorrect
kvn
parents:
6740
diff
changeset
|
1861 void vinsertf128h(XMMRegister dst, Address src); |
137868b7aa6f
7196199: java/text/Bidi/Bug6665028.java failed: Bidi run count incorrect
kvn
parents:
6740
diff
changeset
|
1862 void vinserti128h(XMMRegister dst, Address src); |
137868b7aa6f
7196199: java/text/Bidi/Bug6665028.java failed: Bidi run count incorrect
kvn
parents:
6740
diff
changeset
|
1863 void vextractf128h(Address dst, XMMRegister src); |
137868b7aa6f
7196199: java/text/Bidi/Bug6665028.java failed: Bidi run count incorrect
kvn
parents:
6740
diff
changeset
|
1864 void vextracti128h(Address dst, XMMRegister src); |
137868b7aa6f
7196199: java/text/Bidi/Bug6665028.java failed: Bidi run count incorrect
kvn
parents:
6740
diff
changeset
|
1865 |
7475
e2e6bf86682c
8005544: Use 256bit YMM registers in arraycopy stubs on x86
kvn
parents:
7474
diff
changeset
|
1866 // duplicate 4-bytes integer data from src into 8 locations in dest |
e2e6bf86682c
8005544: Use 256bit YMM registers in arraycopy stubs on x86
kvn
parents:
7474
diff
changeset
|
1867 void vpbroadcastd(XMMRegister dst, XMMRegister src); |
e2e6bf86682c
8005544: Use 256bit YMM registers in arraycopy stubs on x86
kvn
parents:
7474
diff
changeset
|
1868 |
11080
b800986664f4
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
7955
diff
changeset
|
1869 // Carry-Less Multiplication Quadword |
20311
b1bc1af04c6e
8052081: Optimize generated by C2 code for Intel's Atom processor
kvn
parents:
17780
diff
changeset
|
1870 void pclmulqdq(XMMRegister dst, XMMRegister src, int mask); |
11080
b800986664f4
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
7955
diff
changeset
|
1871 void vpclmulqdq(XMMRegister dst, XMMRegister nds, XMMRegister src, int mask); |
b800986664f4
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
7955
diff
changeset
|
1872 |
6179
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1873 // AVX instruction which is used to clear upper 128 bits of YMM registers and |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1874 // to avoid transaction penalty between AVX and SSE states. There is no |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1875 // penalty if legacy SSE instructions are encoded using VEX prefix because |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1876 // they always clear upper 128 bits. It should be used before calling |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1877 // runtime code and native libraries. |
8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
6141
diff
changeset
|
1878 void vzeroupper(); |
4761
65149e74c706
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
4759
diff
changeset
|
1879 |
4759 | 1880 protected: |
1881 // Next instructions require address alignment 16 bytes SSE mode. | |
1882 // They should be called only from corresponding MacroAssembler instructions. | |
1883 void andpd(XMMRegister dst, Address src); | |
1884 void andps(XMMRegister dst, Address src); | |
1885 void xorpd(XMMRegister dst, Address src); | |
1886 void xorps(XMMRegister dst, Address src); | |
1887 | |
0 | 1888 }; |
1889 | |
1972 | 1890 #endif // CPU_X86_VM_ASSEMBLER_X86_HPP |