author | duke |
Wed, 05 Jul 2017 23:10:03 +0200 | |
changeset 44509 | 02253db2ace1 |
parent 42039 | db627462f2c9 |
child 46525 | 3a5c833a43de |
permissions | -rw-r--r-- |
1 | 1 |
/* |
36561
b18243f4d955
8151002: Make Assembler methods vextract and vinsert match actual instructions
mikael
parents:
36555
diff
changeset
|
2 |
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. |
1 | 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 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5416
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5416
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5416
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#ifndef CPU_X86_VM_ASSEMBLER_X86_HPP |
26 |
#define CPU_X86_VM_ASSEMBLER_X86_HPP |
|
27 |
||
14626
0cf4eccf130f
8003240: x86: move MacroAssembler into separate file
twisti
parents:
14625
diff
changeset
|
28 |
#include "asm/register.hpp" |
26576
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
29 |
#include "vm_version_x86.hpp" |
14626
0cf4eccf130f
8003240: x86: move MacroAssembler into separate file
twisti
parents:
14625
diff
changeset
|
30 |
|
1 | 31 |
class BiasedLockingCounters; |
32 |
||
33 |
// Contains all the definitions needed for x86 assembly code generation. |
|
34 |
||
35 |
// Calling convention |
|
36 |
class Argument VALUE_OBJ_CLASS_SPEC { |
|
37 |
public: |
|
38 |
enum { |
|
39 |
#ifdef _LP64 |
|
40 |
#ifdef _WIN64 |
|
41 |
n_int_register_parameters_c = 4, // rcx, rdx, r8, r9 (c_rarg0, c_rarg1, ...) |
|
42 |
n_float_register_parameters_c = 4, // xmm0 - xmm3 (c_farg0, c_farg1, ... ) |
|
43 |
#else |
|
44 |
n_int_register_parameters_c = 6, // rdi, rsi, rdx, rcx, r8, r9 (c_rarg0, c_rarg1, ...) |
|
45 |
n_float_register_parameters_c = 8, // xmm0 - xmm7 (c_farg0, c_farg1, ... ) |
|
46 |
#endif // _WIN64 |
|
47 |
n_int_register_parameters_j = 6, // j_rarg0, j_rarg1, ... |
|
48 |
n_float_register_parameters_j = 8 // j_farg0, j_farg1, ... |
|
49 |
#else |
|
50 |
n_register_parameters = 0 // 0 registers used to pass arguments |
|
51 |
#endif // _LP64 |
|
52 |
}; |
|
53 |
}; |
|
54 |
||
55 |
||
56 |
#ifdef _LP64 |
|
57 |
// Symbolically name the register arguments used by the c calling convention. |
|
58 |
// Windows is different from linux/solaris. So much for standards... |
|
59 |
||
60 |
#ifdef _WIN64 |
|
61 |
||
62 |
REGISTER_DECLARATION(Register, c_rarg0, rcx); |
|
63 |
REGISTER_DECLARATION(Register, c_rarg1, rdx); |
|
64 |
REGISTER_DECLARATION(Register, c_rarg2, r8); |
|
65 |
REGISTER_DECLARATION(Register, c_rarg3, r9); |
|
66 |
||
1066 | 67 |
REGISTER_DECLARATION(XMMRegister, c_farg0, xmm0); |
68 |
REGISTER_DECLARATION(XMMRegister, c_farg1, xmm1); |
|
69 |
REGISTER_DECLARATION(XMMRegister, c_farg2, xmm2); |
|
70 |
REGISTER_DECLARATION(XMMRegister, c_farg3, xmm3); |
|
1 | 71 |
|
72 |
#else |
|
73 |
||
74 |
REGISTER_DECLARATION(Register, c_rarg0, rdi); |
|
75 |
REGISTER_DECLARATION(Register, c_rarg1, rsi); |
|
76 |
REGISTER_DECLARATION(Register, c_rarg2, rdx); |
|
77 |
REGISTER_DECLARATION(Register, c_rarg3, rcx); |
|
78 |
REGISTER_DECLARATION(Register, c_rarg4, r8); |
|
79 |
REGISTER_DECLARATION(Register, c_rarg5, r9); |
|
80 |
||
1066 | 81 |
REGISTER_DECLARATION(XMMRegister, c_farg0, xmm0); |
82 |
REGISTER_DECLARATION(XMMRegister, c_farg1, xmm1); |
|
83 |
REGISTER_DECLARATION(XMMRegister, c_farg2, xmm2); |
|
84 |
REGISTER_DECLARATION(XMMRegister, c_farg3, xmm3); |
|
85 |
REGISTER_DECLARATION(XMMRegister, c_farg4, xmm4); |
|
86 |
REGISTER_DECLARATION(XMMRegister, c_farg5, xmm5); |
|
87 |
REGISTER_DECLARATION(XMMRegister, c_farg6, xmm6); |
|
88 |
REGISTER_DECLARATION(XMMRegister, c_farg7, xmm7); |
|
1 | 89 |
|
90 |
#endif // _WIN64 |
|
91 |
||
92 |
// Symbolically name the register arguments used by the Java calling convention. |
|
93 |
// We have control over the convention for java so we can do what we please. |
|
94 |
// What pleases us is to offset the java calling convention so that when |
|
95 |
// we call a suitable jni method the arguments are lined up and we don't |
|
96 |
// have to do little shuffling. A suitable jni method is non-static and a |
|
97 |
// small number of arguments (two fewer args on windows) |
|
98 |
// |
|
99 |
// |-------------------------------------------------------| |
|
100 |
// | c_rarg0 c_rarg1 c_rarg2 c_rarg3 c_rarg4 c_rarg5 | |
|
101 |
// |-------------------------------------------------------| |
|
102 |
// | rcx rdx r8 r9 rdi* rsi* | windows (* not a c_rarg) |
|
103 |
// | rdi rsi rdx rcx r8 r9 | solaris/linux |
|
104 |
// |-------------------------------------------------------| |
|
105 |
// | j_rarg5 j_rarg0 j_rarg1 j_rarg2 j_rarg3 j_rarg4 | |
|
106 |
// |-------------------------------------------------------| |
|
107 |
||
108 |
REGISTER_DECLARATION(Register, j_rarg0, c_rarg1); |
|
109 |
REGISTER_DECLARATION(Register, j_rarg1, c_rarg2); |
|
110 |
REGISTER_DECLARATION(Register, j_rarg2, c_rarg3); |
|
111 |
// Windows runs out of register args here |
|
112 |
#ifdef _WIN64 |
|
113 |
REGISTER_DECLARATION(Register, j_rarg3, rdi); |
|
114 |
REGISTER_DECLARATION(Register, j_rarg4, rsi); |
|
115 |
#else |
|
116 |
REGISTER_DECLARATION(Register, j_rarg3, c_rarg4); |
|
117 |
REGISTER_DECLARATION(Register, j_rarg4, c_rarg5); |
|
118 |
#endif /* _WIN64 */ |
|
119 |
REGISTER_DECLARATION(Register, j_rarg5, c_rarg0); |
|
120 |
||
1066 | 121 |
REGISTER_DECLARATION(XMMRegister, j_farg0, xmm0); |
122 |
REGISTER_DECLARATION(XMMRegister, j_farg1, xmm1); |
|
123 |
REGISTER_DECLARATION(XMMRegister, j_farg2, xmm2); |
|
124 |
REGISTER_DECLARATION(XMMRegister, j_farg3, xmm3); |
|
125 |
REGISTER_DECLARATION(XMMRegister, j_farg4, xmm4); |
|
126 |
REGISTER_DECLARATION(XMMRegister, j_farg5, xmm5); |
|
127 |
REGISTER_DECLARATION(XMMRegister, j_farg6, xmm6); |
|
128 |
REGISTER_DECLARATION(XMMRegister, j_farg7, xmm7); |
|
1 | 129 |
|
130 |
REGISTER_DECLARATION(Register, rscratch1, r10); // volatile |
|
131 |
REGISTER_DECLARATION(Register, rscratch2, r11); // volatile |
|
132 |
||
1066 | 133 |
REGISTER_DECLARATION(Register, r12_heapbase, r12); // callee-saved |
1 | 134 |
REGISTER_DECLARATION(Register, r15_thread, r15); // callee-saved |
135 |
||
1066 | 136 |
#else |
137 |
// rscratch1 will apear in 32bit code that is dead but of course must compile |
|
138 |
// Using noreg ensures if the dead code is incorrectly live and executed it |
|
139 |
// will cause an assertion failure |
|
140 |
#define rscratch1 noreg |
|
7427 | 141 |
#define rscratch2 noreg |
1066 | 142 |
|
1 | 143 |
#endif // _LP64 |
144 |
||
30305
b92a97e1e9cb
8068945: Use RBP register as proper frame pointer in JIT compiled code on x86
zmajo
parents:
30211
diff
changeset
|
145 |
// JSR 292 |
b92a97e1e9cb
8068945: Use RBP register as proper frame pointer in JIT compiled code on x86
zmajo
parents:
30211
diff
changeset
|
146 |
// On x86, the SP does not have to be saved when invoking method handle intrinsics |
b92a97e1e9cb
8068945: Use RBP register as proper frame pointer in JIT compiled code on x86
zmajo
parents:
30211
diff
changeset
|
147 |
// or compiled lambda forms. We indicate that by setting rbp_mh_SP_save to noreg. |
b92a97e1e9cb
8068945: Use RBP register as proper frame pointer in JIT compiled code on x86
zmajo
parents:
30211
diff
changeset
|
148 |
REGISTER_DECLARATION(Register, rbp_mh_SP_save, noreg); |
5687 | 149 |
|
1 | 150 |
// Address is an abstraction used to represent a memory location |
151 |
// using any of the amd64 addressing modes with one object. |
|
152 |
// |
|
153 |
// Note: A register location is represented via a Register, not |
|
154 |
// via an address for efficiency & simplicity reasons. |
|
155 |
||
156 |
class ArrayAddress; |
|
157 |
||
158 |
class Address VALUE_OBJ_CLASS_SPEC { |
|
159 |
public: |
|
160 |
enum ScaleFactor { |
|
161 |
no_scale = -1, |
|
162 |
times_1 = 0, |
|
163 |
times_2 = 1, |
|
164 |
times_4 = 2, |
|
1066 | 165 |
times_8 = 3, |
166 |
times_ptr = LP64_ONLY(times_8) NOT_LP64(times_4) |
|
1 | 167 |
}; |
2148
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
168 |
static ScaleFactor times(int size) { |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
169 |
assert(size >= 1 && size <= 8 && is_power_of_2(size), "bad scale size"); |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
170 |
if (size == 8) return times_8; |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
171 |
if (size == 4) return times_4; |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
172 |
if (size == 2) return times_2; |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
173 |
return times_1; |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
174 |
} |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
175 |
static int scale_size(ScaleFactor scale) { |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
176 |
assert(scale != no_scale, ""); |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
177 |
assert(((1 << (int)times_1) == 1 && |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
178 |
(1 << (int)times_2) == 2 && |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
179 |
(1 << (int)times_4) == 4 && |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
180 |
(1 << (int)times_8) == 8), ""); |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
181 |
return (1 << (int)scale); |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
182 |
} |
1 | 183 |
|
184 |
private: |
|
185 |
Register _base; |
|
186 |
Register _index; |
|
187 |
ScaleFactor _scale; |
|
188 |
int _disp; |
|
189 |
RelocationHolder _rspec; |
|
190 |
||
1066 | 191 |
// Easily misused constructors make them private |
192 |
// %%% can we make these go away? |
|
193 |
NOT_LP64(Address(address loc, RelocationHolder spec);) |
|
194 |
Address(int disp, address loc, relocInfo::relocType rtype); |
|
195 |
Address(int disp, address loc, RelocationHolder spec); |
|
1 | 196 |
|
197 |
public: |
|
1066 | 198 |
|
199 |
int disp() { return _disp; } |
|
1 | 200 |
// creation |
201 |
Address() |
|
202 |
: _base(noreg), |
|
203 |
_index(noreg), |
|
204 |
_scale(no_scale), |
|
205 |
_disp(0) { |
|
206 |
} |
|
207 |
||
208 |
// No default displacement otherwise Register can be implicitly |
|
209 |
// converted to 0(Register) which is quite a different animal. |
|
210 |
||
211 |
Address(Register base, int disp) |
|
212 |
: _base(base), |
|
213 |
_index(noreg), |
|
214 |
_scale(no_scale), |
|
215 |
_disp(disp) { |
|
216 |
} |
|
217 |
||
218 |
Address(Register base, Register index, ScaleFactor scale, int disp = 0) |
|
219 |
: _base (base), |
|
220 |
_index(index), |
|
221 |
_scale(scale), |
|
222 |
_disp (disp) { |
|
223 |
assert(!index->is_valid() == (scale == Address::no_scale), |
|
224 |
"inconsistent address"); |
|
225 |
} |
|
226 |
||
2332
5c7b6f4ce0a1
6814659: separable cleanups and subroutines for 6655638
jrose
parents:
2256
diff
changeset
|
227 |
Address(Register base, RegisterOrConstant index, ScaleFactor scale = times_1, int disp = 0) |
2148
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
228 |
: _base (base), |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
229 |
_index(index.register_or_noreg()), |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
230 |
_scale(scale), |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
231 |
_disp (disp + (index.constant_or_zero() * scale_size(scale))) { |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
232 |
if (!index.is_register()) scale = Address::no_scale; |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
233 |
assert(!_index->is_valid() == (scale == Address::no_scale), |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
234 |
"inconsistent address"); |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
235 |
} |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
236 |
|
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
237 |
Address plus_disp(int disp) const { |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
238 |
Address a = (*this); |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
239 |
a._disp += disp; |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
240 |
return a; |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
241 |
} |
9630
d6419e4395e3
6939861: JVM should handle more conversion operations
never
parents:
9437
diff
changeset
|
242 |
Address plus_disp(RegisterOrConstant disp, ScaleFactor scale = times_1) const { |
d6419e4395e3
6939861: JVM should handle more conversion operations
never
parents:
9437
diff
changeset
|
243 |
Address a = (*this); |
d6419e4395e3
6939861: JVM should handle more conversion operations
never
parents:
9437
diff
changeset
|
244 |
a._disp += disp.constant_or_zero() * scale_size(scale); |
d6419e4395e3
6939861: JVM should handle more conversion operations
never
parents:
9437
diff
changeset
|
245 |
if (disp.is_register()) { |
d6419e4395e3
6939861: JVM should handle more conversion operations
never
parents:
9437
diff
changeset
|
246 |
assert(!a.index()->is_valid(), "competing indexes"); |
d6419e4395e3
6939861: JVM should handle more conversion operations
never
parents:
9437
diff
changeset
|
247 |
a._index = disp.as_register(); |
d6419e4395e3
6939861: JVM should handle more conversion operations
never
parents:
9437
diff
changeset
|
248 |
a._scale = scale; |
d6419e4395e3
6939861: JVM should handle more conversion operations
never
parents:
9437
diff
changeset
|
249 |
} |
d6419e4395e3
6939861: JVM should handle more conversion operations
never
parents:
9437
diff
changeset
|
250 |
return a; |
d6419e4395e3
6939861: JVM should handle more conversion operations
never
parents:
9437
diff
changeset
|
251 |
} |
d6419e4395e3
6939861: JVM should handle more conversion operations
never
parents:
9437
diff
changeset
|
252 |
bool is_same_address(Address a) const { |
d6419e4395e3
6939861: JVM should handle more conversion operations
never
parents:
9437
diff
changeset
|
253 |
// disregard _rspec |
d6419e4395e3
6939861: JVM should handle more conversion operations
never
parents:
9437
diff
changeset
|
254 |
return _base == a._base && _disp == a._disp && _index == a._index && _scale == a._scale; |
d6419e4395e3
6939861: JVM should handle more conversion operations
never
parents:
9437
diff
changeset
|
255 |
} |
2148
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
256 |
|
1 | 257 |
// The following two overloads are used in connection with the |
258 |
// ByteSize type (see sizes.hpp). They simplify the use of |
|
259 |
// ByteSize'd arguments in assembly code. Note that their equivalent |
|
260 |
// for the optimized build are the member functions with int disp |
|
261 |
// argument since ByteSize is mapped to an int type in that case. |
|
262 |
// |
|
263 |
// Note: DO NOT introduce similar overloaded functions for WordSize |
|
264 |
// arguments as in the optimized mode, both ByteSize and WordSize |
|
265 |
// are mapped to the same type and thus the compiler cannot make a |
|
266 |
// distinction anymore (=> compiler errors). |
|
267 |
||
268 |
#ifdef ASSERT |
|
269 |
Address(Register base, ByteSize disp) |
|
270 |
: _base(base), |
|
271 |
_index(noreg), |
|
272 |
_scale(no_scale), |
|
273 |
_disp(in_bytes(disp)) { |
|
274 |
} |
|
275 |
||
276 |
Address(Register base, Register index, ScaleFactor scale, ByteSize disp) |
|
277 |
: _base(base), |
|
278 |
_index(index), |
|
279 |
_scale(scale), |
|
280 |
_disp(in_bytes(disp)) { |
|
281 |
assert(!index->is_valid() == (scale == Address::no_scale), |
|
282 |
"inconsistent address"); |
|
283 |
} |
|
2148
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
284 |
|
2332
5c7b6f4ce0a1
6814659: separable cleanups and subroutines for 6655638
jrose
parents:
2256
diff
changeset
|
285 |
Address(Register base, RegisterOrConstant index, ScaleFactor scale, ByteSize disp) |
2148
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
286 |
: _base (base), |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
287 |
_index(index.register_or_noreg()), |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
288 |
_scale(scale), |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
289 |
_disp (in_bytes(disp) + (index.constant_or_zero() * scale_size(scale))) { |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
290 |
if (!index.is_register()) scale = Address::no_scale; |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
291 |
assert(!_index->is_valid() == (scale == Address::no_scale), |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
292 |
"inconsistent address"); |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
293 |
} |
09c7f703773b
6812678: macro assembler needs delayed binding of a few constants (for 6655638)
jrose
parents:
1500
diff
changeset
|
294 |
|
1 | 295 |
#endif // ASSERT |
296 |
||
297 |
// accessors |
|
1374
4c24294029a9
6711316: Open source the Garbage-First garbage collector
ysr
parents:
244
diff
changeset
|
298 |
bool uses(Register reg) const { return _base == reg || _index == reg; } |
4c24294029a9
6711316: Open source the Garbage-First garbage collector
ysr
parents:
244
diff
changeset
|
299 |
Register base() const { return _base; } |
4c24294029a9
6711316: Open source the Garbage-First garbage collector
ysr
parents:
244
diff
changeset
|
300 |
Register index() const { return _index; } |
4c24294029a9
6711316: Open source the Garbage-First garbage collector
ysr
parents:
244
diff
changeset
|
301 |
ScaleFactor scale() const { return _scale; } |
4c24294029a9
6711316: Open source the Garbage-First garbage collector
ysr
parents:
244
diff
changeset
|
302 |
int disp() const { return _disp; } |
1 | 303 |
|
304 |
// Convert the raw encoding form into the form expected by the constructor for |
|
305 |
// Address. An index of 4 (rsp) corresponds to having no index, so convert |
|
306 |
// that to noreg for the Address constructor. |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13485
diff
changeset
|
307 |
static Address make_raw(int base, int index, int scale, int disp, relocInfo::relocType disp_reloc); |
1 | 308 |
|
309 |
static Address make_array(ArrayAddress); |
|
310 |
||
311 |
private: |
|
312 |
bool base_needs_rex() const { |
|
313 |
return _base != noreg && _base->encoding() >= 8; |
|
314 |
} |
|
315 |
||
316 |
bool index_needs_rex() const { |
|
317 |
return _index != noreg &&_index->encoding() >= 8; |
|
318 |
} |
|
319 |
||
320 |
relocInfo::relocType reloc() const { return _rspec.type(); } |
|
321 |
||
322 |
friend class Assembler; |
|
323 |
friend class MacroAssembler; |
|
324 |
friend class LIR_Assembler; // base/index/scale/disp |
|
325 |
}; |
|
326 |
||
327 |
// |
|
328 |
// AddressLiteral has been split out from Address because operands of this type |
|
329 |
// need to be treated specially on 32bit vs. 64bit platforms. By splitting it out |
|
330 |
// the few instructions that need to deal with address literals are unique and the |
|
331 |
// MacroAssembler does not have to implement every instruction in the Assembler |
|
332 |
// in order to search for address literals that may need special handling depending |
|
333 |
// on the instruction and the platform. As small step on the way to merging i486/amd64 |
|
334 |
// directories. |
|
335 |
// |
|
336 |
class AddressLiteral VALUE_OBJ_CLASS_SPEC { |
|
337 |
friend class ArrayAddress; |
|
338 |
RelocationHolder _rspec; |
|
339 |
// Typically we use AddressLiterals we want to use their rval |
|
340 |
// However in some situations we want the lval (effect address) of the item. |
|
341 |
// We provide a special factory for making those lvals. |
|
342 |
bool _is_lval; |
|
343 |
||
344 |
// If the target is far we'll need to load the ea of this to |
|
345 |
// a register to reach it. Otherwise if near we can do rip |
|
346 |
// relative addressing. |
|
347 |
||
348 |
address _target; |
|
349 |
||
350 |
protected: |
|
351 |
// creation |
|
352 |
AddressLiteral() |
|
353 |
: _is_lval(false), |
|
354 |
_target(NULL) |
|
355 |
{} |
|
356 |
||
357 |
public: |
|
358 |
||
359 |
||
360 |
AddressLiteral(address target, relocInfo::relocType rtype); |
|
361 |
||
362 |
AddressLiteral(address target, RelocationHolder const& rspec) |
|
363 |
: _rspec(rspec), |
|
364 |
_is_lval(false), |
|
365 |
_target(target) |
|
366 |
{} |
|
367 |
||
368 |
AddressLiteral addr() { |
|
369 |
AddressLiteral ret = *this; |
|
370 |
ret._is_lval = true; |
|
371 |
return ret; |
|
372 |
} |
|
373 |
||
374 |
||
375 |
private: |
|
376 |
||
377 |
address target() { return _target; } |
|
378 |
bool is_lval() { return _is_lval; } |
|
379 |
||
380 |
relocInfo::relocType reloc() const { return _rspec.type(); } |
|
381 |
const RelocationHolder& rspec() const { return _rspec; } |
|
382 |
||
383 |
friend class Assembler; |
|
384 |
friend class MacroAssembler; |
|
385 |
friend class Address; |
|
386 |
friend class LIR_Assembler; |
|
387 |
}; |
|
388 |
||
389 |
// Convience classes |
|
390 |
class RuntimeAddress: public AddressLiteral { |
|
391 |
||
392 |
public: |
|
393 |
||
394 |
RuntimeAddress(address target) : AddressLiteral(target, relocInfo::runtime_call_type) {} |
|
395 |
||
396 |
}; |
|
397 |
||
398 |
class ExternalAddress: public AddressLiteral { |
|
9111
c100c09c66f2
6777083: assert(target != __null,"must not be null")
never
parents:
8882
diff
changeset
|
399 |
private: |
c100c09c66f2
6777083: assert(target != __null,"must not be null")
never
parents:
8882
diff
changeset
|
400 |
static relocInfo::relocType reloc_for_target(address target) { |
c100c09c66f2
6777083: assert(target != __null,"must not be null")
never
parents:
8882
diff
changeset
|
401 |
// Sometimes ExternalAddress is used for values which aren't |
c100c09c66f2
6777083: assert(target != __null,"must not be null")
never
parents:
8882
diff
changeset
|
402 |
// exactly addresses, like the card table base. |
c100c09c66f2
6777083: assert(target != __null,"must not be null")
never
parents:
8882
diff
changeset
|
403 |
// external_word_type can't be used for values in the first page |
c100c09c66f2
6777083: assert(target != __null,"must not be null")
never
parents:
8882
diff
changeset
|
404 |
// so just skip the reloc in that case. |
c100c09c66f2
6777083: assert(target != __null,"must not be null")
never
parents:
8882
diff
changeset
|
405 |
return external_word_Relocation::can_be_relocated(target) ? relocInfo::external_word_type : relocInfo::none; |
c100c09c66f2
6777083: assert(target != __null,"must not be null")
never
parents:
8882
diff
changeset
|
406 |
} |
c100c09c66f2
6777083: assert(target != __null,"must not be null")
never
parents:
8882
diff
changeset
|
407 |
|
c100c09c66f2
6777083: assert(target != __null,"must not be null")
never
parents:
8882
diff
changeset
|
408 |
public: |
c100c09c66f2
6777083: assert(target != __null,"must not be null")
never
parents:
8882
diff
changeset
|
409 |
|
c100c09c66f2
6777083: assert(target != __null,"must not be null")
never
parents:
8882
diff
changeset
|
410 |
ExternalAddress(address target) : AddressLiteral(target, reloc_for_target(target)) {} |
1 | 411 |
|
412 |
}; |
|
413 |
||
414 |
class InternalAddress: public AddressLiteral { |
|
415 |
||
416 |
public: |
|
417 |
||
418 |
InternalAddress(address target) : AddressLiteral(target, relocInfo::internal_word_type) {} |
|
419 |
||
420 |
}; |
|
421 |
||
422 |
// x86 can do array addressing as a single operation since disp can be an absolute |
|
423 |
// address amd64 can't. We create a class that expresses the concept but does extra |
|
424 |
// magic on amd64 to get the final result |
|
425 |
||
426 |
class ArrayAddress VALUE_OBJ_CLASS_SPEC { |
|
427 |
private: |
|
428 |
||
429 |
AddressLiteral _base; |
|
430 |
Address _index; |
|
431 |
||
432 |
public: |
|
433 |
||
434 |
ArrayAddress() {}; |
|
435 |
ArrayAddress(AddressLiteral base, Address index): _base(base), _index(index) {}; |
|
436 |
AddressLiteral base() { return _base; } |
|
437 |
Address index() { return _index; } |
|
438 |
||
439 |
}; |
|
440 |
||
34162 | 441 |
class InstructionAttr; |
442 |
||
32727
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
443 |
// 64-bit refect the fxsave size which is 512 bytes and the new xsave area on EVEX which is another 2176 bytes |
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
444 |
// See fxsave and xsave(EVEX enabled) documentation for layout |
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
445 |
const int FPUStateSizeInWords = NOT_LP64(27) LP64_ONLY(2688 / wordSize); |
1 | 446 |
|
447 |
// The Intel x86/Amd64 Assembler: Pure assembler doing NO optimizations on the instruction |
|
448 |
// level (e.g. mov rax, 0 is not translated into xor rax, rax!); i.e., what you write |
|
449 |
// is what you get. The Assembler is generating code into a CodeBuffer. |
|
450 |
||
451 |
class Assembler : public AbstractAssembler { |
|
452 |
friend class AbstractAssembler; // for the non-virtual hack |
|
453 |
friend class LIR_Assembler; // as_Address() |
|
1066 | 454 |
friend class StubGenerator; |
1 | 455 |
|
456 |
public: |
|
457 |
enum Condition { // The x86 condition codes used for conditional jumps/moves. |
|
458 |
zero = 0x4, |
|
459 |
notZero = 0x5, |
|
460 |
equal = 0x4, |
|
461 |
notEqual = 0x5, |
|
462 |
less = 0xc, |
|
463 |
lessEqual = 0xe, |
|
464 |
greater = 0xf, |
|
465 |
greaterEqual = 0xd, |
|
466 |
below = 0x2, |
|
467 |
belowEqual = 0x6, |
|
468 |
above = 0x7, |
|
469 |
aboveEqual = 0x3, |
|
470 |
overflow = 0x0, |
|
471 |
noOverflow = 0x1, |
|
472 |
carrySet = 0x2, |
|
473 |
carryClear = 0x3, |
|
474 |
negative = 0x8, |
|
475 |
positive = 0x9, |
|
476 |
parity = 0xa, |
|
477 |
noParity = 0xb |
|
478 |
}; |
|
479 |
||
480 |
enum Prefix { |
|
481 |
// segment overrides |
|
482 |
CS_segment = 0x2e, |
|
483 |
SS_segment = 0x36, |
|
484 |
DS_segment = 0x3e, |
|
485 |
ES_segment = 0x26, |
|
486 |
FS_segment = 0x64, |
|
487 |
GS_segment = 0x65, |
|
488 |
||
489 |
REX = 0x40, |
|
490 |
||
491 |
REX_B = 0x41, |
|
492 |
REX_X = 0x42, |
|
493 |
REX_XB = 0x43, |
|
494 |
REX_R = 0x44, |
|
495 |
REX_RB = 0x45, |
|
496 |
REX_RX = 0x46, |
|
497 |
REX_RXB = 0x47, |
|
498 |
||
499 |
REX_W = 0x48, |
|
500 |
||
501 |
REX_WB = 0x49, |
|
502 |
REX_WX = 0x4A, |
|
503 |
REX_WXB = 0x4B, |
|
504 |
REX_WR = 0x4C, |
|
505 |
REX_WRB = 0x4D, |
|
506 |
REX_WRX = 0x4E, |
|
11427 | 507 |
REX_WRXB = 0x4F, |
508 |
||
509 |
VEX_3bytes = 0xC4, |
|
30624 | 510 |
VEX_2bytes = 0xC5, |
33066 | 511 |
EVEX_4bytes = 0x62, |
512 |
Prefix_EMPTY = 0x0 |
|
11427 | 513 |
}; |
514 |
||
515 |
enum VexPrefix { |
|
516 |
VEX_B = 0x20, |
|
517 |
VEX_X = 0x40, |
|
518 |
VEX_R = 0x80, |
|
519 |
VEX_W = 0x80 |
|
520 |
}; |
|
521 |
||
30624 | 522 |
enum ExexPrefix { |
523 |
EVEX_F = 0x04, |
|
524 |
EVEX_V = 0x08, |
|
525 |
EVEX_Rb = 0x10, |
|
526 |
EVEX_X = 0x40, |
|
527 |
EVEX_Z = 0x80 |
|
528 |
}; |
|
529 |
||
11427 | 530 |
enum VexSimdPrefix { |
531 |
VEX_SIMD_NONE = 0x0, |
|
532 |
VEX_SIMD_66 = 0x1, |
|
533 |
VEX_SIMD_F3 = 0x2, |
|
534 |
VEX_SIMD_F2 = 0x3 |
|
535 |
}; |
|
536 |
||
537 |
enum VexOpcode { |
|
538 |
VEX_OPCODE_NONE = 0x0, |
|
539 |
VEX_OPCODE_0F = 0x1, |
|
540 |
VEX_OPCODE_0F_38 = 0x2, |
|
33160
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
33089
diff
changeset
|
541 |
VEX_OPCODE_0F_3A = 0x3, |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
33089
diff
changeset
|
542 |
VEX_OPCODE_MASK = 0x1F |
1 | 543 |
}; |
544 |
||
30624 | 545 |
enum AvxVectorLen { |
546 |
AVX_128bit = 0x0, |
|
547 |
AVX_256bit = 0x1, |
|
548 |
AVX_512bit = 0x2, |
|
549 |
AVX_NoVec = 0x4 |
|
550 |
}; |
|
551 |
||
552 |
enum EvexTupleType { |
|
553 |
EVEX_FV = 0, |
|
554 |
EVEX_HV = 4, |
|
555 |
EVEX_FVM = 6, |
|
556 |
EVEX_T1S = 7, |
|
557 |
EVEX_T1F = 11, |
|
558 |
EVEX_T2 = 13, |
|
559 |
EVEX_T4 = 15, |
|
560 |
EVEX_T8 = 17, |
|
561 |
EVEX_HVM = 18, |
|
562 |
EVEX_QVM = 19, |
|
563 |
EVEX_OVM = 20, |
|
564 |
EVEX_M128 = 21, |
|
565 |
EVEX_DUP = 22, |
|
566 |
EVEX_ETUP = 23 |
|
567 |
}; |
|
568 |
||
569 |
enum EvexInputSizeInBits { |
|
570 |
EVEX_8bit = 0, |
|
571 |
EVEX_16bit = 1, |
|
572 |
EVEX_32bit = 2, |
|
34162 | 573 |
EVEX_64bit = 3, |
574 |
EVEX_NObit = 4 |
|
30624 | 575 |
}; |
576 |
||
1 | 577 |
enum WhichOperand { |
578 |
// input to locate_operand, and format code for relocations |
|
1066 | 579 |
imm_operand = 0, // embedded 32-bit|64-bit immediate operand |
1 | 580 |
disp32_operand = 1, // embedded 32-bit displacement or address |
581 |
call32_operand = 2, // embedded 32-bit self-relative displacement |
|
1066 | 582 |
#ifndef _LP64 |
1 | 583 |
_WhichOperand_limit = 3 |
1066 | 584 |
#else |
585 |
narrow_oop_operand = 3, // embedded 32-bit immediate narrow oop |
|
586 |
_WhichOperand_limit = 4 |
|
587 |
#endif |
|
1 | 588 |
}; |
589 |
||
38239
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
590 |
enum ComparisonPredicate { |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
591 |
eq = 0, |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
592 |
lt = 1, |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
593 |
le = 2, |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
594 |
_false = 3, |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
595 |
neq = 4, |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
596 |
nlt = 5, |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
597 |
nle = 6, |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
598 |
_true = 7 |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
599 |
}; |
1066 | 600 |
|
601 |
||
602 |
// NOTE: The general philopsophy of the declarations here is that 64bit versions |
|
603 |
// of instructions are freely declared without the need for wrapping them an ifdef. |
|
604 |
// (Some dangerous instructions are ifdef's out of inappropriate jvm's.) |
|
605 |
// In the .cpp file the implementations are wrapped so that they are dropped out |
|
15432 | 606 |
// of the resulting jvm. This is done mostly to keep the footprint of MINIMAL |
1066 | 607 |
// to the size it was prior to merging up the 32bit and 64bit assemblers. |
608 |
// |
|
609 |
// This does mean you'll get a linker/runtime error if you use a 64bit only instruction |
|
610 |
// in a 32bit vm. This is somewhat unfortunate but keeps the ifdef noise down. |
|
611 |
||
612 |
private: |
|
613 |
||
32727
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
614 |
bool _legacy_mode_bw; |
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
615 |
bool _legacy_mode_dq; |
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
616 |
bool _legacy_mode_vl; |
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
617 |
bool _legacy_mode_vlbw; |
36837 | 618 |
bool _is_managed; |
38138
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
619 |
bool _vector_masking; // For stub code use only |
34162 | 620 |
|
621 |
class InstructionAttr *_attributes; |
|
1066 | 622 |
|
623 |
// 64bit prefixes |
|
624 |
int prefix_and_encode(int reg_enc, bool byteinst = false); |
|
625 |
int prefixq_and_encode(int reg_enc); |
|
626 |
||
33160
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
33089
diff
changeset
|
627 |
int prefix_and_encode(int dst_enc, int src_enc) { |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
33089
diff
changeset
|
628 |
return prefix_and_encode(dst_enc, false, src_enc, false); |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
33089
diff
changeset
|
629 |
} |
c59f1676d27e
8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
33089
diff
changeset
|
630 |
int prefix_and_encode(int dst_enc, bool dst_is_byte, int src_enc, bool src_is_byte); |
1066 | 631 |
int prefixq_and_encode(int dst_enc, int src_enc); |
632 |
||
633 |
void prefix(Register reg); |
|
33066 | 634 |
void prefix(Register dst, Register src, Prefix p); |
635 |
void prefix(Register dst, Address adr, Prefix p); |
|
1066 | 636 |
void prefix(Address adr); |
637 |
void prefixq(Address adr); |
|
638 |
||
639 |
void prefix(Address adr, Register reg, bool byteinst = false); |
|
11427 | 640 |
void prefix(Address adr, XMMRegister reg); |
1066 | 641 |
void prefixq(Address adr, Register reg); |
11427 | 642 |
void prefixq(Address adr, XMMRegister reg); |
1066 | 643 |
|
644 |
void prefetch_prefix(Address src); |
|
645 |
||
11427 | 646 |
void rex_prefix(Address adr, XMMRegister xreg, |
647 |
VexSimdPrefix pre, VexOpcode opc, bool rex_w); |
|
648 |
int rex_prefix_and_encode(int dst_enc, int src_enc, |
|
649 |
VexSimdPrefix pre, VexOpcode opc, bool rex_w); |
|
650 |
||
34162 | 651 |
void vex_prefix(bool vex_r, bool vex_b, bool vex_x, int nds_enc, VexSimdPrefix pre, VexOpcode opc); |
30624 | 652 |
|
34162 | 653 |
void evex_prefix(bool vex_r, bool vex_b, bool vex_x, bool evex_r, bool evex_v, |
654 |
int nds_enc, VexSimdPrefix pre, VexOpcode opc); |
|
11427 | 655 |
|
656 |
void vex_prefix(Address adr, int nds_enc, int xreg_enc, |
|
657 |
VexSimdPrefix pre, VexOpcode opc, |
|
34162 | 658 |
InstructionAttr *attributes); |
31410 | 659 |
|
11427 | 660 |
int vex_prefix_and_encode(int dst_enc, int nds_enc, int src_enc, |
661 |
VexSimdPrefix pre, VexOpcode opc, |
|
34162 | 662 |
InstructionAttr *attributes); |
31410 | 663 |
|
34162 | 664 |
void simd_prefix(XMMRegister xreg, XMMRegister nds, Address adr, VexSimdPrefix pre, |
665 |
VexOpcode opc, InstructionAttr *attributes); |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
666 |
|
34162 | 667 |
int simd_prefix_and_encode(XMMRegister dst, XMMRegister nds, XMMRegister src, VexSimdPrefix pre, |
668 |
VexOpcode opc, InstructionAttr *attributes); |
|
11427 | 669 |
|
1066 | 670 |
// Helper functions for groups of instructions |
671 |
void emit_arith_b(int op1, int op2, Register dst, int imm8); |
|
672 |
||
673 |
void emit_arith(int op1, int op2, Register dst, int32_t imm32); |
|
11791
3be8cae67887
7125136: SIGILL on linux amd64 in gc/ArrayJuggle/Juggle29
kvn
parents:
11429
diff
changeset
|
674 |
// Force generation of a 4 byte immediate value even if it fits into 8bit |
3be8cae67887
7125136: SIGILL on linux amd64 in gc/ArrayJuggle/Juggle29
kvn
parents:
11429
diff
changeset
|
675 |
void emit_arith_imm32(int op1, int op2, Register dst, int32_t imm32); |
1066 | 676 |
void emit_arith(int op1, int op2, Register dst, Register src); |
677 |
||
30624 | 678 |
bool emit_compressed_disp_byte(int &disp); |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
679 |
|
1066 | 680 |
void emit_operand(Register reg, |
681 |
Register base, Register index, Address::ScaleFactor scale, |
|
682 |
int disp, |
|
683 |
RelocationHolder const& rspec, |
|
684 |
int rip_relative_correction = 0); |
|
685 |
||
686 |
void emit_operand(Register reg, Address adr, int rip_relative_correction = 0); |
|
687 |
||
688 |
// operands that only take the original 32bit registers |
|
689 |
void emit_operand32(Register reg, Address adr); |
|
690 |
||
691 |
void emit_operand(XMMRegister reg, |
|
692 |
Register base, Register index, Address::ScaleFactor scale, |
|
693 |
int disp, |
|
694 |
RelocationHolder const& rspec); |
|
695 |
||
696 |
void emit_operand(XMMRegister reg, Address adr); |
|
697 |
||
698 |
void emit_operand(MMXRegister reg, Address adr); |
|
699 |
||
700 |
// workaround gcc (3.2.1-7) bug |
|
701 |
void emit_operand(Address adr, MMXRegister reg); |
|
702 |
||
703 |
||
704 |
// Immediate-to-memory forms |
|
705 |
void emit_arith_operand(int op1, Register rm, Address adr, int32_t imm32); |
|
706 |
||
707 |
void emit_farith(int b1, int b2, int i); |
|
708 |
||
709 |
||
710 |
protected: |
|
711 |
#ifdef ASSERT |
|
712 |
void check_relocation(RelocationHolder const& rspec, int format); |
|
713 |
#endif |
|
714 |
||
715 |
void emit_data(jint data, relocInfo::relocType rtype, int format); |
|
716 |
void emit_data(jint data, RelocationHolder const& rspec, int format); |
|
717 |
void emit_data64(jlong data, relocInfo::relocType rtype, int format = 0); |
|
718 |
void emit_data64(jlong data, RelocationHolder const& rspec, int format = 0); |
|
719 |
||
720 |
bool reachable(AddressLiteral adr) NOT_LP64({ return true;}); |
|
721 |
||
722 |
// These are all easily abused and hence protected |
|
723 |
||
724 |
// 32BIT ONLY SECTION |
|
725 |
#ifndef _LP64 |
|
726 |
// Make these disappear in 64bit mode since they would never be correct |
|
727 |
void cmp_literal32(Register src1, int32_t imm32, RelocationHolder const& rspec); // 32BIT ONLY |
|
728 |
void cmp_literal32(Address src1, int32_t imm32, RelocationHolder const& rspec); // 32BIT ONLY |
|
729 |
||
2254
f13dda645a4b
6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents:
2150
diff
changeset
|
730 |
void mov_literal32(Register dst, int32_t imm32, RelocationHolder const& rspec); // 32BIT ONLY |
1066 | 731 |
void mov_literal32(Address dst, int32_t imm32, RelocationHolder const& rspec); // 32BIT ONLY |
732 |
||
733 |
void push_literal32(int32_t imm32, RelocationHolder const& rspec); // 32BIT ONLY |
|
734 |
#else |
|
735 |
// 64BIT ONLY SECTION |
|
736 |
void mov_literal64(Register dst, intptr_t imm64, RelocationHolder const& rspec); // 64BIT ONLY |
|
2254
f13dda645a4b
6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents:
2150
diff
changeset
|
737 |
|
f13dda645a4b
6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents:
2150
diff
changeset
|
738 |
void cmp_narrow_oop(Register src1, int32_t imm32, RelocationHolder const& rspec); |
f13dda645a4b
6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents:
2150
diff
changeset
|
739 |
void cmp_narrow_oop(Address src1, int32_t imm32, RelocationHolder const& rspec); |
f13dda645a4b
6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents:
2150
diff
changeset
|
740 |
|
f13dda645a4b
6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents:
2150
diff
changeset
|
741 |
void mov_narrow_oop(Register dst, int32_t imm32, RelocationHolder const& rspec); |
f13dda645a4b
6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents:
2150
diff
changeset
|
742 |
void mov_narrow_oop(Address dst, int32_t imm32, RelocationHolder const& rspec); |
1066 | 743 |
#endif // _LP64 |
744 |
||
745 |
// These are unique in that we are ensured by the caller that the 32bit |
|
746 |
// relative in these instructions will always be able to reach the potentially |
|
747 |
// 64bit address described by entry. Since they can take a 64bit address they |
|
748 |
// don't have the 32 suffix like the other instructions in this class. |
|
749 |
||
750 |
void call_literal(address entry, RelocationHolder const& rspec); |
|
751 |
void jmp_literal(address entry, RelocationHolder const& rspec); |
|
752 |
||
753 |
// Avoid using directly section |
|
754 |
// Instructions in this section are actually usable by anyone without danger |
|
755 |
// of failure but have performance issues that are addressed my enhanced |
|
756 |
// instructions which will do the proper thing base on the particular cpu. |
|
757 |
// We protect them because we don't trust you... |
|
758 |
||
759 |
// Don't use next inc() and dec() methods directly. INC & DEC instructions |
|
760 |
// could cause a partial flag stall since they don't set CF flag. |
|
761 |
// Use MacroAssembler::decrement() & MacroAssembler::increment() methods |
|
762 |
// which call inc() & dec() or add() & sub() in accordance with |
|
763 |
// the product flag UseIncDec value. |
|
764 |
||
765 |
void decl(Register dst); |
|
766 |
void decl(Address dst); |
|
767 |
void decq(Register dst); |
|
768 |
void decq(Address dst); |
|
769 |
||
770 |
void incl(Register dst); |
|
771 |
void incl(Address dst); |
|
772 |
void incq(Register dst); |
|
773 |
void incq(Address dst); |
|
774 |
||
775 |
// New cpus require use of movsd and movss to avoid partial register stall |
|
776 |
// when loading from memory. But for old Opteron use movlpd instead of movsd. |
|
777 |
// The selection is done in MacroAssembler::movdbl() and movflt(). |
|
778 |
||
779 |
// Move Scalar Single-Precision Floating-Point Values |
|
780 |
void movss(XMMRegister dst, Address src); |
|
781 |
void movss(XMMRegister dst, XMMRegister src); |
|
782 |
void movss(Address dst, XMMRegister src); |
|
783 |
||
784 |
// Move Scalar Double-Precision Floating-Point Values |
|
785 |
void movsd(XMMRegister dst, Address src); |
|
786 |
void movsd(XMMRegister dst, XMMRegister src); |
|
787 |
void movsd(Address dst, XMMRegister src); |
|
788 |
void movlpd(XMMRegister dst, Address src); |
|
789 |
||
790 |
// New cpus require use of movaps and movapd to avoid partial register stall |
|
791 |
// when moving between registers. |
|
792 |
void movaps(XMMRegister dst, XMMRegister src); |
|
793 |
void movapd(XMMRegister dst, XMMRegister src); |
|
794 |
||
795 |
// End avoid using directly |
|
796 |
||
797 |
||
798 |
// Instruction prefixes |
|
799 |
void prefix(Prefix p); |
|
800 |
||
1 | 801 |
public: |
802 |
||
803 |
// Creation |
|
30624 | 804 |
Assembler(CodeBuffer* code) : AbstractAssembler(code) { |
805 |
init_attributes(); |
|
806 |
} |
|
1 | 807 |
|
808 |
// Decoding |
|
809 |
static address locate_operand(address inst, WhichOperand which); |
|
810 |
static address locate_next_instruction(address inst); |
|
811 |
||
1066 | 812 |
// Utilities |
8871
5c3b26c4119e
6964776: c2 should ensure the polling page is reachable on 64 bit
iveresov
parents:
8494
diff
changeset
|
813 |
static bool is_polling_page_far() NOT_LP64({ return false;}); |
30624 | 814 |
static bool query_compressed_disp_byte(int disp, bool is_evex_inst, int vector_len, |
815 |
int cur_tuple_type, int in_size_in_bits, int cur_encoding); |
|
8871
5c3b26c4119e
6964776: c2 should ensure the polling page is reachable on 64 bit
iveresov
parents:
8494
diff
changeset
|
816 |
|
1066 | 817 |
// Generic instructions |
818 |
// Does 32bit or 64bit as needed for the platform. In some sense these |
|
819 |
// belong in macro assembler but there is no need for both varieties to exist |
|
820 |
||
30624 | 821 |
void init_attributes(void) { |
32727
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
822 |
_legacy_mode_bw = (VM_Version::supports_avx512bw() == false); |
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
823 |
_legacy_mode_dq = (VM_Version::supports_avx512dq() == false); |
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
824 |
_legacy_mode_vl = (VM_Version::supports_avx512vl() == false); |
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
825 |
_legacy_mode_vlbw = (VM_Version::supports_avx512vlbw() == false); |
36837 | 826 |
_is_managed = false; |
38138
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
827 |
_vector_masking = false; |
34162 | 828 |
_attributes = NULL; |
30624 | 829 |
} |
830 |
||
34162 | 831 |
void set_attributes(InstructionAttr *attributes) { _attributes = attributes; } |
832 |
void clear_attributes(void) { _attributes = NULL; } |
|
833 |
||
36837 | 834 |
void set_managed(void) { _is_managed = true; } |
835 |
void clear_managed(void) { _is_managed = false; } |
|
836 |
bool is_managed(void) { return _is_managed; } |
|
837 |
||
38138
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
838 |
// Following functions are for stub code use only |
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
839 |
void set_vector_masking(void) { _vector_masking = true; } |
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
840 |
void clear_vector_masking(void) { _vector_masking = false; } |
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
841 |
bool is_vector_masking(void) { return _vector_masking; } |
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
842 |
|
1066 | 843 |
void lea(Register dst, Address src); |
844 |
||
845 |
void mov(Register dst, Register src); |
|
846 |
||
847 |
void pusha(); |
|
848 |
void popa(); |
|
849 |
||
850 |
void pushf(); |
|
851 |
void popf(); |
|
852 |
||
853 |
void push(int32_t imm32); |
|
854 |
||
855 |
void push(Register src); |
|
856 |
||
857 |
void pop(Register dst); |
|
858 |
||
859 |
// These are dummies to prevent surprise implicit conversions to Register |
|
860 |
void push(void* v); |
|
861 |
void pop(void* v); |
|
862 |
||
863 |
// These do register sized moves/scans |
|
864 |
void rep_mov(); |
|
15114
4074553c678b
8005522: use fast-string instructions on x86 for zeroing
kvn
parents:
14631
diff
changeset
|
865 |
void rep_stos(); |
4074553c678b
8005522: use fast-string instructions on x86 for zeroing
kvn
parents:
14631
diff
changeset
|
866 |
void rep_stosb(); |
1066 | 867 |
void repne_scan(); |
868 |
#ifdef _LP64 |
|
869 |
void repne_scanl(); |
|
870 |
#endif |
|
871 |
||
872 |
// Vanilla instructions in lexical order |
|
873 |
||
7724
a92d706dbdd5
7003271: Hotspot should track cumulative Java heap bytes allocated on a per-thread basis
phh
parents:
7433
diff
changeset
|
874 |
void adcl(Address dst, int32_t imm32); |
a92d706dbdd5
7003271: Hotspot should track cumulative Java heap bytes allocated on a per-thread basis
phh
parents:
7433
diff
changeset
|
875 |
void adcl(Address dst, Register src); |
1066 | 876 |
void adcl(Register dst, int32_t imm32); |
1 | 877 |
void adcl(Register dst, Address src); |
878 |
void adcl(Register dst, Register src); |
|
879 |
||
1066 | 880 |
void adcq(Register dst, int32_t imm32); |
881 |
void adcq(Register dst, Address src); |
|
882 |
void adcq(Register dst, Register src); |
|
883 |
||
39419
cc993a4ab581
8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents:
38239
diff
changeset
|
884 |
void addb(Address dst, int imm8); |
cc993a4ab581
8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents:
38239
diff
changeset
|
885 |
void addw(Address dst, int imm16); |
cc993a4ab581
8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents:
38239
diff
changeset
|
886 |
|
1066 | 887 |
void addl(Address dst, int32_t imm32); |
1 | 888 |
void addl(Address dst, Register src); |
1066 | 889 |
void addl(Register dst, int32_t imm32); |
1 | 890 |
void addl(Register dst, Address src); |
891 |
void addl(Register dst, Register src); |
|
892 |
||
1066 | 893 |
void addq(Address dst, int32_t imm32); |
894 |
void addq(Address dst, Register src); |
|
895 |
void addq(Register dst, int32_t imm32); |
|
896 |
void addq(Register dst, Address src); |
|
897 |
void addq(Register dst, Register src); |
|
898 |
||
26434
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
899 |
#ifdef _LP64 |
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
900 |
//Add Unsigned Integers with Carry Flag |
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
901 |
void adcxq(Register dst, Register src); |
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
902 |
|
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
903 |
//Add Unsigned Integers with Overflow Flag |
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
904 |
void adoxq(Register dst, Register src); |
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
905 |
#endif |
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
906 |
|
1 | 907 |
void addr_nop_4(); |
908 |
void addr_nop_5(); |
|
909 |
void addr_nop_7(); |
|
910 |
void addr_nop_8(); |
|
911 |
||
1066 | 912 |
// Add Scalar Double-Precision Floating-Point Values |
913 |
void addsd(XMMRegister dst, Address src); |
|
914 |
void addsd(XMMRegister dst, XMMRegister src); |
|
915 |
||
916 |
// Add Scalar Single-Precision Floating-Point Values |
|
917 |
void addss(XMMRegister dst, Address src); |
|
918 |
void addss(XMMRegister dst, XMMRegister src); |
|
919 |
||
14132 | 920 |
// AES instructions |
921 |
void aesdec(XMMRegister dst, Address src); |
|
922 |
void aesdec(XMMRegister dst, XMMRegister src); |
|
923 |
void aesdeclast(XMMRegister dst, Address src); |
|
924 |
void aesdeclast(XMMRegister dst, XMMRegister src); |
|
925 |
void aesenc(XMMRegister dst, Address src); |
|
926 |
void aesenc(XMMRegister dst, XMMRegister src); |
|
927 |
void aesenclast(XMMRegister dst, Address src); |
|
928 |
void aesenclast(XMMRegister dst, XMMRegister src); |
|
929 |
||
930 |
||
11427 | 931 |
void andl(Address dst, int32_t imm32); |
1066 | 932 |
void andl(Register dst, int32_t imm32); |
933 |
void andl(Register dst, Address src); |
|
934 |
void andl(Register dst, Register src); |
|
935 |
||
10006 | 936 |
void andq(Address dst, int32_t imm32); |
1066 | 937 |
void andq(Register dst, int32_t imm32); |
938 |
void andq(Register dst, Address src); |
|
939 |
void andq(Register dst, Register src); |
|
940 |
||
23220
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
941 |
// BMI instructions |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
942 |
void andnl(Register dst, Register src1, Register src2); |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
943 |
void andnl(Register dst, Register src1, Address src2); |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
944 |
void andnq(Register dst, Register src1, Register src2); |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
945 |
void andnq(Register dst, Register src1, Address src2); |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
946 |
|
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
947 |
void blsil(Register dst, Register src); |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
948 |
void blsil(Register dst, Address src); |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
949 |
void blsiq(Register dst, Register src); |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
950 |
void blsiq(Register dst, Address src); |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
951 |
|
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
952 |
void blsmskl(Register dst, Register src); |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
953 |
void blsmskl(Register dst, Address src); |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
954 |
void blsmskq(Register dst, Register src); |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
955 |
void blsmskq(Register dst, Address src); |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
956 |
|
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
957 |
void blsrl(Register dst, Register src); |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
958 |
void blsrl(Register dst, Address src); |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
959 |
void blsrq(Register dst, Register src); |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
960 |
void blsrq(Register dst, Address src); |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
961 |
|
2862
fad636edf18f
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
2534
diff
changeset
|
962 |
void bsfl(Register dst, Register src); |
fad636edf18f
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
2534
diff
changeset
|
963 |
void bsrl(Register dst, Register src); |
fad636edf18f
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
2534
diff
changeset
|
964 |
|
fad636edf18f
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
2534
diff
changeset
|
965 |
#ifdef _LP64 |
fad636edf18f
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
2534
diff
changeset
|
966 |
void bsfq(Register dst, Register src); |
fad636edf18f
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
2534
diff
changeset
|
967 |
void bsrq(Register dst, Register src); |
fad636edf18f
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
2534
diff
changeset
|
968 |
#endif |
fad636edf18f
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
2534
diff
changeset
|
969 |
|
1066 | 970 |
void bswapl(Register reg); |
971 |
||
972 |
void bswapq(Register reg); |
|
973 |
||
1 | 974 |
void call(Label& L, relocInfo::relocType rtype); |
975 |
void call(Register reg); // push pc; pc <- reg |
|
976 |
void call(Address adr); // push pc; pc <- adr |
|
977 |
||
1066 | 978 |
void cdql(); |
979 |
||
980 |
void cdqq(); |
|
981 |
||
14626
0cf4eccf130f
8003240: x86: move MacroAssembler into separate file
twisti
parents:
14625
diff
changeset
|
982 |
void cld(); |
1066 | 983 |
|
984 |
void clflush(Address adr); |
|
985 |
||
986 |
void cmovl(Condition cc, Register dst, Register src); |
|
987 |
void cmovl(Condition cc, Register dst, Address src); |
|
988 |
||
989 |
void cmovq(Condition cc, Register dst, Register src); |
|
990 |
void cmovq(Condition cc, Register dst, Address src); |
|
991 |
||
992 |
||
993 |
void cmpb(Address dst, int imm8); |
|
994 |
||
995 |
void cmpl(Address dst, int32_t imm32); |
|
996 |
||
997 |
void cmpl(Register dst, int32_t imm32); |
|
998 |
void cmpl(Register dst, Register src); |
|
999 |
void cmpl(Register dst, Address src); |
|
1000 |
||
1001 |
void cmpq(Address dst, int32_t imm32); |
|
1002 |
void cmpq(Address dst, Register src); |
|
1003 |
||
1004 |
void cmpq(Register dst, int32_t imm32); |
|
1005 |
void cmpq(Register dst, Register src); |
|
1006 |
void cmpq(Register dst, Address src); |
|
1007 |
||
1008 |
// these are dummies used to catch attempting to convert NULL to Register |
|
1009 |
void cmpl(Register dst, void* junk); // dummy |
|
1010 |
void cmpq(Register dst, void* junk); // dummy |
|
1011 |
||
1012 |
void cmpw(Address dst, int imm16); |
|
1013 |
||
1014 |
void cmpxchg8 (Address adr); |
|
1015 |
||
27691
733f189ad1f7
8058255: Native jbyte Atomic::cmpxchg for supported x86 platforms
jwilhelm
parents:
26576
diff
changeset
|
1016 |
void cmpxchgb(Register reg, Address adr); |
1066 | 1017 |
void cmpxchgl(Register reg, Address adr); |
1018 |
||
1019 |
void cmpxchgq(Register reg, Address adr); |
|
1020 |
||
1021 |
// Ordered Compare Scalar Double-Precision Floating-Point Values and set EFLAGS |
|
1022 |
void comisd(XMMRegister dst, Address src); |
|
11427 | 1023 |
void comisd(XMMRegister dst, XMMRegister src); |
1066 | 1024 |
|
1025 |
// Ordered Compare Scalar Single-Precision Floating-Point Values and set EFLAGS |
|
1026 |
void comiss(XMMRegister dst, Address src); |
|
11427 | 1027 |
void comiss(XMMRegister dst, XMMRegister src); |
1066 | 1028 |
|
1029 |
// Identify processor type and features |
|
14626
0cf4eccf130f
8003240: x86: move MacroAssembler into separate file
twisti
parents:
14625
diff
changeset
|
1030 |
void cpuid(); |
1066 | 1031 |
|
33066 | 1032 |
// CRC32C |
1033 |
void crc32(Register crc, Register v, int8_t sizeInBytes); |
|
1034 |
void crc32(Register crc, Address adr, int8_t sizeInBytes); |
|
1035 |
||
1066 | 1036 |
// Convert Scalar Double-Precision Floating-Point Value to Scalar Single-Precision Floating-Point Value |
1037 |
void cvtsd2ss(XMMRegister dst, XMMRegister src); |
|
11427 | 1038 |
void cvtsd2ss(XMMRegister dst, Address src); |
1066 | 1039 |
|
1040 |
// Convert Doubleword Integer to Scalar Double-Precision Floating-Point Value |
|
1041 |
void cvtsi2sdl(XMMRegister dst, Register src); |
|
11427 | 1042 |
void cvtsi2sdl(XMMRegister dst, Address src); |
1066 | 1043 |
void cvtsi2sdq(XMMRegister dst, Register src); |
11427 | 1044 |
void cvtsi2sdq(XMMRegister dst, Address src); |
1066 | 1045 |
|
1046 |
// Convert Doubleword Integer to Scalar Single-Precision Floating-Point Value |
|
1047 |
void cvtsi2ssl(XMMRegister dst, Register src); |
|
11427 | 1048 |
void cvtsi2ssl(XMMRegister dst, Address src); |
1066 | 1049 |
void cvtsi2ssq(XMMRegister dst, Register src); |
11427 | 1050 |
void cvtsi2ssq(XMMRegister dst, Address src); |
1066 | 1051 |
|
1052 |
// Convert Packed Signed Doubleword Integers to Packed Double-Precision Floating-Point Value |
|
1053 |
void cvtdq2pd(XMMRegister dst, XMMRegister src); |
|
1054 |
||
1055 |
// Convert Packed Signed Doubleword Integers to Packed Single-Precision Floating-Point Value |
|
1056 |
void cvtdq2ps(XMMRegister dst, XMMRegister src); |
|
1057 |
||
1058 |
// Convert Scalar Single-Precision Floating-Point Value to Scalar Double-Precision Floating-Point Value |
|
1059 |
void cvtss2sd(XMMRegister dst, XMMRegister src); |
|
11427 | 1060 |
void cvtss2sd(XMMRegister dst, Address src); |
1066 | 1061 |
|
1062 |
// Convert with Truncation Scalar Double-Precision Floating-Point Value to Doubleword Integer |
|
1063 |
void cvttsd2sil(Register dst, Address src); |
|
1064 |
void cvttsd2sil(Register dst, XMMRegister src); |
|
1065 |
void cvttsd2siq(Register dst, XMMRegister src); |
|
1066 |
||
1067 |
// Convert with Truncation Scalar Single-Precision Floating-Point Value to Doubleword Integer |
|
1068 |
void cvttss2sil(Register dst, XMMRegister src); |
|
1069 |
void cvttss2siq(Register dst, XMMRegister src); |
|
1070 |
||
38018
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
37293
diff
changeset
|
1071 |
void cvttpd2dq(XMMRegister dst, XMMRegister src); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
37293
diff
changeset
|
1072 |
|
1066 | 1073 |
// Divide Scalar Double-Precision Floating-Point Values |
1074 |
void divsd(XMMRegister dst, Address src); |
|
1075 |
void divsd(XMMRegister dst, XMMRegister src); |
|
1076 |
||
1077 |
// Divide Scalar Single-Precision Floating-Point Values |
|
1078 |
void divss(XMMRegister dst, Address src); |
|
1079 |
void divss(XMMRegister dst, XMMRegister src); |
|
1080 |
||
1081 |
void emms(); |
|
1082 |
||
1083 |
void fabs(); |
|
1084 |
||
1085 |
void fadd(int i); |
|
1086 |
||
1087 |
void fadd_d(Address src); |
|
1088 |
void fadd_s(Address src); |
|
1089 |
||
1090 |
// "Alternate" versions of x87 instructions place result down in FPU |
|
1091 |
// stack instead of on TOS |
|
1092 |
||
1093 |
void fadda(int i); // "alternate" fadd |
|
1094 |
void faddp(int i = 1); |
|
1095 |
||
1096 |
void fchs(); |
|
1097 |
||
1098 |
void fcom(int i); |
|
1099 |
||
1100 |
void fcomp(int i = 1); |
|
1101 |
void fcomp_d(Address src); |
|
1102 |
void fcomp_s(Address src); |
|
1103 |
||
1104 |
void fcompp(); |
|
1105 |
||
1106 |
void fcos(); |
|
1107 |
||
1108 |
void fdecstp(); |
|
1109 |
||
1110 |
void fdiv(int i); |
|
1111 |
void fdiv_d(Address src); |
|
1112 |
void fdivr_s(Address src); |
|
1113 |
void fdiva(int i); // "alternate" fdiv |
|
1114 |
void fdivp(int i = 1); |
|
1115 |
||
1116 |
void fdivr(int i); |
|
1117 |
void fdivr_d(Address src); |
|
1118 |
void fdiv_s(Address src); |
|
1119 |
||
1120 |
void fdivra(int i); // "alternate" reversed fdiv |
|
1121 |
||
1122 |
void fdivrp(int i = 1); |
|
1123 |
||
1124 |
void ffree(int i = 0); |
|
1125 |
||
1126 |
void fild_d(Address adr); |
|
1127 |
void fild_s(Address adr); |
|
1128 |
||
1129 |
void fincstp(); |
|
1130 |
||
1131 |
void finit(); |
|
1132 |
||
1133 |
void fist_s (Address adr); |
|
1134 |
void fistp_d(Address adr); |
|
1135 |
void fistp_s(Address adr); |
|
1136 |
||
1137 |
void fld1(); |
|
1138 |
||
1139 |
void fld_d(Address adr); |
|
1140 |
void fld_s(Address adr); |
|
1141 |
void fld_s(int index); |
|
1142 |
void fld_x(Address adr); // extended-precision (80-bit) format |
|
1143 |
||
1144 |
void fldcw(Address src); |
|
1145 |
||
1146 |
void fldenv(Address src); |
|
1147 |
||
1148 |
void fldlg2(); |
|
1149 |
||
1150 |
void fldln2(); |
|
1151 |
||
1152 |
void fldz(); |
|
1153 |
||
1154 |
void flog(); |
|
1155 |
void flog10(); |
|
1156 |
||
1157 |
void fmul(int i); |
|
1158 |
||
1159 |
void fmul_d(Address src); |
|
1160 |
void fmul_s(Address src); |
|
1161 |
||
1162 |
void fmula(int i); // "alternate" fmul |
|
1163 |
||
1164 |
void fmulp(int i = 1); |
|
1165 |
||
1166 |
void fnsave(Address dst); |
|
1167 |
||
1168 |
void fnstcw(Address src); |
|
1169 |
||
1170 |
void fnstsw_ax(); |
|
1171 |
||
1172 |
void fprem(); |
|
1173 |
void fprem1(); |
|
1174 |
||
1175 |
void frstor(Address src); |
|
1176 |
||
1177 |
void fsin(); |
|
1178 |
||
1179 |
void fsqrt(); |
|
1180 |
||
1181 |
void fst_d(Address adr); |
|
1182 |
void fst_s(Address adr); |
|
1183 |
||
1184 |
void fstp_d(Address adr); |
|
1185 |
void fstp_d(int index); |
|
1186 |
void fstp_s(Address adr); |
|
1187 |
void fstp_x(Address adr); // extended-precision (80-bit) format |
|
1188 |
||
1189 |
void fsub(int i); |
|
1190 |
void fsub_d(Address src); |
|
1191 |
void fsub_s(Address src); |
|
1192 |
||
1193 |
void fsuba(int i); // "alternate" fsub |
|
1194 |
||
1195 |
void fsubp(int i = 1); |
|
1196 |
||
1197 |
void fsubr(int i); |
|
1198 |
void fsubr_d(Address src); |
|
1199 |
void fsubr_s(Address src); |
|
1200 |
||
1201 |
void fsubra(int i); // "alternate" reversed fsub |
|
1202 |
||
1203 |
void fsubrp(int i = 1); |
|
1204 |
||
1205 |
void ftan(); |
|
1206 |
||
1207 |
void ftst(); |
|
1208 |
||
1209 |
void fucomi(int i = 1); |
|
1210 |
void fucomip(int i = 1); |
|
1211 |
||
1212 |
void fwait(); |
|
1213 |
||
1214 |
void fxch(int i = 1); |
|
1215 |
||
1216 |
void fxrstor(Address src); |
|
32727
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
1217 |
void xrstor(Address src); |
1066 | 1218 |
|
1219 |
void fxsave(Address dst); |
|
32727
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
1220 |
void xsave(Address dst); |
1066 | 1221 |
|
1222 |
void fyl2x(); |
|
12739
09f26b73ae66
7133857: exp() and pow() should use the x87 ISA on x86
roland
parents:
11791
diff
changeset
|
1223 |
void frndint(); |
09f26b73ae66
7133857: exp() and pow() should use the x87 ISA on x86
roland
parents:
11791
diff
changeset
|
1224 |
void f2xm1(); |
09f26b73ae66
7133857: exp() and pow() should use the x87 ISA on x86
roland
parents:
11791
diff
changeset
|
1225 |
void fldl2e(); |
1066 | 1226 |
|
1227 |
void hlt(); |
|
1228 |
||
1229 |
void idivl(Register src); |
|
7121 | 1230 |
void divl(Register src); // Unsigned division |
1066 | 1231 |
|
26434
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
1232 |
#ifdef _LP64 |
1066 | 1233 |
void idivq(Register src); |
26434
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
1234 |
#endif |
1066 | 1235 |
|
35540
e001ad24dcdb
8143353: update for x86 sin and cos in the math lib
vdeshpande
parents:
35154
diff
changeset
|
1236 |
void imull(Register src); |
1066 | 1237 |
void imull(Register dst, Register src); |
1238 |
void imull(Register dst, Register src, int value); |
|
21105
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
18507
diff
changeset
|
1239 |
void imull(Register dst, Address src); |
1066 | 1240 |
|
26434
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
1241 |
#ifdef _LP64 |
1066 | 1242 |
void imulq(Register dst, Register src); |
1243 |
void imulq(Register dst, Register src, int value); |
|
21105
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
18507
diff
changeset
|
1244 |
void imulq(Register dst, Address src); |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
18507
diff
changeset
|
1245 |
#endif |
1066 | 1246 |
|
1 | 1247 |
// jcc is the generic conditional branch generator to run- |
1248 |
// time routines, jcc is used for branches to labels. jcc |
|
1249 |
// takes a branch opcode (cc) and a label (L) and generates |
|
1250 |
// either a backward branch or a forward branch and links it |
|
1251 |
// to the label fixup chain. Usage: |
|
1252 |
// |
|
1253 |
// Label L; // unbound label |
|
1254 |
// jcc(cc, L); // forward branch to unbound label |
|
1255 |
// bind(L); // bind label to the current pc |
|
1256 |
// jcc(cc, L); // backward branch to bound label |
|
1257 |
// bind(L); // illegal: a label may be bound only once |
|
1258 |
// |
|
1259 |
// Note: The same Label can be used for forward and backward branches |
|
1260 |
// but it may be bound only once. |
|
1261 |
||
10264 | 1262 |
void jcc(Condition cc, Label& L, bool maybe_short = true); |
1 | 1263 |
|
1264 |
// Conditional jump to a 8-bit offset to L. |
|
1265 |
// WARNING: be very careful using this for forward jumps. If the label is |
|
1266 |
// not bound within an 8-bit offset of this instruction, a run-time error |
|
1267 |
// will occur. |
|
1268 |
void jccb(Condition cc, Label& L); |
|
1269 |
||
1066 | 1270 |
void jmp(Address entry); // pc <- entry |
1271 |
||
1272 |
// Label operations & relative jumps (PPUM Appendix D) |
|
10264 | 1273 |
void jmp(Label& L, bool maybe_short = true); // unconditional jump to L |
1066 | 1274 |
|
1275 |
void jmp(Register entry); // pc <- entry |
|
1276 |
||
1277 |
// Unconditional 8-bit offset jump to L. |
|
1278 |
// WARNING: be very careful using this for forward jumps. If the label is |
|
1279 |
// not bound within an 8-bit offset of this instruction, a run-time error |
|
1280 |
// will occur. |
|
1281 |
void jmpb(Label& L); |
|
1282 |
||
1283 |
void ldmxcsr( Address src ); |
|
1284 |
||
1285 |
void leal(Register dst, Address src); |
|
1286 |
||
1287 |
void leaq(Register dst, Address src); |
|
1288 |
||
14626
0cf4eccf130f
8003240: x86: move MacroAssembler into separate file
twisti
parents:
14625
diff
changeset
|
1289 |
void lfence(); |
1066 | 1290 |
|
1291 |
void lock(); |
|
1292 |
||
2862
fad636edf18f
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
2534
diff
changeset
|
1293 |
void lzcntl(Register dst, Register src); |
fad636edf18f
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
2534
diff
changeset
|
1294 |
|
fad636edf18f
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
2534
diff
changeset
|
1295 |
#ifdef _LP64 |
fad636edf18f
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
2534
diff
changeset
|
1296 |
void lzcntq(Register dst, Register src); |
fad636edf18f
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
2534
diff
changeset
|
1297 |
#endif |
fad636edf18f
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
2534
diff
changeset
|
1298 |
|
1066 | 1299 |
enum Membar_mask_bits { |
1300 |
StoreStore = 1 << 3, |
|
1301 |
LoadStore = 1 << 2, |
|
1302 |
StoreLoad = 1 << 1, |
|
1303 |
LoadLoad = 1 << 0 |
|
1304 |
}; |
|
1305 |
||
2338
a8660a1b709b
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
2332
diff
changeset
|
1306 |
// Serializes memory and blows flags |
1066 | 1307 |
void membar(Membar_mask_bits order_constraint) { |
2338
a8660a1b709b
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
2332
diff
changeset
|
1308 |
if (os::is_MP()) { |
a8660a1b709b
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
2332
diff
changeset
|
1309 |
// We only have to handle StoreLoad |
a8660a1b709b
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
2332
diff
changeset
|
1310 |
if (order_constraint & StoreLoad) { |
a8660a1b709b
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
2332
diff
changeset
|
1311 |
// All usable chips support "locked" instructions which suffice |
a8660a1b709b
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
2332
diff
changeset
|
1312 |
// as barriers, and are much faster than the alternative of |
26576
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1313 |
// using cpuid instruction. We use here a locked add [esp-C],0. |
2338
a8660a1b709b
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
2332
diff
changeset
|
1314 |
// This is conveniently otherwise a no-op except for blowing |
26576
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1315 |
// flags, and introducing a false dependency on target memory |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1316 |
// location. We can't do anything with flags, but we can avoid |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1317 |
// memory dependencies in the current method by locked-adding |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1318 |
// somewhere else on the stack. Doing [esp+C] will collide with |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1319 |
// something on stack in current method, hence we go for [esp-C]. |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1320 |
// It is convenient since it is almost always in data cache, for |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1321 |
// any small C. We need to step back from SP to avoid data |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1322 |
// dependencies with other things on below SP (callee-saves, for |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1323 |
// example). Without a clear way to figure out the minimal safe |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1324 |
// distance from SP, it makes sense to step back the complete |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1325 |
// cache line, as this will also avoid possible second-order effects |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1326 |
// with locked ops against the cache line. Our choice of offset |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1327 |
// is bounded by x86 operand encoding, which should stay within |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1328 |
// [-128; +127] to have the 8-byte displacement encoding. |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1329 |
// |
2338
a8660a1b709b
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
2332
diff
changeset
|
1330 |
// Any change to this code may need to revisit other places in |
a8660a1b709b
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
2332
diff
changeset
|
1331 |
// the code where this idiom is used, in particular the |
a8660a1b709b
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
2332
diff
changeset
|
1332 |
// orderAccess code. |
26576
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1333 |
|
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1334 |
int offset = -VM_Version::L1_line_size(); |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1335 |
if (offset < -128) { |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1336 |
offset = -128; |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1337 |
} |
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1338 |
|
2338
a8660a1b709b
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
2332
diff
changeset
|
1339 |
lock(); |
26576
a9429d24d429
8050147: StoreLoad barrier interferes with stack usages
shade
parents:
26434
diff
changeset
|
1340 |
addl(Address(rsp, offset), 0);// Assert the lock# signal here |
2338
a8660a1b709b
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
2332
diff
changeset
|
1341 |
} |
a8660a1b709b
6822204: volatile fences should prefer lock:addl to actual mfence instructions
never
parents:
2332
diff
changeset
|
1342 |
} |
1066 | 1343 |
} |
1344 |
||
1345 |
void mfence(); |
|
1346 |
||
1347 |
// Moves |
|
1348 |
||
1349 |
void mov64(Register dst, int64_t imm64); |
|
1350 |
||
1351 |
void movb(Address dst, Register src); |
|
1352 |
void movb(Address dst, int imm8); |
|
1353 |
void movb(Register dst, Address src); |
|
1354 |
||
33465 | 1355 |
void movddup(XMMRegister dst, XMMRegister src); |
1356 |
||
35113 | 1357 |
void kmovbl(KRegister dst, Register src); |
1358 |
void kmovbl(Register dst, KRegister src); |
|
34203 | 1359 |
void kmovwl(KRegister dst, Register src); |
38049 | 1360 |
void kmovwl(KRegister dst, Address src); |
35113 | 1361 |
void kmovwl(Register dst, KRegister src); |
34203 | 1362 |
void kmovdl(KRegister dst, Register src); |
35113 | 1363 |
void kmovdl(Register dst, KRegister src); |
32727
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
1364 |
void kmovql(KRegister dst, KRegister src); |
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
1365 |
void kmovql(Address dst, KRegister src); |
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
1366 |
void kmovql(KRegister dst, Address src); |
35113 | 1367 |
void kmovql(KRegister dst, Register src); |
1368 |
void kmovql(Register dst, KRegister src); |
|
30624 | 1369 |
|
38049 | 1370 |
void knotwl(KRegister dst, KRegister src); |
1371 |
||
34203 | 1372 |
void kortestbl(KRegister dst, KRegister src); |
1373 |
void kortestwl(KRegister dst, KRegister src); |
|
1374 |
void kortestdl(KRegister dst, KRegister src); |
|
1375 |
void kortestql(KRegister dst, KRegister src); |
|
1376 |
||
38239
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1377 |
void ktestq(KRegister src1, KRegister src2); |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1378 |
void ktestd(KRegister src1, KRegister src2); |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1379 |
|
38138
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
1380 |
void ktestql(KRegister dst, KRegister src); |
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
1381 |
|
1066 | 1382 |
void movdl(XMMRegister dst, Register src); |
1383 |
void movdl(Register dst, XMMRegister src); |
|
8494
4258c78226d9
6942326: x86 code in string_indexof() could read beyond reserved heap space
kvn
parents:
8332
diff
changeset
|
1384 |
void movdl(XMMRegister dst, Address src); |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
12955
diff
changeset
|
1385 |
void movdl(Address dst, XMMRegister src); |
1066 | 1386 |
|
1387 |
// Move Double Quadword |
|
1388 |
void movdq(XMMRegister dst, Register src); |
|
1389 |
void movdq(Register dst, XMMRegister src); |
|
1390 |
||
1391 |
// Move Aligned Double Quadword |
|
1392 |
void movdqa(XMMRegister dst, XMMRegister src); |
|
18507
61bfc8995bb3
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
15436
diff
changeset
|
1393 |
void movdqa(XMMRegister dst, Address src); |
1066 | 1394 |
|
1437 | 1395 |
// Move Unaligned Double Quadword |
1396 |
void movdqu(Address dst, XMMRegister src); |
|
1397 |
void movdqu(XMMRegister dst, Address src); |
|
1398 |
void movdqu(XMMRegister dst, XMMRegister src); |
|
1399 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
12955
diff
changeset
|
1400 |
// Move Unaligned 256bit Vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
12955
diff
changeset
|
1401 |
void vmovdqu(Address dst, XMMRegister src); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
12955
diff
changeset
|
1402 |
void vmovdqu(XMMRegister dst, Address src); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
12955
diff
changeset
|
1403 |
void vmovdqu(XMMRegister dst, XMMRegister src); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
12955
diff
changeset
|
1404 |
|
30624 | 1405 |
// Move Unaligned 512bit Vector |
34203 | 1406 |
void evmovdqub(Address dst, XMMRegister src, int vector_len); |
1407 |
void evmovdqub(XMMRegister dst, Address src, int vector_len); |
|
1408 |
void evmovdqub(XMMRegister dst, XMMRegister src, int vector_len); |
|
38239
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1409 |
void evmovdqub(XMMRegister dst, KRegister mask, Address src, int vector_len); |
34203 | 1410 |
void evmovdquw(Address dst, XMMRegister src, int vector_len); |
38239
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1411 |
void evmovdquw(Address dst, KRegister mask, XMMRegister src, int vector_len); |
34203 | 1412 |
void evmovdquw(XMMRegister dst, Address src, int vector_len); |
38239
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1413 |
void evmovdquw(XMMRegister dst, KRegister mask, Address src, int vector_len); |
32727
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
1414 |
void evmovdqul(Address dst, XMMRegister src, int vector_len); |
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
1415 |
void evmovdqul(XMMRegister dst, Address src, int vector_len); |
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
1416 |
void evmovdqul(XMMRegister dst, XMMRegister src, int vector_len); |
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
1417 |
void evmovdquq(Address dst, XMMRegister src, int vector_len); |
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
1418 |
void evmovdquq(XMMRegister dst, Address src, int vector_len); |
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
1419 |
void evmovdquq(XMMRegister dst, XMMRegister src, int vector_len); |
30624 | 1420 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
12955
diff
changeset
|
1421 |
// Move lower 64bit to high 64bit in 128bit register |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
12955
diff
changeset
|
1422 |
void movlhps(XMMRegister dst, XMMRegister src); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
12955
diff
changeset
|
1423 |
|
1066 | 1424 |
void movl(Register dst, int32_t imm32); |
1425 |
void movl(Address dst, int32_t imm32); |
|
1426 |
void movl(Register dst, Register src); |
|
1427 |
void movl(Register dst, Address src); |
|
1428 |
void movl(Address dst, Register src); |
|
1429 |
||
1430 |
// These dummies prevent using movl from converting a zero (like NULL) into Register |
|
1431 |
// by giving the compiler two choices it can't resolve |
|
1432 |
||
1433 |
void movl(Address dst, void* junk); |
|
1434 |
void movl(Register dst, void* junk); |
|
1435 |
||
1436 |
#ifdef _LP64 |
|
1437 |
void movq(Register dst, Register src); |
|
1438 |
void movq(Register dst, Address src); |
|
7724
a92d706dbdd5
7003271: Hotspot should track cumulative Java heap bytes allocated on a per-thread basis
phh
parents:
7433
diff
changeset
|
1439 |
void movq(Address dst, Register src); |
1066 | 1440 |
#endif |
1441 |
||
1442 |
void movq(Address dst, MMXRegister src ); |
|
1443 |
void movq(MMXRegister dst, Address src ); |
|
1444 |
||
1445 |
#ifdef _LP64 |
|
1446 |
// These dummies prevent using movq from converting a zero (like NULL) into Register |
|
1447 |
// by giving the compiler two choices it can't resolve |
|
1448 |
||
1449 |
void movq(Address dst, void* dummy); |
|
1450 |
void movq(Register dst, void* dummy); |
|
1451 |
#endif |
|
1452 |
||
1453 |
// Move Quadword |
|
1454 |
void movq(Address dst, XMMRegister src); |
|
1455 |
void movq(XMMRegister dst, Address src); |
|
1456 |
||
1457 |
void movsbl(Register dst, Address src); |
|
1458 |
void movsbl(Register dst, Register src); |
|
1459 |
||
1460 |
#ifdef _LP64 |
|
2150 | 1461 |
void movsbq(Register dst, Address src); |
1462 |
void movsbq(Register dst, Register src); |
|
1463 |
||
1066 | 1464 |
// Move signed 32bit immediate to 64bit extending sign |
7724
a92d706dbdd5
7003271: Hotspot should track cumulative Java heap bytes allocated on a per-thread basis
phh
parents:
7433
diff
changeset
|
1465 |
void movslq(Address dst, int32_t imm64); |
1066 | 1466 |
void movslq(Register dst, int32_t imm64); |
1467 |
||
1468 |
void movslq(Register dst, Address src); |
|
1469 |
void movslq(Register dst, Register src); |
|
1470 |
void movslq(Register dst, void* src); // Dummy declaration to cause NULL to be ambiguous |
|
1471 |
#endif |
|
1472 |
||
1473 |
void movswl(Register dst, Address src); |
|
1474 |
void movswl(Register dst, Register src); |
|
1475 |
||
2150 | 1476 |
#ifdef _LP64 |
1477 |
void movswq(Register dst, Address src); |
|
1478 |
void movswq(Register dst, Register src); |
|
1479 |
#endif |
|
1480 |
||
1066 | 1481 |
void movw(Address dst, int imm16); |
1482 |
void movw(Register dst, Address src); |
|
1483 |
void movw(Address dst, Register src); |
|
1484 |
||
1485 |
void movzbl(Register dst, Address src); |
|
1486 |
void movzbl(Register dst, Register src); |
|
1487 |
||
2150 | 1488 |
#ifdef _LP64 |
1489 |
void movzbq(Register dst, Address src); |
|
1490 |
void movzbq(Register dst, Register src); |
|
1491 |
#endif |
|
1492 |
||
1066 | 1493 |
void movzwl(Register dst, Address src); |
1494 |
void movzwl(Register dst, Register src); |
|
1495 |
||
2150 | 1496 |
#ifdef _LP64 |
1497 |
void movzwq(Register dst, Address src); |
|
1498 |
void movzwq(Register dst, Register src); |
|
1499 |
#endif |
|
1500 |
||
26434
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
1501 |
// Unsigned multiply with RAX destination register |
1066 | 1502 |
void mull(Address src); |
1503 |
void mull(Register src); |
|
1504 |
||
26434
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
1505 |
#ifdef _LP64 |
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
1506 |
void mulq(Address src); |
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
1507 |
void mulq(Register src); |
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
1508 |
void mulxq(Register dst1, Register dst2, Register src); |
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
1509 |
#endif |
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
1510 |
|
1066 | 1511 |
// Multiply Scalar Double-Precision Floating-Point Values |
1512 |
void mulsd(XMMRegister dst, Address src); |
|
1513 |
void mulsd(XMMRegister dst, XMMRegister src); |
|
1514 |
||
1515 |
// Multiply Scalar Single-Precision Floating-Point Values |
|
1516 |
void mulss(XMMRegister dst, Address src); |
|
1517 |
void mulss(XMMRegister dst, XMMRegister src); |
|
1518 |
||
1519 |
void negl(Register dst); |
|
1520 |
||
1521 |
#ifdef _LP64 |
|
1522 |
void negq(Register dst); |
|
1523 |
#endif |
|
1524 |
||
1525 |
void nop(int i = 1); |
|
1526 |
||
1527 |
void notl(Register dst); |
|
1528 |
||
1529 |
#ifdef _LP64 |
|
1530 |
void notq(Register dst); |
|
1531 |
#endif |
|
1532 |
||
1533 |
void orl(Address dst, int32_t imm32); |
|
1534 |
void orl(Register dst, int32_t imm32); |
|
1535 |
void orl(Register dst, Address src); |
|
1536 |
void orl(Register dst, Register src); |
|
31129
02ee7609f0e1
8081778: Use Intel x64 CPU instructions for RSA acceleration
kvn
parents:
30624
diff
changeset
|
1537 |
void orl(Address dst, Register src); |
1066 | 1538 |
|
1539 |
void orq(Address dst, int32_t imm32); |
|
1540 |
void orq(Register dst, int32_t imm32); |
|
1541 |
void orq(Register dst, Address src); |
|
1542 |
void orq(Register dst, Register src); |
|
1543 |
||
11427 | 1544 |
// Pack with unsigned saturation |
1545 |
void packuswb(XMMRegister dst, XMMRegister src); |
|
1546 |
void packuswb(XMMRegister dst, Address src); |
|
30624 | 1547 |
void vpackuswb(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
15242
695bb216be99
6896617: Optimize sun.nio.cs.ISO_8859_1$Encode.encodeArrayLoop() on x86
kvn
parents:
15117
diff
changeset
|
1548 |
|
695bb216be99
6896617: Optimize sun.nio.cs.ISO_8859_1$Encode.encodeArrayLoop() on x86
kvn
parents:
15117
diff
changeset
|
1549 |
// Pemutation of 64bit words |
30624 | 1550 |
void vpermq(XMMRegister dst, XMMRegister src, int imm8, int vector_len); |
32727
320855c2baef
8132160: support for AVX 512 call frames and stack management
mcberg
parents:
32723
diff
changeset
|
1551 |
void vpermq(XMMRegister dst, XMMRegister src, int imm8); |
38135
e06e2d071465
8154495: SHA256 AVX2 intrinsic (when no supports_sha() available)
jcivlin
parents:
38049
diff
changeset
|
1552 |
void vperm2i128(XMMRegister dst, XMMRegister nds, XMMRegister src, int imm8); |
42039 | 1553 |
void vperm2f128(XMMRegister dst, XMMRegister nds, XMMRegister src, int imm8); |
11427 | 1554 |
|
23491 | 1555 |
void pause(); |
1556 |
||
2348 | 1557 |
// SSE4.2 string instructions |
1558 |
void pcmpestri(XMMRegister xmm1, XMMRegister xmm2, int imm8); |
|
1559 |
void pcmpestri(XMMRegister xmm1, Address src, int imm8); |
|
1560 |
||
34203 | 1561 |
void pcmpeqb(XMMRegister dst, XMMRegister src); |
1562 |
void vpcmpeqb(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1563 |
void evpcmpeqb(KRegister kdst, XMMRegister nds, XMMRegister src, int vector_len); |
|
35113 | 1564 |
void evpcmpeqb(KRegister kdst, XMMRegister nds, Address src, int vector_len); |
38239
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1565 |
void evpcmpeqb(KRegister kdst, KRegister mask, XMMRegister nds, Address src, int vector_len); |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1566 |
|
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1567 |
void evpcmpgtb(KRegister kdst, XMMRegister nds, Address src, int vector_len); |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1568 |
void evpcmpgtb(KRegister kdst, KRegister mask, XMMRegister nds, Address src, int vector_len); |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1569 |
|
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1570 |
void evpcmpuw(KRegister kdst, XMMRegister nds, XMMRegister src, ComparisonPredicate vcc, int vector_len); |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1571 |
void evpcmpuw(KRegister kdst, KRegister mask, XMMRegister nds, XMMRegister src, ComparisonPredicate of, int vector_len); |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1572 |
void evpcmpuw(KRegister kdst, XMMRegister nds, Address src, ComparisonPredicate vcc, int vector_len); |
34203 | 1573 |
|
33628 | 1574 |
void pcmpeqw(XMMRegister dst, XMMRegister src); |
1575 |
void vpcmpeqw(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
34203 | 1576 |
void evpcmpeqw(KRegister kdst, XMMRegister nds, XMMRegister src, int vector_len); |
35113 | 1577 |
void evpcmpeqw(KRegister kdst, XMMRegister nds, Address src, int vector_len); |
34203 | 1578 |
|
1579 |
void pcmpeqd(XMMRegister dst, XMMRegister src); |
|
1580 |
void vpcmpeqd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1581 |
void evpcmpeqd(KRegister kdst, XMMRegister nds, XMMRegister src, int vector_len); |
|
35113 | 1582 |
void evpcmpeqd(KRegister kdst, XMMRegister nds, Address src, int vector_len); |
34203 | 1583 |
|
1584 |
void pcmpeqq(XMMRegister dst, XMMRegister src); |
|
1585 |
void vpcmpeqq(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1586 |
void evpcmpeqq(KRegister kdst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1587 |
void evpcmpeqq(KRegister kdst, XMMRegister nds, Address src, int vector_len); |
|
33628 | 1588 |
|
1589 |
void pmovmskb(Register dst, XMMRegister src); |
|
1590 |
void vpmovmskb(Register dst, XMMRegister src); |
|
1591 |
||
18507
61bfc8995bb3
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
15436
diff
changeset
|
1592 |
// SSE 4.1 extract |
61bfc8995bb3
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
15436
diff
changeset
|
1593 |
void pextrd(Register dst, XMMRegister src, int imm8); |
61bfc8995bb3
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
15436
diff
changeset
|
1594 |
void pextrq(Register dst, XMMRegister src, int imm8); |
35154 | 1595 |
void pextrd(Address dst, XMMRegister src, int imm8); |
1596 |
void pextrq(Address dst, XMMRegister src, int imm8); |
|
1597 |
void pextrb(Address dst, XMMRegister src, int imm8); |
|
33089 | 1598 |
// SSE 2 extract |
1599 |
void pextrw(Register dst, XMMRegister src, int imm8); |
|
35154 | 1600 |
void pextrw(Address dst, XMMRegister src, int imm8); |
18507
61bfc8995bb3
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
15436
diff
changeset
|
1601 |
|
61bfc8995bb3
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
15436
diff
changeset
|
1602 |
// SSE 4.1 insert |
61bfc8995bb3
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
15436
diff
changeset
|
1603 |
void pinsrd(XMMRegister dst, Register src, int imm8); |
61bfc8995bb3
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
15436
diff
changeset
|
1604 |
void pinsrq(XMMRegister dst, Register src, int imm8); |
35154 | 1605 |
void pinsrd(XMMRegister dst, Address src, int imm8); |
1606 |
void pinsrq(XMMRegister dst, Address src, int imm8); |
|
1607 |
void pinsrb(XMMRegister dst, Address src, int imm8); |
|
33089 | 1608 |
// SSE 2 insert |
1609 |
void pinsrw(XMMRegister dst, Register src, int imm8); |
|
35154 | 1610 |
void pinsrw(XMMRegister dst, Address src, int imm8); |
18507
61bfc8995bb3
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
15436
diff
changeset
|
1611 |
|
11427 | 1612 |
// SSE4.1 packed move |
1613 |
void pmovzxbw(XMMRegister dst, XMMRegister src); |
|
1614 |
void pmovzxbw(XMMRegister dst, Address src); |
|
1615 |
||
38239
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1616 |
void vpmovzxbw( XMMRegister dst, Address src, int vector_len); |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1617 |
void evpmovzxbw(XMMRegister dst, KRegister mask, Address src, int vector_len); |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1618 |
|
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1619 |
void evpmovwb(Address dst, XMMRegister src, int vector_len); |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1620 |
void evpmovwb(Address dst, KRegister mask, XMMRegister src, int vector_len); |
33628 | 1621 |
|
4430 | 1622 |
#ifndef _LP64 // no 32bit push/pop on amd64 |
1066 | 1623 |
void popl(Address dst); |
4430 | 1624 |
#endif |
1066 | 1625 |
|
1626 |
#ifdef _LP64 |
|
1627 |
void popq(Address dst); |
|
1628 |
#endif |
|
1629 |
||
2255
54abdf3e1055
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
2254
diff
changeset
|
1630 |
void popcntl(Register dst, Address src); |
54abdf3e1055
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
2254
diff
changeset
|
1631 |
void popcntl(Register dst, Register src); |
54abdf3e1055
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
2254
diff
changeset
|
1632 |
|
54abdf3e1055
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
2254
diff
changeset
|
1633 |
#ifdef _LP64 |
54abdf3e1055
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
2254
diff
changeset
|
1634 |
void popcntq(Register dst, Address src); |
54abdf3e1055
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
2254
diff
changeset
|
1635 |
void popcntq(Register dst, Register src); |
54abdf3e1055
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
2254
diff
changeset
|
1636 |
#endif |
54abdf3e1055
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
2254
diff
changeset
|
1637 |
|
1066 | 1638 |
// Prefetches (SSE, SSE2, 3DNOW only) |
1639 |
||
1640 |
void prefetchnta(Address src); |
|
1641 |
void prefetchr(Address src); |
|
1642 |
void prefetcht0(Address src); |
|
1643 |
void prefetcht1(Address src); |
|
1644 |
void prefetcht2(Address src); |
|
1645 |
void prefetchw(Address src); |
|
1646 |
||
14132 | 1647 |
// Shuffle Bytes |
1648 |
void pshufb(XMMRegister dst, XMMRegister src); |
|
1649 |
void pshufb(XMMRegister dst, Address src); |
|
38135
e06e2d071465
8154495: SHA256 AVX2 intrinsic (when no supports_sha() available)
jcivlin
parents:
38049
diff
changeset
|
1650 |
void vpshufb(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
14132 | 1651 |
|
1066 | 1652 |
// Shuffle Packed Doublewords |
1653 |
void pshufd(XMMRegister dst, XMMRegister src, int mode); |
|
1654 |
void pshufd(XMMRegister dst, Address src, int mode); |
|
38135
e06e2d071465
8154495: SHA256 AVX2 intrinsic (when no supports_sha() available)
jcivlin
parents:
38049
diff
changeset
|
1655 |
void vpshufd(XMMRegister dst, XMMRegister src, int mode, int vector_len); |
1066 | 1656 |
|
1657 |
// Shuffle Packed Low Words |
|
1658 |
void pshuflw(XMMRegister dst, XMMRegister src, int mode); |
|
1659 |
void pshuflw(XMMRegister dst, Address src, int mode); |
|
1660 |
||
8494
4258c78226d9
6942326: x86 code in string_indexof() could read beyond reserved heap space
kvn
parents:
8332
diff
changeset
|
1661 |
// Shift Right by bytes Logical DoubleQuadword Immediate |
4258c78226d9
6942326: x86 code in string_indexof() could read beyond reserved heap space
kvn
parents:
8332
diff
changeset
|
1662 |
void psrldq(XMMRegister dst, int shift); |
31404
63e8fcd70bfc
8073108: Use x86 and SPARC CPU instructions for GHASH acceleration
ascarpino
parents:
31129
diff
changeset
|
1663 |
// Shift Left by bytes Logical DoubleQuadword Immediate |
63e8fcd70bfc
8073108: Use x86 and SPARC CPU instructions for GHASH acceleration
ascarpino
parents:
31129
diff
changeset
|
1664 |
void pslldq(XMMRegister dst, int shift); |
8494
4258c78226d9
6942326: x86 code in string_indexof() could read beyond reserved heap space
kvn
parents:
8332
diff
changeset
|
1665 |
|
15117
625397df6f4f
8005419: Improve intrinsics code performance on x86 by using AVX2
kvn
parents:
15115
diff
changeset
|
1666 |
// Logical Compare 128bit |
2348 | 1667 |
void ptest(XMMRegister dst, XMMRegister src); |
1668 |
void ptest(XMMRegister dst, Address src); |
|
15117
625397df6f4f
8005419: Improve intrinsics code performance on x86 by using AVX2
kvn
parents:
15115
diff
changeset
|
1669 |
// Logical Compare 256bit |
625397df6f4f
8005419: Improve intrinsics code performance on x86 by using AVX2
kvn
parents:
15115
diff
changeset
|
1670 |
void vptest(XMMRegister dst, XMMRegister src); |
625397df6f4f
8005419: Improve intrinsics code performance on x86 by using AVX2
kvn
parents:
15115
diff
changeset
|
1671 |
void vptest(XMMRegister dst, Address src); |
2348 | 1672 |
|
1066 | 1673 |
// Interleave Low Bytes |
1674 |
void punpcklbw(XMMRegister dst, XMMRegister src); |
|
11427 | 1675 |
void punpcklbw(XMMRegister dst, Address src); |
1676 |
||
1677 |
// Interleave Low Doublewords |
|
1678 |
void punpckldq(XMMRegister dst, XMMRegister src); |
|
1679 |
void punpckldq(XMMRegister dst, Address src); |
|
1066 | 1680 |
|
13294 | 1681 |
// Interleave Low Quadwords |
1682 |
void punpcklqdq(XMMRegister dst, XMMRegister src); |
|
1683 |
||
4430 | 1684 |
#ifndef _LP64 // no 32bit push/pop on amd64 |
1066 | 1685 |
void pushl(Address src); |
4430 | 1686 |
#endif |
1066 | 1687 |
|
1688 |
void pushq(Address src); |
|
1689 |
||
1690 |
void rcll(Register dst, int imm8); |
|
1691 |
||
1692 |
void rclq(Register dst, int imm8); |
|
1693 |
||
31129
02ee7609f0e1
8081778: Use Intel x64 CPU instructions for RSA acceleration
kvn
parents:
30624
diff
changeset
|
1694 |
void rcrq(Register dst, int imm8); |
02ee7609f0e1
8081778: Use Intel x64 CPU instructions for RSA acceleration
kvn
parents:
30624
diff
changeset
|
1695 |
|
33465 | 1696 |
void rcpps(XMMRegister dst, XMMRegister src); |
1697 |
||
1698 |
void rcpss(XMMRegister dst, XMMRegister src); |
|
1699 |
||
23491 | 1700 |
void rdtsc(); |
1701 |
||
1066 | 1702 |
void ret(int imm16); |
1 | 1703 |
|
26434
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
1704 |
#ifdef _LP64 |
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
1705 |
void rorq(Register dst, int imm8); |
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
1706 |
void rorxq(Register dst, Register src, int imm8); |
38135
e06e2d071465
8154495: SHA256 AVX2 intrinsic (when no supports_sha() available)
jcivlin
parents:
38049
diff
changeset
|
1707 |
void rorxd(Register dst, Register src, int imm8); |
26434
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
1708 |
#endif |
09ad55e5f486
8055494: Add C2 x86 intrinsic for BigInteger::multiplyToLen() method
kvn
parents:
25932
diff
changeset
|
1709 |
|
1 | 1710 |
void sahf(); |
1711 |
||
1066 | 1712 |
void sarl(Register dst, int imm8); |
1713 |
void sarl(Register dst); |
|
1714 |
||
1715 |
void sarq(Register dst, int imm8); |
|
1716 |
void sarq(Register dst); |
|
1717 |
||
1718 |
void sbbl(Address dst, int32_t imm32); |
|
1719 |
void sbbl(Register dst, int32_t imm32); |
|
1720 |
void sbbl(Register dst, Address src); |
|
1721 |
void sbbl(Register dst, Register src); |
|
1722 |
||
1723 |
void sbbq(Address dst, int32_t imm32); |
|
1724 |
void sbbq(Register dst, int32_t imm32); |
|
1725 |
void sbbq(Register dst, Address src); |
|
1726 |
void sbbq(Register dst, Register src); |
|
1727 |
||
1728 |
void setb(Condition cc, Register dst); |
|
1729 |
||
36555 | 1730 |
void palignr(XMMRegister dst, XMMRegister src, int imm8); |
38135
e06e2d071465
8154495: SHA256 AVX2 intrinsic (when no supports_sha() available)
jcivlin
parents:
38049
diff
changeset
|
1731 |
void vpalignr(XMMRegister dst, XMMRegister src1, XMMRegister src2, int imm8, int vector_len); |
e06e2d071465
8154495: SHA256 AVX2 intrinsic (when no supports_sha() available)
jcivlin
parents:
38049
diff
changeset
|
1732 |
|
36555 | 1733 |
void pblendw(XMMRegister dst, XMMRegister src, int imm8); |
1734 |
||
1735 |
void sha1rnds4(XMMRegister dst, XMMRegister src, int imm8); |
|
1736 |
void sha1nexte(XMMRegister dst, XMMRegister src); |
|
1737 |
void sha1msg1(XMMRegister dst, XMMRegister src); |
|
1738 |
void sha1msg2(XMMRegister dst, XMMRegister src); |
|
1739 |
// xmm0 is implicit additional source to the following instruction. |
|
1740 |
void sha256rnds2(XMMRegister dst, XMMRegister src); |
|
1741 |
void sha256msg1(XMMRegister dst, XMMRegister src); |
|
1742 |
void sha256msg2(XMMRegister dst, XMMRegister src); |
|
1743 |
||
1066 | 1744 |
void shldl(Register dst, Register src); |
33066 | 1745 |
void shldl(Register dst, Register src, int8_t imm8); |
1066 | 1746 |
|
1747 |
void shll(Register dst, int imm8); |
|
1748 |
void shll(Register dst); |
|
1749 |
||
1750 |
void shlq(Register dst, int imm8); |
|
1751 |
void shlq(Register dst); |
|
1752 |
||
1753 |
void shrdl(Register dst, Register src); |
|
1754 |
||
1755 |
void shrl(Register dst, int imm8); |
|
1756 |
void shrl(Register dst); |
|
1757 |
||
1758 |
void shrq(Register dst, int imm8); |
|
1759 |
void shrq(Register dst); |
|
1760 |
||
1761 |
void smovl(); // QQQ generic? |
|
1762 |
||
1763 |
// Compute Square Root of Scalar Double-Precision Floating-Point Value |
|
1764 |
void sqrtsd(XMMRegister dst, Address src); |
|
1765 |
void sqrtsd(XMMRegister dst, XMMRegister src); |
|
1766 |
||
7433 | 1767 |
// Compute Square Root of Scalar Single-Precision Floating-Point Value |
1768 |
void sqrtss(XMMRegister dst, Address src); |
|
1769 |
void sqrtss(XMMRegister dst, XMMRegister src); |
|
1770 |
||
14626
0cf4eccf130f
8003240: x86: move MacroAssembler into separate file
twisti
parents:
14625
diff
changeset
|
1771 |
void std(); |
1066 | 1772 |
|
1773 |
void stmxcsr( Address dst ); |
|
1774 |
||
1775 |
void subl(Address dst, int32_t imm32); |
|
1776 |
void subl(Address dst, Register src); |
|
1777 |
void subl(Register dst, int32_t imm32); |
|
1778 |
void subl(Register dst, Address src); |
|
1779 |
void subl(Register dst, Register src); |
|
1780 |
||
1781 |
void subq(Address dst, int32_t imm32); |
|
1782 |
void subq(Address dst, Register src); |
|
1783 |
void subq(Register dst, int32_t imm32); |
|
1784 |
void subq(Register dst, Address src); |
|
1785 |
void subq(Register dst, Register src); |
|
1786 |
||
11791
3be8cae67887
7125136: SIGILL on linux amd64 in gc/ArrayJuggle/Juggle29
kvn
parents:
11429
diff
changeset
|
1787 |
// Force generation of a 4 byte immediate value even if it fits into 8bit |
3be8cae67887
7125136: SIGILL on linux amd64 in gc/ArrayJuggle/Juggle29
kvn
parents:
11429
diff
changeset
|
1788 |
void subl_imm32(Register dst, int32_t imm32); |
3be8cae67887
7125136: SIGILL on linux amd64 in gc/ArrayJuggle/Juggle29
kvn
parents:
11429
diff
changeset
|
1789 |
void subq_imm32(Register dst, int32_t imm32); |
1066 | 1790 |
|
1791 |
// Subtract Scalar Double-Precision Floating-Point Values |
|
1792 |
void subsd(XMMRegister dst, Address src); |
|
1 | 1793 |
void subsd(XMMRegister dst, XMMRegister src); |
1794 |
||
1066 | 1795 |
// Subtract Scalar Single-Precision Floating-Point Values |
1796 |
void subss(XMMRegister dst, Address src); |
|
1797 |
void subss(XMMRegister dst, XMMRegister src); |
|
1798 |
||
1799 |
void testb(Register dst, int imm8); |
|
35540
e001ad24dcdb
8143353: update for x86 sin and cos in the math lib
vdeshpande
parents:
35154
diff
changeset
|
1800 |
void testb(Address dst, int imm8); |
1066 | 1801 |
|
1802 |
void testl(Register dst, int32_t imm32); |
|
1803 |
void testl(Register dst, Register src); |
|
1804 |
void testl(Register dst, Address src); |
|
1805 |
||
1806 |
void testq(Register dst, int32_t imm32); |
|
1807 |
void testq(Register dst, Register src); |
|
1808 |
||
23220
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
1809 |
// BMI - count trailing zeros |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
1810 |
void tzcntl(Register dst, Register src); |
fc827339dc37
8031321: Support Intel bit manipulation instructions
iveresov
parents:
21105
diff
changeset
|
1811 |
void tzcntq(Register dst, Register src); |
1066 | 1812 |
|
1813 |
// Unordered Compare Scalar Double-Precision Floating-Point Values and set EFLAGS |
|
1814 |
void ucomisd(XMMRegister dst, Address src); |
|
1 | 1815 |
void ucomisd(XMMRegister dst, XMMRegister src); |
1816 |
||
1066 | 1817 |
// Unordered Compare Scalar Single-Precision Floating-Point Values and set EFLAGS |
1818 |
void ucomiss(XMMRegister dst, Address src); |
|
1819 |
void ucomiss(XMMRegister dst, XMMRegister src); |
|
1820 |
||
23491 | 1821 |
void xabort(int8_t imm8); |
1822 |
||
39419
cc993a4ab581
8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents:
38239
diff
changeset
|
1823 |
void xaddb(Address dst, Register src); |
cc993a4ab581
8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents:
38239
diff
changeset
|
1824 |
void xaddw(Address dst, Register src); |
1066 | 1825 |
void xaddl(Address dst, Register src); |
1826 |
void xaddq(Address dst, Register src); |
|
1827 |
||
23491 | 1828 |
void xbegin(Label& abort, relocInfo::relocType rtype = relocInfo::none); |
1829 |
||
39419
cc993a4ab581
8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents:
38239
diff
changeset
|
1830 |
void xchgb(Register reg, Address adr); |
cc993a4ab581
8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents:
38239
diff
changeset
|
1831 |
void xchgw(Register reg, Address adr); |
1066 | 1832 |
void xchgl(Register reg, Address adr); |
1833 |
void xchgl(Register dst, Register src); |
|
1834 |
||
1835 |
void xchgq(Register reg, Address adr); |
|
1836 |
void xchgq(Register dst, Register src); |
|
1837 |
||
23491 | 1838 |
void xend(); |
1839 |
||
11427 | 1840 |
// Get Value of Extended Control Register |
14626
0cf4eccf130f
8003240: x86: move MacroAssembler into separate file
twisti
parents:
14625
diff
changeset
|
1841 |
void xgetbv(); |
11427 | 1842 |
|
1066 | 1843 |
void xorl(Register dst, int32_t imm32); |
1844 |
void xorl(Register dst, Address src); |
|
1845 |
void xorl(Register dst, Register src); |
|
1846 |
||
35154 | 1847 |
void xorb(Register dst, Address src); |
1848 |
||
1066 | 1849 |
void xorq(Register dst, Address src); |
1850 |
void xorq(Register dst, Register src); |
|
1851 |
||
1852 |
void set_byte_if_not_zero(Register dst); // sets reg to 1 if not zero, otherwise 0 |
|
11427 | 1853 |
|
13294 | 1854 |
// AVX 3-operands scalar instructions (encoded with VEX prefix) |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1855 |
|
11429
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
1856 |
void vaddsd(XMMRegister dst, XMMRegister nds, Address src); |
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
1857 |
void vaddsd(XMMRegister dst, XMMRegister nds, XMMRegister src); |
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
1858 |
void vaddss(XMMRegister dst, XMMRegister nds, Address src); |
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
1859 |
void vaddss(XMMRegister dst, XMMRegister nds, XMMRegister src); |
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
1860 |
void vdivsd(XMMRegister dst, XMMRegister nds, Address src); |
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
1861 |
void vdivsd(XMMRegister dst, XMMRegister nds, XMMRegister src); |
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
1862 |
void vdivss(XMMRegister dst, XMMRegister nds, Address src); |
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
1863 |
void vdivss(XMMRegister dst, XMMRegister nds, XMMRegister src); |
41323 | 1864 |
void vfmadd231sd(XMMRegister dst, XMMRegister nds, XMMRegister src); |
1865 |
void vfmadd231ss(XMMRegister dst, XMMRegister nds, XMMRegister src); |
|
11429
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
1866 |
void vmulsd(XMMRegister dst, XMMRegister nds, Address src); |
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
1867 |
void vmulsd(XMMRegister dst, XMMRegister nds, XMMRegister src); |
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
1868 |
void vmulss(XMMRegister dst, XMMRegister nds, Address src); |
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
1869 |
void vmulss(XMMRegister dst, XMMRegister nds, XMMRegister src); |
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
1870 |
void vsubsd(XMMRegister dst, XMMRegister nds, Address src); |
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
1871 |
void vsubsd(XMMRegister dst, XMMRegister nds, XMMRegister src); |
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
1872 |
void vsubss(XMMRegister dst, XMMRegister nds, Address src); |
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
1873 |
void vsubss(XMMRegister dst, XMMRegister nds, XMMRegister src); |
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
1874 |
|
38239
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1875 |
void shlxl(Register dst, Register src1, Register src2); |
4d8b8ba74fea
8154974: AVX-512 equipped inflate, has_negatives & compress intrinsics
kvn
parents:
38138
diff
changeset
|
1876 |
void shlxq(Register dst, Register src1, Register src2); |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1877 |
|
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1878 |
//====================VECTOR ARITHMETIC===================================== |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1879 |
|
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1880 |
// Add Packed Floating-Point Values |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1881 |
void addpd(XMMRegister dst, XMMRegister src); |
35146 | 1882 |
void addpd(XMMRegister dst, Address src); |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1883 |
void addps(XMMRegister dst, XMMRegister src); |
30624 | 1884 |
void vaddpd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
1885 |
void vaddps(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1886 |
void vaddpd(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
1887 |
void vaddps(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1888 |
|
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1889 |
// Subtract Packed Floating-Point Values |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1890 |
void subpd(XMMRegister dst, XMMRegister src); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1891 |
void subps(XMMRegister dst, XMMRegister src); |
30624 | 1892 |
void vsubpd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
1893 |
void vsubps(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1894 |
void vsubpd(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
1895 |
void vsubps(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1896 |
|
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1897 |
// Multiply Packed Floating-Point Values |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1898 |
void mulpd(XMMRegister dst, XMMRegister src); |
33089 | 1899 |
void mulpd(XMMRegister dst, Address src); |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1900 |
void mulps(XMMRegister dst, XMMRegister src); |
30624 | 1901 |
void vmulpd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
1902 |
void vmulps(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1903 |
void vmulpd(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
1904 |
void vmulps(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1905 |
|
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1906 |
// Divide Packed Floating-Point Values |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1907 |
void divpd(XMMRegister dst, XMMRegister src); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1908 |
void divps(XMMRegister dst, XMMRegister src); |
30624 | 1909 |
void vdivpd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
1910 |
void vdivps(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1911 |
void vdivpd(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
1912 |
void vdivps(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1913 |
|
32723
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31410
diff
changeset
|
1914 |
// Sqrt Packed Floating-Point Values - Double precision only |
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31410
diff
changeset
|
1915 |
void vsqrtpd(XMMRegister dst, XMMRegister src, int vector_len); |
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31410
diff
changeset
|
1916 |
void vsqrtpd(XMMRegister dst, Address src, int vector_len); |
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31410
diff
changeset
|
1917 |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1918 |
// Bitwise Logical AND of Packed Floating-Point Values |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1919 |
void andpd(XMMRegister dst, XMMRegister src); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1920 |
void andps(XMMRegister dst, XMMRegister src); |
30624 | 1921 |
void vandpd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
1922 |
void vandps(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1923 |
void vandpd(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
1924 |
void vandps(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1925 |
|
33089 | 1926 |
void unpckhpd(XMMRegister dst, XMMRegister src); |
1927 |
void unpcklpd(XMMRegister dst, XMMRegister src); |
|
1928 |
||
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1929 |
// Bitwise Logical XOR of Packed Floating-Point Values |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1930 |
void xorpd(XMMRegister dst, XMMRegister src); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1931 |
void xorps(XMMRegister dst, XMMRegister src); |
30624 | 1932 |
void vxorpd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
1933 |
void vxorps(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1934 |
void vxorpd(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
1935 |
void vxorps(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1936 |
|
30211 | 1937 |
// Add horizontal packed integers |
30624 | 1938 |
void vphaddw(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
1939 |
void vphaddd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
30211 | 1940 |
void phaddw(XMMRegister dst, XMMRegister src); |
1941 |
void phaddd(XMMRegister dst, XMMRegister src); |
|
1942 |
||
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1943 |
// Add packed integers |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1944 |
void paddb(XMMRegister dst, XMMRegister src); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1945 |
void paddw(XMMRegister dst, XMMRegister src); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1946 |
void paddd(XMMRegister dst, XMMRegister src); |
36555 | 1947 |
void paddd(XMMRegister dst, Address src); |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1948 |
void paddq(XMMRegister dst, XMMRegister src); |
30624 | 1949 |
void vpaddb(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
1950 |
void vpaddw(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1951 |
void vpaddd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1952 |
void vpaddq(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1953 |
void vpaddb(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
1954 |
void vpaddw(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
1955 |
void vpaddd(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
1956 |
void vpaddq(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1957 |
|
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1958 |
// Sub packed integers |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1959 |
void psubb(XMMRegister dst, XMMRegister src); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1960 |
void psubw(XMMRegister dst, XMMRegister src); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1961 |
void psubd(XMMRegister dst, XMMRegister src); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1962 |
void psubq(XMMRegister dst, XMMRegister src); |
30624 | 1963 |
void vpsubb(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
1964 |
void vpsubw(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1965 |
void vpsubd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1966 |
void vpsubq(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1967 |
void vpsubb(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
1968 |
void vpsubw(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
1969 |
void vpsubd(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
1970 |
void vpsubq(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1971 |
|
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1972 |
// Multiply packed integers (only shorts and ints) |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1973 |
void pmullw(XMMRegister dst, XMMRegister src); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1974 |
void pmulld(XMMRegister dst, XMMRegister src); |
30624 | 1975 |
void vpmullw(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
1976 |
void vpmulld(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1977 |
void vpmullq(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
|
1978 |
void vpmullw(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
1979 |
void vpmulld(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
1980 |
void vpmullq(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1981 |
|
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1982 |
// Shift left packed integers |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1983 |
void psllw(XMMRegister dst, int shift); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1984 |
void pslld(XMMRegister dst, int shift); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1985 |
void psllq(XMMRegister dst, int shift); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1986 |
void psllw(XMMRegister dst, XMMRegister shift); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1987 |
void pslld(XMMRegister dst, XMMRegister shift); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1988 |
void psllq(XMMRegister dst, XMMRegister shift); |
30624 | 1989 |
void vpsllw(XMMRegister dst, XMMRegister src, int shift, int vector_len); |
1990 |
void vpslld(XMMRegister dst, XMMRegister src, int shift, int vector_len); |
|
1991 |
void vpsllq(XMMRegister dst, XMMRegister src, int shift, int vector_len); |
|
1992 |
void vpsllw(XMMRegister dst, XMMRegister src, XMMRegister shift, int vector_len); |
|
1993 |
void vpslld(XMMRegister dst, XMMRegister src, XMMRegister shift, int vector_len); |
|
1994 |
void vpsllq(XMMRegister dst, XMMRegister src, XMMRegister shift, int vector_len); |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1995 |
|
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1996 |
// Logical shift right packed integers |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1997 |
void psrlw(XMMRegister dst, int shift); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1998 |
void psrld(XMMRegister dst, int shift); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
1999 |
void psrlq(XMMRegister dst, int shift); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2000 |
void psrlw(XMMRegister dst, XMMRegister shift); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2001 |
void psrld(XMMRegister dst, XMMRegister shift); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2002 |
void psrlq(XMMRegister dst, XMMRegister shift); |
30624 | 2003 |
void vpsrlw(XMMRegister dst, XMMRegister src, int shift, int vector_len); |
2004 |
void vpsrld(XMMRegister dst, XMMRegister src, int shift, int vector_len); |
|
2005 |
void vpsrlq(XMMRegister dst, XMMRegister src, int shift, int vector_len); |
|
2006 |
void vpsrlw(XMMRegister dst, XMMRegister src, XMMRegister shift, int vector_len); |
|
2007 |
void vpsrld(XMMRegister dst, XMMRegister src, XMMRegister shift, int vector_len); |
|
2008 |
void vpsrlq(XMMRegister dst, XMMRegister src, XMMRegister shift, int vector_len); |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2009 |
|
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2010 |
// Arithmetic shift right packed integers (only shorts and ints, no instructions for longs) |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2011 |
void psraw(XMMRegister dst, int shift); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2012 |
void psrad(XMMRegister dst, int shift); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2013 |
void psraw(XMMRegister dst, XMMRegister shift); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2014 |
void psrad(XMMRegister dst, XMMRegister shift); |
30624 | 2015 |
void vpsraw(XMMRegister dst, XMMRegister src, int shift, int vector_len); |
2016 |
void vpsrad(XMMRegister dst, XMMRegister src, int shift, int vector_len); |
|
2017 |
void vpsraw(XMMRegister dst, XMMRegister src, XMMRegister shift, int vector_len); |
|
2018 |
void vpsrad(XMMRegister dst, XMMRegister src, XMMRegister shift, int vector_len); |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2019 |
|
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2020 |
// And packed integers |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2021 |
void pand(XMMRegister dst, XMMRegister src); |
30624 | 2022 |
void vpand(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
2023 |
void vpand(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2024 |
|
33089 | 2025 |
// Andn packed integers |
2026 |
void pandn(XMMRegister dst, XMMRegister src); |
|
2027 |
||
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2028 |
// Or packed integers |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2029 |
void por(XMMRegister dst, XMMRegister src); |
30624 | 2030 |
void vpor(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
2031 |
void vpor(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2032 |
|
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2033 |
// Xor packed integers |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2034 |
void pxor(XMMRegister dst, XMMRegister src); |
30624 | 2035 |
void vpxor(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len); |
2036 |
void vpxor(XMMRegister dst, XMMRegister nds, Address src, int vector_len); |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13391
diff
changeset
|
2037 |
|
37293
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2038 |
// vinserti forms |
36561
b18243f4d955
8151002: Make Assembler methods vextract and vinsert match actual instructions
mikael
parents:
36555
diff
changeset
|
2039 |
void vinserti128(XMMRegister dst, XMMRegister nds, XMMRegister src, uint8_t imm8); |
b18243f4d955
8151002: Make Assembler methods vextract and vinsert match actual instructions
mikael
parents:
36555
diff
changeset
|
2040 |
void vinserti128(XMMRegister dst, XMMRegister nds, Address src, uint8_t imm8); |
37293
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2041 |
void vinserti32x4(XMMRegister dst, XMMRegister nds, XMMRegister src, uint8_t imm8); |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2042 |
void vinserti32x4(XMMRegister dst, XMMRegister nds, Address src, uint8_t imm8); |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2043 |
void vinserti64x4(XMMRegister dst, XMMRegister nds, XMMRegister src, uint8_t imm8); |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2044 |
|
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2045 |
// vinsertf forms |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2046 |
void vinsertf128(XMMRegister dst, XMMRegister nds, XMMRegister src, uint8_t imm8); |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2047 |
void vinsertf128(XMMRegister dst, XMMRegister nds, Address src, uint8_t imm8); |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2048 |
void vinsertf32x4(XMMRegister dst, XMMRegister nds, XMMRegister src, uint8_t imm8); |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2049 |
void vinsertf32x4(XMMRegister dst, XMMRegister nds, Address src, uint8_t imm8); |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2050 |
void vinsertf64x4(XMMRegister dst, XMMRegister nds, XMMRegister src, uint8_t imm8); |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2051 |
void vinsertf64x4(XMMRegister dst, XMMRegister nds, Address src, uint8_t imm8); |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2052 |
|
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2053 |
// vextracti forms |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2054 |
void vextracti128(XMMRegister dst, XMMRegister src, uint8_t imm8); |
36561
b18243f4d955
8151002: Make Assembler methods vextract and vinsert match actual instructions
mikael
parents:
36555
diff
changeset
|
2055 |
void vextracti128(Address dst, XMMRegister src, uint8_t imm8); |
37293
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2056 |
void vextracti32x4(XMMRegister dst, XMMRegister src, uint8_t imm8); |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2057 |
void vextracti32x4(Address dst, XMMRegister src, uint8_t imm8); |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2058 |
void vextracti64x2(XMMRegister dst, XMMRegister src, uint8_t imm8); |
36561
b18243f4d955
8151002: Make Assembler methods vextract and vinsert match actual instructions
mikael
parents:
36555
diff
changeset
|
2059 |
void vextracti64x4(XMMRegister dst, XMMRegister src, uint8_t imm8); |
37293
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2060 |
|
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2061 |
// vextractf forms |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2062 |
void vextractf128(XMMRegister dst, XMMRegister src, uint8_t imm8); |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2063 |
void vextractf128(Address dst, XMMRegister src, uint8_t imm8); |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2064 |
void vextractf32x4(XMMRegister dst, XMMRegister src, uint8_t imm8); |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2065 |
void vextractf32x4(Address dst, XMMRegister src, uint8_t imm8); |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2066 |
void vextractf64x2(XMMRegister dst, XMMRegister src, uint8_t imm8); |
36561
b18243f4d955
8151002: Make Assembler methods vextract and vinsert match actual instructions
mikael
parents:
36555
diff
changeset
|
2067 |
void vextractf64x4(XMMRegister dst, XMMRegister src, uint8_t imm8); |
b18243f4d955
8151002: Make Assembler methods vextract and vinsert match actual instructions
mikael
parents:
36555
diff
changeset
|
2068 |
void vextractf64x4(Address dst, XMMRegister src, uint8_t imm8); |
37293
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2069 |
|
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2070 |
// legacy xmm sourced word/dword replicate |
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2071 |
void vpbroadcastw(XMMRegister dst, XMMRegister src); |
15115
f8ef87f6f07f
8005544: Use 256bit YMM registers in arraycopy stubs on x86
kvn
parents:
15114
diff
changeset
|
2072 |
void vpbroadcastd(XMMRegister dst, XMMRegister src); |
f8ef87f6f07f
8005544: Use 256bit YMM registers in arraycopy stubs on x86
kvn
parents:
15114
diff
changeset
|
2073 |
|
37293
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2074 |
// xmm/mem sourced byte/word/dword/qword replicate |
31410 | 2075 |
void evpbroadcastb(XMMRegister dst, XMMRegister src, int vector_len); |
2076 |
void evpbroadcastb(XMMRegister dst, Address src, int vector_len); |
|
2077 |
void evpbroadcastw(XMMRegister dst, XMMRegister src, int vector_len); |
|
2078 |
void evpbroadcastw(XMMRegister dst, Address src, int vector_len); |
|
30624 | 2079 |
void evpbroadcastd(XMMRegister dst, XMMRegister src, int vector_len); |
31410 | 2080 |
void evpbroadcastd(XMMRegister dst, Address src, int vector_len); |
2081 |
void evpbroadcastq(XMMRegister dst, XMMRegister src, int vector_len); |
|
2082 |
void evpbroadcastq(XMMRegister dst, Address src, int vector_len); |
|
2083 |
||
37293
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2084 |
// scalar single/double precision replicate |
31410 | 2085 |
void evpbroadcastss(XMMRegister dst, XMMRegister src, int vector_len); |
2086 |
void evpbroadcastss(XMMRegister dst, Address src, int vector_len); |
|
2087 |
void evpbroadcastsd(XMMRegister dst, XMMRegister src, int vector_len); |
|
2088 |
void evpbroadcastsd(XMMRegister dst, Address src, int vector_len); |
|
2089 |
||
37293
c010188d360f
8151003: Remove nds->is_valid() checks from assembler_x86.cpp
mcberg
parents:
36837
diff
changeset
|
2090 |
// gpr sourced byte/word/dword/qword replicate |
31410 | 2091 |
void evpbroadcastb(XMMRegister dst, Register src, int vector_len); |
2092 |
void evpbroadcastw(XMMRegister dst, Register src, int vector_len); |
|
2093 |
void evpbroadcastd(XMMRegister dst, Register src, int vector_len); |
|
2094 |
void evpbroadcastq(XMMRegister dst, Register src, int vector_len); |
|
30624 | 2095 |
|
18507
61bfc8995bb3
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
15436
diff
changeset
|
2096 |
// Carry-Less Multiplication Quadword |
25932
15d133edd8f6
8052081: Optimize generated by C2 code for Intel's Atom processor
kvn
parents:
23491
diff
changeset
|
2097 |
void pclmulqdq(XMMRegister dst, XMMRegister src, int mask); |
18507
61bfc8995bb3
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
15436
diff
changeset
|
2098 |
void vpclmulqdq(XMMRegister dst, XMMRegister nds, XMMRegister src, int mask); |
61bfc8995bb3
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
drchase
parents:
15436
diff
changeset
|
2099 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
12955
diff
changeset
|
2100 |
// AVX instruction which is used to clear upper 128 bits of YMM registers and |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
12955
diff
changeset
|
2101 |
// to avoid transaction penalty between AVX and SSE states. There is no |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
12955
diff
changeset
|
2102 |
// penalty if legacy SSE instructions are encoded using VEX prefix because |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
12955
diff
changeset
|
2103 |
// they always clear upper 128 bits. It should be used before calling |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
12955
diff
changeset
|
2104 |
// runtime code and native libraries. |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
12955
diff
changeset
|
2105 |
void vzeroupper(); |
11429
e894217a5d94
7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
11427
diff
changeset
|
2106 |
|
33469
30f4811eded0
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents:
33465
diff
changeset
|
2107 |
// AVX support for vectorized conditional move (double). The following two instructions used only coupled. |
30f4811eded0
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents:
33465
diff
changeset
|
2108 |
void cmppd(XMMRegister dst, XMMRegister nds, XMMRegister src, int cop, int vector_len); |
42039 | 2109 |
void blendvpd(XMMRegister dst, XMMRegister nds, XMMRegister src1, XMMRegister src2, int vector_len); |
2110 |
void vpblendd(XMMRegister dst, XMMRegister nds, XMMRegister src, int imm8, int vector_len); |
|
33469
30f4811eded0
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents:
33465
diff
changeset
|
2111 |
|
11427 | 2112 |
protected: |
2113 |
// Next instructions require address alignment 16 bytes SSE mode. |
|
2114 |
// They should be called only from corresponding MacroAssembler instructions. |
|
2115 |
void andpd(XMMRegister dst, Address src); |
|
2116 |
void andps(XMMRegister dst, Address src); |
|
2117 |
void xorpd(XMMRegister dst, Address src); |
|
2118 |
void xorps(XMMRegister dst, Address src); |
|
2119 |
||
1 | 2120 |
}; |
2121 |
||
34162 | 2122 |
// The Intel x86/Amd64 Assembler attributes: All fields enclosed here are to guide encoding level decisions. |
2123 |
// Specific set functions are for specialized use, else defaults or whatever was supplied to object construction |
|
2124 |
// are applied. |
|
2125 |
class InstructionAttr { |
|
2126 |
public: |
|
2127 |
InstructionAttr( |
|
36066 | 2128 |
int vector_len, // The length of vector to be applied in encoding - for both AVX and EVEX |
2129 |
bool rex_vex_w, // Width of data: if 32-bits or less, false, else if 64-bit or specially defined, true |
|
2130 |
bool legacy_mode, // Details if either this instruction is conditionally encoded to AVX or earlier if true else possibly EVEX |
|
2131 |
bool no_reg_mask, // when true, k0 is used when EVEX encoding is chosen, else k1 is used under the same condition |
|
2132 |
bool uses_vl) // This instruction may have legacy constraints based on vector length for EVEX |
|
34162 | 2133 |
: |
2134 |
_avx_vector_len(vector_len), |
|
2135 |
_rex_vex_w(rex_vex_w), |
|
38049 | 2136 |
_rex_vex_w_reverted(false), |
34162 | 2137 |
_legacy_mode(legacy_mode), |
2138 |
_no_reg_mask(no_reg_mask), |
|
2139 |
_uses_vl(uses_vl), |
|
2140 |
_tuple_type(Assembler::EVEX_ETUP), |
|
2141 |
_input_size_in_bits(Assembler::EVEX_NObit), |
|
2142 |
_is_evex_instruction(false), |
|
2143 |
_evex_encoding(0), |
|
42014
cc32438a1003
8167987: change merge context to clear for mask register usage model
mcberg
parents:
41323
diff
changeset
|
2144 |
_is_clear_context(true), |
34162 | 2145 |
_is_extended_context(false), |
38138
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
2146 |
_current_assembler(NULL), |
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
2147 |
_embedded_opmask_register_specifier(1) { // hard code k1, it will be initialized for now |
34162 | 2148 |
if (UseAVX < 3) _legacy_mode = true; |
2149 |
} |
|
2150 |
||
2151 |
~InstructionAttr() { |
|
2152 |
if (_current_assembler != NULL) { |
|
2153 |
_current_assembler->clear_attributes(); |
|
2154 |
} |
|
2155 |
_current_assembler = NULL; |
|
2156 |
} |
|
2157 |
||
2158 |
private: |
|
2159 |
int _avx_vector_len; |
|
2160 |
bool _rex_vex_w; |
|
38049 | 2161 |
bool _rex_vex_w_reverted; |
34162 | 2162 |
bool _legacy_mode; |
2163 |
bool _no_reg_mask; |
|
2164 |
bool _uses_vl; |
|
2165 |
int _tuple_type; |
|
2166 |
int _input_size_in_bits; |
|
2167 |
bool _is_evex_instruction; |
|
2168 |
int _evex_encoding; |
|
2169 |
bool _is_clear_context; |
|
2170 |
bool _is_extended_context; |
|
38138
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
2171 |
int _embedded_opmask_register_specifier; |
34162 | 2172 |
|
2173 |
Assembler *_current_assembler; |
|
2174 |
||
2175 |
public: |
|
2176 |
// query functions for field accessors |
|
2177 |
int get_vector_len(void) const { return _avx_vector_len; } |
|
2178 |
bool is_rex_vex_w(void) const { return _rex_vex_w; } |
|
38049 | 2179 |
bool is_rex_vex_w_reverted(void) { return _rex_vex_w_reverted; } |
34162 | 2180 |
bool is_legacy_mode(void) const { return _legacy_mode; } |
2181 |
bool is_no_reg_mask(void) const { return _no_reg_mask; } |
|
2182 |
bool uses_vl(void) const { return _uses_vl; } |
|
2183 |
int get_tuple_type(void) const { return _tuple_type; } |
|
2184 |
int get_input_size(void) const { return _input_size_in_bits; } |
|
2185 |
int is_evex_instruction(void) const { return _is_evex_instruction; } |
|
2186 |
int get_evex_encoding(void) const { return _evex_encoding; } |
|
2187 |
bool is_clear_context(void) const { return _is_clear_context; } |
|
2188 |
bool is_extended_context(void) const { return _is_extended_context; } |
|
38138
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
2189 |
int get_embedded_opmask_register_specifier(void) const { return _embedded_opmask_register_specifier; } |
34162 | 2190 |
|
2191 |
// Set the vector len manually |
|
2192 |
void set_vector_len(int vector_len) { _avx_vector_len = vector_len; } |
|
2193 |
||
38049 | 2194 |
// Set revert rex_vex_w for avx encoding |
2195 |
void set_rex_vex_w_reverted(void) { _rex_vex_w_reverted = true; } |
|
2196 |
||
2197 |
// Set rex_vex_w based on state |
|
2198 |
void set_rex_vex_w(bool state) { _rex_vex_w = state; } |
|
2199 |
||
34162 | 2200 |
// Set the instruction to be encoded in AVX mode |
2201 |
void set_is_legacy_mode(void) { _legacy_mode = true; } |
|
2202 |
||
2203 |
// Set the current instuction to be encoded as an EVEX instuction |
|
2204 |
void set_is_evex_instruction(void) { _is_evex_instruction = true; } |
|
2205 |
||
2206 |
// Internal encoding data used in compressed immediate offset programming |
|
2207 |
void set_evex_encoding(int value) { _evex_encoding = value; } |
|
2208 |
||
2209 |
// Set the Evex.Z field to be used to clear all non directed XMM/YMM/ZMM components |
|
42014
cc32438a1003
8167987: change merge context to clear for mask register usage model
mcberg
parents:
41323
diff
changeset
|
2210 |
void reset_is_clear_context(void) { _is_clear_context = false; } |
34162 | 2211 |
|
2212 |
// Map back to current asembler so that we can manage object level assocation |
|
2213 |
void set_current_assembler(Assembler *current_assembler) { _current_assembler = current_assembler; } |
|
2214 |
||
2215 |
// Address modifiers used for compressed displacement calculation |
|
2216 |
void set_address_attributes(int tuple_type, int input_size_in_bits) { |
|
2217 |
if (VM_Version::supports_evex()) { |
|
2218 |
_tuple_type = tuple_type; |
|
2219 |
_input_size_in_bits = input_size_in_bits; |
|
2220 |
} |
|
2221 |
} |
|
2222 |
||
38138
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
2223 |
// Set embedded opmask register specifier. |
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
2224 |
void set_embedded_opmask_register_specifier(KRegister mask) { |
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
2225 |
_embedded_opmask_register_specifier = (*mask).encoding() & 0x7; |
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
2226 |
} |
8514e24123c8
8154975: Update for vectorizedMismatch with AVX512
vdeshpande
parents:
38135
diff
changeset
|
2227 |
|
34162 | 2228 |
}; |
2229 |
||
7397 | 2230 |
#endif // CPU_X86_VM_ASSEMBLER_X86_HPP |