author | lfoltan |
Mon, 21 Oct 2019 13:13:16 -0400 | |
changeset 58722 | cba8afa5cfed |
parent 58421 | 6fc57e391539 |
child 58901 | 2700c409ff10 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
54847
59ea39bb2809
8223657: Remove unused THREAD argument from SymbolTable functions
coleenp
parents:
54786
diff
changeset
|
2 |
* Copyright (c) 1997, 2019, 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:
4567
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4567
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:
4567
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#include "precompiled.hpp" |
47765
b7c7428eaab9
8189610: Reconcile jvm.h and all jvm_md.h between java.base and hotspot
coleenp
parents:
47216
diff
changeset
|
26 |
#include "jvm.h" |
54786 | 27 |
#include "classfile/symbolTable.hpp" |
7397 | 28 |
#include "classfile/vmSymbols.hpp" |
38699
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
29 |
#include "compiler/compilerDirectives.hpp" |
49360 | 30 |
#include "memory/allocation.inline.hpp" |
7397 | 31 |
#include "memory/oopFactory.hpp" |
46746
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46663
diff
changeset
|
32 |
#include "memory/metaspaceClosure.hpp" |
7397 | 33 |
#include "oops/oop.inline.hpp" |
34 |
#include "runtime/handles.inline.hpp" |
|
35 |
#include "utilities/xmlstream.hpp" |
|
1 | 36 |
|
37 |
||
8076
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
38 |
Symbol* vmSymbols::_symbols[vmSymbols::SID_LIMIT]; |
1 | 39 |
|
8076
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
40 |
Symbol* vmSymbols::_type_signatures[T_VOID+1] = { NULL /*, NULL...*/ }; |
1 | 41 |
|
34666 | 42 |
inline int compare_symbol(const Symbol* a, const Symbol* b) { |
1 | 43 |
if (a == b) return 0; |
44 |
// follow the natural address order: |
|
45 |
return (address)a > (address)b ? +1 : -1; |
|
46 |
} |
|
47 |
||
48 |
static vmSymbols::SID vm_symbol_index[vmSymbols::SID_LIMIT]; |
|
49 |
extern "C" { |
|
50 |
static int compare_vmsymbol_sid(const void* void_a, const void* void_b) { |
|
34666 | 51 |
const Symbol* a = vmSymbols::symbol_at(*((vmSymbols::SID*) void_a)); |
52 |
const Symbol* b = vmSymbols::symbol_at(*((vmSymbols::SID*) void_b)); |
|
1 | 53 |
return compare_symbol(a, b); |
54 |
} |
|
55 |
} |
|
56 |
||
17379 | 57 |
#ifdef ASSERT |
1 | 58 |
#define VM_SYMBOL_ENUM_NAME_BODY(name, string) #name "\0" |
59 |
static const char* vm_symbol_enum_names = |
|
60 |
VM_SYMBOLS_DO(VM_SYMBOL_ENUM_NAME_BODY, VM_ALIAS_IGNORE) |
|
61 |
"\0"; |
|
62 |
static const char* vm_symbol_enum_name(vmSymbols::SID sid) { |
|
63 |
const char* string = &vm_symbol_enum_names[0]; |
|
64 |
int skip = (int)sid - (int)vmSymbols::FIRST_SID; |
|
65 |
for (; skip != 0; skip--) { |
|
66 |
size_t skiplen = strlen(string); |
|
67 |
if (skiplen == 0) return "<unknown>"; // overflow |
|
68 |
string += skiplen+1; |
|
69 |
} |
|
70 |
return string; |
|
71 |
} |
|
17379 | 72 |
#endif //ASSERT |
1 | 73 |
|
74 |
// Put all the VM symbol strings in one place. |
|
75 |
// Makes for a more compact libjvm. |
|
76 |
#define VM_SYMBOL_BODY(name, string) string "\0" |
|
77 |
static const char* vm_symbol_bodies = VM_SYMBOLS_DO(VM_SYMBOL_BODY, VM_ALIAS_IGNORE); |
|
78 |
||
79 |
void vmSymbols::initialize(TRAPS) { |
|
80 |
assert((int)SID_LIMIT <= (1<<log2_SID_LIMIT), "must fit in this bitfield"); |
|
81 |
assert((int)SID_LIMIT*5 > (1<<log2_SID_LIMIT), "make the bitfield smaller, please"); |
|
4562
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
82 |
assert(vmIntrinsics::FLAG_LIMIT <= (1 << vmIntrinsics::log2_FLAG_LIMIT), "must fit in this bitfield"); |
1 | 83 |
|
84 |
if (!UseSharedSpaces) { |
|
85 |
const char* string = &vm_symbol_bodies[0]; |
|
86 |
for (int index = (int)FIRST_SID; index < (int)SID_LIMIT; index++) { |
|
54847
59ea39bb2809
8223657: Remove unused THREAD argument from SymbolTable functions
coleenp
parents:
54786
diff
changeset
|
87 |
Symbol* sym = SymbolTable::new_permanent_symbol(string); |
1 | 88 |
_symbols[index] = sym; |
89 |
string += strlen(string); // skip string body |
|
90 |
string += 1; // skip trailing null |
|
91 |
} |
|
92 |
||
93 |
_type_signatures[T_BYTE] = byte_signature(); |
|
94 |
_type_signatures[T_CHAR] = char_signature(); |
|
95 |
_type_signatures[T_DOUBLE] = double_signature(); |
|
96 |
_type_signatures[T_FLOAT] = float_signature(); |
|
97 |
_type_signatures[T_INT] = int_signature(); |
|
98 |
_type_signatures[T_LONG] = long_signature(); |
|
99 |
_type_signatures[T_SHORT] = short_signature(); |
|
100 |
_type_signatures[T_BOOLEAN] = bool_signature(); |
|
101 |
_type_signatures[T_VOID] = void_signature(); |
|
102 |
// no single signatures for T_OBJECT or T_ARRAY |
|
48826 | 103 |
#ifdef ASSERT |
104 |
for (int i = (int)T_BOOLEAN; i < (int)T_VOID+1; i++) { |
|
105 |
Symbol* s = _type_signatures[i]; |
|
106 |
if (s == NULL) continue; |
|
107 |
BasicType st = signature_type(s); |
|
108 |
assert(st == i, ""); |
|
109 |
} |
|
110 |
#endif |
|
1 | 111 |
} |
112 |
||
113 |
#ifdef ASSERT |
|
114 |
// Check for duplicates: |
|
115 |
for (int i1 = (int)FIRST_SID; i1 < (int)SID_LIMIT; i1++) { |
|
8076
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
116 |
Symbol* sym = symbol_at((SID)i1); |
1 | 117 |
for (int i2 = (int)FIRST_SID; i2 < i1; i2++) { |
118 |
if (symbol_at((SID)i2) == sym) { |
|
119 |
tty->print("*** Duplicate VM symbol SIDs %s(%d) and %s(%d): \"", |
|
120 |
vm_symbol_enum_name((SID)i2), i2, |
|
121 |
vm_symbol_enum_name((SID)i1), i1); |
|
122 |
sym->print_symbol_on(tty); |
|
123 |
tty->print_cr("\""); |
|
124 |
} |
|
125 |
} |
|
126 |
} |
|
127 |
#endif //ASSERT |
|
128 |
||
129 |
// Create an index for find_id: |
|
130 |
{ |
|
131 |
for (int index = (int)FIRST_SID; index < (int)SID_LIMIT; index++) { |
|
132 |
vm_symbol_index[index] = (SID)index; |
|
133 |
} |
|
134 |
int num_sids = SID_LIMIT-FIRST_SID; |
|
135 |
qsort(&vm_symbol_index[FIRST_SID], num_sids, sizeof(vm_symbol_index[0]), |
|
136 |
compare_vmsymbol_sid); |
|
137 |
} |
|
138 |
||
139 |
#ifdef ASSERT |
|
140 |
{ |
|
141 |
// Spot-check correspondence between strings, symbols, and enums: |
|
142 |
assert(_symbols[NO_SID] == NULL, "must be"); |
|
143 |
const char* str = "java/lang/Object"; |
|
54847
59ea39bb2809
8223657: Remove unused THREAD argument from SymbolTable functions
coleenp
parents:
54786
diff
changeset
|
144 |
TempNewSymbol jlo = SymbolTable::new_permanent_symbol(str); |
8076
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
145 |
assert(strncmp(str, (char*)jlo->base(), jlo->utf8_length()) == 0, ""); |
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
146 |
assert(jlo == java_lang_Object(), ""); |
1 | 147 |
SID sid = VM_SYMBOL_ENUM_NAME(java_lang_Object); |
8076
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
148 |
assert(find_sid(jlo) == sid, ""); |
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
149 |
assert(symbol_at(sid) == jlo, ""); |
1 | 150 |
|
151 |
// Make sure find_sid produces the right answer in each case. |
|
152 |
for (int index = (int)FIRST_SID; index < (int)SID_LIMIT; index++) { |
|
8076
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
153 |
Symbol* sym = symbol_at((SID)index); |
1 | 154 |
sid = find_sid(sym); |
155 |
assert(sid == (SID)index, "symbol index works"); |
|
156 |
// Note: If there are duplicates, this assert will fail. |
|
157 |
// A "Duplicate VM symbol" message will have already been printed. |
|
158 |
} |
|
159 |
||
160 |
// The string "format" happens (at the moment) not to be a vmSymbol, |
|
161 |
// though it is a method name in java.lang.String. |
|
162 |
str = "format"; |
|
54847
59ea39bb2809
8223657: Remove unused THREAD argument from SymbolTable functions
coleenp
parents:
54786
diff
changeset
|
163 |
TempNewSymbol fmt = SymbolTable::new_permanent_symbol(str); |
8076
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
164 |
sid = find_sid(fmt); |
1 | 165 |
assert(sid == NO_SID, "symbol index works (negative test)"); |
166 |
} |
|
167 |
#endif |
|
168 |
} |
|
169 |
||
170 |
||
171 |
#ifndef PRODUCT |
|
172 |
const char* vmSymbols::name_for(vmSymbols::SID sid) { |
|
173 |
if (sid == NO_SID) |
|
174 |
return "NO_SID"; |
|
175 |
const char* string = &vm_symbol_bodies[0]; |
|
176 |
for (int index = (int)FIRST_SID; index < (int)SID_LIMIT; index++) { |
|
177 |
if (index == (int)sid) |
|
178 |
return string; |
|
179 |
string += strlen(string); // skip string body |
|
180 |
string += 1; // skip trailing null |
|
181 |
} |
|
182 |
return "BAD_SID"; |
|
183 |
} |
|
184 |
#endif |
|
185 |
||
186 |
||
187 |
||
8076
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
188 |
void vmSymbols::symbols_do(SymbolClosure* f) { |
1 | 189 |
for (int index = (int)FIRST_SID; index < (int)SID_LIMIT; index++) { |
8076
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
190 |
f->do_symbol(&_symbols[index]); |
1 | 191 |
} |
192 |
for (int i = 0; i < T_VOID+1; i++) { |
|
8076
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
193 |
f->do_symbol(&_type_signatures[i]); |
1 | 194 |
} |
195 |
} |
|
196 |
||
46746
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46663
diff
changeset
|
197 |
void vmSymbols::metaspace_pointers_do(MetaspaceClosure *it) { |
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46663
diff
changeset
|
198 |
for (int index = (int)FIRST_SID; index < (int)SID_LIMIT; index++) { |
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46663
diff
changeset
|
199 |
it->push(&_symbols[index]); |
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46663
diff
changeset
|
200 |
} |
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46663
diff
changeset
|
201 |
for (int i = 0; i < T_VOID+1; i++) { |
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46663
diff
changeset
|
202 |
it->push(&_type_signatures[i]); |
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46663
diff
changeset
|
203 |
} |
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46663
diff
changeset
|
204 |
} |
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46663
diff
changeset
|
205 |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13391
diff
changeset
|
206 |
void vmSymbols::serialize(SerializeClosure* soc) { |
8076
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
207 |
soc->do_region((u_char*)&_symbols[FIRST_SID], |
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
208 |
(SID_LIMIT - FIRST_SID) * sizeof(_symbols[0])); |
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
209 |
soc->do_region((u_char*)_type_signatures, sizeof(_type_signatures)); |
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
210 |
} |
1 | 211 |
|
8076
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
212 |
|
34666 | 213 |
BasicType vmSymbols::signature_type(const Symbol* s) { |
1 | 214 |
assert(s != NULL, "checking"); |
48826 | 215 |
if (s->utf8_length() == 1) { |
51997
9ce37fa2e179
8209138: Symbol constructor uses u1 as the element type of its name argument
hseigel
parents:
50860
diff
changeset
|
216 |
BasicType result = char2type(s->char_at(0)); |
48826 | 217 |
if (is_java_primitive(result) || result == T_VOID) { |
218 |
assert(s == _type_signatures[result], ""); |
|
219 |
return result; |
|
1 | 220 |
} |
221 |
} |
|
222 |
return T_OBJECT; |
|
223 |
} |
|
224 |
||
225 |
||
226 |
static int mid_hint = (int)vmSymbols::FIRST_SID+1; |
|
227 |
||
228 |
#ifndef PRODUCT |
|
229 |
static int find_sid_calls, find_sid_probes; |
|
230 |
// (Typical counts are calls=7000 and probes=17000.) |
|
231 |
#endif |
|
232 |
||
34666 | 233 |
vmSymbols::SID vmSymbols::find_sid(const Symbol* symbol) { |
1 | 234 |
// Handle the majority of misses by a bounds check. |
235 |
// Then, use a binary search over the index. |
|
236 |
// Expected trip count is less than log2_SID_LIMIT, about eight. |
|
237 |
// This is slow but acceptable, given that calls are not |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13391
diff
changeset
|
238 |
// dynamically common. (Method*::intrinsic_id has a cache.) |
1 | 239 |
NOT_PRODUCT(find_sid_calls++); |
240 |
int min = (int)FIRST_SID, max = (int)SID_LIMIT - 1; |
|
241 |
SID sid = NO_SID, sid1; |
|
242 |
int cmp1; |
|
243 |
sid1 = vm_symbol_index[min]; |
|
244 |
cmp1 = compare_symbol(symbol, symbol_at(sid1)); |
|
245 |
if (cmp1 <= 0) { // before the first |
|
246 |
if (cmp1 == 0) sid = sid1; |
|
247 |
} else { |
|
248 |
sid1 = vm_symbol_index[max]; |
|
249 |
cmp1 = compare_symbol(symbol, symbol_at(sid1)); |
|
250 |
if (cmp1 >= 0) { // after the last |
|
251 |
if (cmp1 == 0) sid = sid1; |
|
252 |
} else { |
|
253 |
// After checking the extremes, do a binary search. |
|
254 |
++min; --max; // endpoints are done |
|
255 |
int mid = mid_hint; // start at previous success |
|
256 |
while (max >= min) { |
|
257 |
assert(mid >= min && mid <= max, ""); |
|
258 |
NOT_PRODUCT(find_sid_probes++); |
|
259 |
sid1 = vm_symbol_index[mid]; |
|
260 |
cmp1 = compare_symbol(symbol, symbol_at(sid1)); |
|
261 |
if (cmp1 == 0) { |
|
262 |
mid_hint = mid; |
|
263 |
sid = sid1; |
|
264 |
break; |
|
265 |
} |
|
266 |
if (cmp1 < 0) |
|
267 |
max = mid - 1; // symbol < symbol_at(sid) |
|
268 |
else |
|
269 |
min = mid + 1; |
|
270 |
||
271 |
// Pick a new probe point: |
|
272 |
mid = (max + min) / 2; |
|
273 |
} |
|
274 |
} |
|
275 |
} |
|
276 |
||
277 |
#ifdef ASSERT |
|
278 |
// Perform the exhaustive self-check the first 1000 calls, |
|
279 |
// and every 100 calls thereafter. |
|
280 |
static int find_sid_check_count = -2000; |
|
281 |
if ((uint)++find_sid_check_count > (uint)100) { |
|
282 |
if (find_sid_check_count > 0) find_sid_check_count = 0; |
|
283 |
||
284 |
// Make sure this is the right answer, using linear search. |
|
285 |
// (We have already proven that there are no duplicates in the list.) |
|
286 |
SID sid2 = NO_SID; |
|
287 |
for (int index = (int)FIRST_SID; index < (int)SID_LIMIT; index++) { |
|
8076
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
288 |
Symbol* sym2 = symbol_at((SID)index); |
1 | 289 |
if (sym2 == symbol) { |
290 |
sid2 = (SID)index; |
|
291 |
break; |
|
292 |
} |
|
293 |
} |
|
294 |
// Unless it's a duplicate, assert that the sids are the same. |
|
295 |
if (_symbols[sid] != _symbols[sid2]) { |
|
296 |
assert(sid == sid2, "binary same as linear search"); |
|
297 |
} |
|
298 |
} |
|
299 |
#endif //ASSERT |
|
300 |
||
301 |
return sid; |
|
302 |
} |
|
303 |
||
8675
e9fef2a9bef7
6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
8076
diff
changeset
|
304 |
vmSymbols::SID vmSymbols::find_sid(const char* symbol_name) { |
e9fef2a9bef7
6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
8076
diff
changeset
|
305 |
Symbol* symbol = SymbolTable::probe(symbol_name, (int) strlen(symbol_name)); |
e9fef2a9bef7
6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
8076
diff
changeset
|
306 |
if (symbol == NULL) return NO_SID; |
e9fef2a9bef7
6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
8076
diff
changeset
|
307 |
return find_sid(symbol); |
e9fef2a9bef7
6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
8076
diff
changeset
|
308 |
} |
e9fef2a9bef7
6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
8076
diff
changeset
|
309 |
|
4562
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
310 |
static vmIntrinsics::ID wrapper_intrinsic(BasicType type, bool unboxing) { |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
311 |
#define TYPE2(type, unboxing) ((int)(type)*2 + ((unboxing) ? 1 : 0)) |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
312 |
switch (TYPE2(type, unboxing)) { |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
313 |
#define BASIC_TYPE_CASE(type, box, unbox) \ |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
314 |
case TYPE2(type, false): return vmIntrinsics::box; \ |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
315 |
case TYPE2(type, true): return vmIntrinsics::unbox |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
316 |
BASIC_TYPE_CASE(T_BOOLEAN, _Boolean_valueOf, _booleanValue); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
317 |
BASIC_TYPE_CASE(T_BYTE, _Byte_valueOf, _byteValue); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
318 |
BASIC_TYPE_CASE(T_CHAR, _Character_valueOf, _charValue); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
319 |
BASIC_TYPE_CASE(T_SHORT, _Short_valueOf, _shortValue); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
320 |
BASIC_TYPE_CASE(T_INT, _Integer_valueOf, _intValue); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
321 |
BASIC_TYPE_CASE(T_LONG, _Long_valueOf, _longValue); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
322 |
BASIC_TYPE_CASE(T_FLOAT, _Float_valueOf, _floatValue); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
323 |
BASIC_TYPE_CASE(T_DOUBLE, _Double_valueOf, _doubleValue); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
324 |
#undef BASIC_TYPE_CASE |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
325 |
} |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
326 |
#undef TYPE2 |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
327 |
return vmIntrinsics::_none; |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
328 |
} |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
329 |
|
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
330 |
vmIntrinsics::ID vmIntrinsics::for_boxing(BasicType type) { |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
331 |
return wrapper_intrinsic(type, false); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
332 |
} |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
333 |
vmIntrinsics::ID vmIntrinsics::for_unboxing(BasicType type) { |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
334 |
return wrapper_intrinsic(type, true); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
335 |
} |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
336 |
|
4567
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4562
diff
changeset
|
337 |
vmIntrinsics::ID vmIntrinsics::for_raw_conversion(BasicType src, BasicType dest) { |
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4562
diff
changeset
|
338 |
#define SRC_DEST(s,d) (((int)(s) << 4) + (int)(d)) |
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4562
diff
changeset
|
339 |
switch (SRC_DEST(src, dest)) { |
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4562
diff
changeset
|
340 |
case SRC_DEST(T_INT, T_FLOAT): return vmIntrinsics::_intBitsToFloat; |
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4562
diff
changeset
|
341 |
case SRC_DEST(T_FLOAT, T_INT): return vmIntrinsics::_floatToRawIntBits; |
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4562
diff
changeset
|
342 |
|
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4562
diff
changeset
|
343 |
case SRC_DEST(T_LONG, T_DOUBLE): return vmIntrinsics::_longBitsToDouble; |
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4562
diff
changeset
|
344 |
case SRC_DEST(T_DOUBLE, T_LONG): return vmIntrinsics::_doubleToRawLongBits; |
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4562
diff
changeset
|
345 |
} |
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4562
diff
changeset
|
346 |
#undef SRC_DEST |
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4562
diff
changeset
|
347 |
|
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4562
diff
changeset
|
348 |
return vmIntrinsics::_none; |
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4562
diff
changeset
|
349 |
} |
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4562
diff
changeset
|
350 |
|
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
351 |
bool vmIntrinsics::preserves_state(vmIntrinsics::ID id) { |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
352 |
assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
353 |
switch(id) { |
50113 | 354 |
#ifdef JFR_HAVE_INTRINSICS |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
355 |
case vmIntrinsics::_counterTime: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
356 |
#endif |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
357 |
case vmIntrinsics::_currentTimeMillis: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
358 |
case vmIntrinsics::_nanoTime: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
359 |
case vmIntrinsics::_floatToRawIntBits: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
360 |
case vmIntrinsics::_intBitsToFloat: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
361 |
case vmIntrinsics::_doubleToRawLongBits: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
362 |
case vmIntrinsics::_longBitsToDouble: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
363 |
case vmIntrinsics::_getClass: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
364 |
case vmIntrinsics::_isInstance: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
365 |
case vmIntrinsics::_currentThread: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
366 |
case vmIntrinsics::_dabs: |
54750 | 367 |
case vmIntrinsics::_fabs: |
368 |
case vmIntrinsics::_iabs: |
|
369 |
case vmIntrinsics::_labs: |
|
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
370 |
case vmIntrinsics::_dsqrt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
371 |
case vmIntrinsics::_dsin: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
372 |
case vmIntrinsics::_dcos: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
373 |
case vmIntrinsics::_dtan: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
374 |
case vmIntrinsics::_dlog: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
375 |
case vmIntrinsics::_dlog10: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
376 |
case vmIntrinsics::_dexp: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
377 |
case vmIntrinsics::_dpow: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
378 |
case vmIntrinsics::_checkIndex: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
379 |
case vmIntrinsics::_Reference_get: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
380 |
case vmIntrinsics::_updateCRC32: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
381 |
case vmIntrinsics::_updateBytesCRC32: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
382 |
case vmIntrinsics::_updateByteBufferCRC32: |
38238
1bbcc430c78d
8151268: Wire up the x86 _vectorizedMismatch stub routine in C1
psandoz
parents:
36827
diff
changeset
|
383 |
case vmIntrinsics::_vectorizedMismatch: |
41323 | 384 |
case vmIntrinsics::_fmaD: |
385 |
case vmIntrinsics::_fmaF: |
|
52979
7384e00d5860
8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents:
52894
diff
changeset
|
386 |
case vmIntrinsics::_isDigit: |
7384e00d5860
8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents:
52894
diff
changeset
|
387 |
case vmIntrinsics::_isLowerCase: |
7384e00d5860
8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents:
52894
diff
changeset
|
388 |
case vmIntrinsics::_isUpperCase: |
7384e00d5860
8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents:
52894
diff
changeset
|
389 |
case vmIntrinsics::_isWhitespace: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
390 |
return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
391 |
default: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
392 |
return false; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
393 |
} |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
394 |
} |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
395 |
|
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
396 |
bool vmIntrinsics::can_trap(vmIntrinsics::ID id) { |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
397 |
assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
398 |
switch(id) { |
50113 | 399 |
#ifdef JFR_HAVE_INTRINSICS |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
400 |
case vmIntrinsics::_counterTime: |
40899
d7140c75c2c6
8163589: Add back class id intrinsic method for event based tracing
rehn
parents:
38699
diff
changeset
|
401 |
case vmIntrinsics::_getClassId: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
402 |
#endif |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
403 |
case vmIntrinsics::_currentTimeMillis: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
404 |
case vmIntrinsics::_nanoTime: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
405 |
case vmIntrinsics::_floatToRawIntBits: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
406 |
case vmIntrinsics::_intBitsToFloat: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
407 |
case vmIntrinsics::_doubleToRawLongBits: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
408 |
case vmIntrinsics::_longBitsToDouble: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
409 |
case vmIntrinsics::_currentThread: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
410 |
case vmIntrinsics::_dabs: |
54750 | 411 |
case vmIntrinsics::_fabs: |
412 |
case vmIntrinsics::_iabs: |
|
413 |
case vmIntrinsics::_labs: |
|
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
414 |
case vmIntrinsics::_dsqrt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
415 |
case vmIntrinsics::_dsin: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
416 |
case vmIntrinsics::_dcos: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
417 |
case vmIntrinsics::_dtan: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
418 |
case vmIntrinsics::_dlog: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
419 |
case vmIntrinsics::_dlog10: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
420 |
case vmIntrinsics::_dexp: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
421 |
case vmIntrinsics::_dpow: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
422 |
case vmIntrinsics::_updateCRC32: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
423 |
case vmIntrinsics::_updateBytesCRC32: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
424 |
case vmIntrinsics::_updateByteBufferCRC32: |
38238
1bbcc430c78d
8151268: Wire up the x86 _vectorizedMismatch stub routine in C1
psandoz
parents:
36827
diff
changeset
|
425 |
case vmIntrinsics::_vectorizedMismatch: |
41323 | 426 |
case vmIntrinsics::_fmaD: |
427 |
case vmIntrinsics::_fmaF: |
|
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
428 |
return false; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
429 |
default: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
430 |
return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
431 |
} |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
432 |
} |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
433 |
|
46663
715d5f268f62
8184271: Time related C1 intrinsics produce inconsistent results when floating around
thartmann
parents:
46630
diff
changeset
|
434 |
// Some intrinsics produce different results if they are not pinned |
715d5f268f62
8184271: Time related C1 intrinsics produce inconsistent results when floating around
thartmann
parents:
46630
diff
changeset
|
435 |
bool vmIntrinsics::should_be_pinned(vmIntrinsics::ID id) { |
715d5f268f62
8184271: Time related C1 intrinsics produce inconsistent results when floating around
thartmann
parents:
46630
diff
changeset
|
436 |
assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); |
715d5f268f62
8184271: Time related C1 intrinsics produce inconsistent results when floating around
thartmann
parents:
46630
diff
changeset
|
437 |
switch(id) { |
50113 | 438 |
#ifdef JFR_HAVE_INTRINSICS |
46663
715d5f268f62
8184271: Time related C1 intrinsics produce inconsistent results when floating around
thartmann
parents:
46630
diff
changeset
|
439 |
case vmIntrinsics::_counterTime: |
715d5f268f62
8184271: Time related C1 intrinsics produce inconsistent results when floating around
thartmann
parents:
46630
diff
changeset
|
440 |
#endif |
715d5f268f62
8184271: Time related C1 intrinsics produce inconsistent results when floating around
thartmann
parents:
46630
diff
changeset
|
441 |
case vmIntrinsics::_currentTimeMillis: |
715d5f268f62
8184271: Time related C1 intrinsics produce inconsistent results when floating around
thartmann
parents:
46630
diff
changeset
|
442 |
case vmIntrinsics::_nanoTime: |
715d5f268f62
8184271: Time related C1 intrinsics produce inconsistent results when floating around
thartmann
parents:
46630
diff
changeset
|
443 |
return true; |
715d5f268f62
8184271: Time related C1 intrinsics produce inconsistent results when floating around
thartmann
parents:
46630
diff
changeset
|
444 |
default: |
715d5f268f62
8184271: Time related C1 intrinsics produce inconsistent results when floating around
thartmann
parents:
46630
diff
changeset
|
445 |
return false; |
715d5f268f62
8184271: Time related C1 intrinsics produce inconsistent results when floating around
thartmann
parents:
46630
diff
changeset
|
446 |
} |
715d5f268f62
8184271: Time related C1 intrinsics produce inconsistent results when floating around
thartmann
parents:
46630
diff
changeset
|
447 |
} |
715d5f268f62
8184271: Time related C1 intrinsics produce inconsistent results when floating around
thartmann
parents:
46630
diff
changeset
|
448 |
|
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
449 |
bool vmIntrinsics::does_virtual_dispatch(vmIntrinsics::ID id) { |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
450 |
assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
451 |
switch(id) { |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
452 |
case vmIntrinsics::_hashCode: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
453 |
case vmIntrinsics::_clone: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
454 |
return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
455 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
456 |
default: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
457 |
return false; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
458 |
} |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
459 |
} |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
460 |
|
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
461 |
int vmIntrinsics::predicates_needed(vmIntrinsics::ID id) { |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
462 |
assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
463 |
switch (id) { |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
464 |
case vmIntrinsics::_cipherBlockChaining_encryptAESCrypt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
465 |
case vmIntrinsics::_cipherBlockChaining_decryptAESCrypt: |
57786
948ac3112da8
8225625: AES Electronic Codebook (ECB) encryption and decryption optimization using AVX512 + VAES instructions
srukmannagar
parents:
54847
diff
changeset
|
466 |
case vmIntrinsics::_electronicCodeBook_encryptAESCrypt: |
948ac3112da8
8225625: AES Electronic Codebook (ECB) encryption and decryption optimization using AVX512 + VAES instructions
srukmannagar
parents:
54847
diff
changeset
|
467 |
case vmIntrinsics::_electronicCodeBook_decryptAESCrypt: |
35154 | 468 |
case vmIntrinsics::_counterMode_AESCrypt: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
469 |
return 1; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
470 |
case vmIntrinsics::_digestBase_implCompressMB: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
471 |
return 3; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
472 |
default: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
473 |
return 0; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
474 |
} |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
475 |
} |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
476 |
|
38699
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
477 |
bool vmIntrinsics::is_intrinsic_available(vmIntrinsics::ID id) { |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
478 |
return !vmIntrinsics::is_intrinsic_disabled(id) && |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
479 |
!vmIntrinsics::is_disabled_by_flags(id); |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
480 |
} |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
481 |
|
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
482 |
bool vmIntrinsics::is_intrinsic_disabled(vmIntrinsics::ID id) { |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
483 |
assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
484 |
|
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
485 |
// Canonicalize DisableIntrinsic to contain only ',' as a separator. |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
486 |
// Note, DirectiveSet may not be created at this point yet since this code |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
487 |
// is called from initial stub geenration code. |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
488 |
char* local_list = (char*)DirectiveSet::canonicalize_disableintrinsic(DisableIntrinsic); |
52894 | 489 |
char* save_ptr; |
38699
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
490 |
bool found = false; |
52894 | 491 |
|
492 |
char* token = strtok_r(local_list, ",", &save_ptr); |
|
38699
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
493 |
while (token != NULL) { |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
494 |
if (strcmp(token, vmIntrinsics::name_at(id)) == 0) { |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
495 |
found = true; |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
496 |
break; |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
497 |
} else { |
52894 | 498 |
token = strtok_r(NULL, ",", &save_ptr); |
38699
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
499 |
} |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
500 |
} |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
501 |
|
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
502 |
FREE_C_HEAP_ARRAY(char, local_list); |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
503 |
return found; |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
504 |
} |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
505 |
|
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
506 |
|
33626 | 507 |
bool vmIntrinsics::is_disabled_by_flags(const methodHandle& method) { |
32085
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
508 |
vmIntrinsics::ID id = method->intrinsic_id(); |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
509 |
assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); |
38699
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
510 |
return is_disabled_by_flags(id); |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
511 |
} |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
512 |
|
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
513 |
bool vmIntrinsics::is_disabled_by_flags(vmIntrinsics::ID id) { |
f8bec5f6b09c
8154473: Update for CompilerDirectives to control stub generation and intrinsics
vdeshpande
parents:
38246
diff
changeset
|
514 |
assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); |
32085
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
515 |
|
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
516 |
// -XX:-InlineNatives disables nearly all intrinsics except the ones listed in |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
517 |
// the following switch statement. |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
518 |
if (!InlineNatives) { |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
519 |
switch (id) { |
33628 | 520 |
case vmIntrinsics::_indexOfL: |
521 |
case vmIntrinsics::_indexOfU: |
|
522 |
case vmIntrinsics::_indexOfUL: |
|
523 |
case vmIntrinsics::_indexOfIL: |
|
524 |
case vmIntrinsics::_indexOfIU: |
|
525 |
case vmIntrinsics::_indexOfIUL: |
|
526 |
case vmIntrinsics::_indexOfU_char: |
|
527 |
case vmIntrinsics::_compareToL: |
|
528 |
case vmIntrinsics::_compareToU: |
|
529 |
case vmIntrinsics::_compareToLU: |
|
530 |
case vmIntrinsics::_compareToUL: |
|
531 |
case vmIntrinsics::_equalsL: |
|
532 |
case vmIntrinsics::_equalsU: |
|
32085
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
533 |
case vmIntrinsics::_equalsC: |
33628 | 534 |
case vmIntrinsics::_getCharStringU: |
535 |
case vmIntrinsics::_putCharStringU: |
|
536 |
case vmIntrinsics::_compressStringC: |
|
537 |
case vmIntrinsics::_compressStringB: |
|
538 |
case vmIntrinsics::_inflateStringC: |
|
539 |
case vmIntrinsics::_inflateStringB: |
|
32085
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
540 |
case vmIntrinsics::_getAndAddInt: |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
541 |
case vmIntrinsics::_getAndAddLong: |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
542 |
case vmIntrinsics::_getAndSetInt: |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
543 |
case vmIntrinsics::_getAndSetLong: |
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
544 |
case vmIntrinsics::_getAndSetReference: |
32085
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
545 |
case vmIntrinsics::_loadFence: |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
546 |
case vmIntrinsics::_storeFence: |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
547 |
case vmIntrinsics::_fullFence: |
33628 | 548 |
case vmIntrinsics::_hasNegatives: |
32085
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
549 |
case vmIntrinsics::_Reference_get: |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
550 |
break; |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
551 |
default: |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
552 |
return true; |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
553 |
} |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
554 |
} |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
555 |
|
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
556 |
switch (id) { |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
557 |
case vmIntrinsics::_isInstance: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
558 |
case vmIntrinsics::_isAssignableFrom: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
559 |
case vmIntrinsics::_getModifiers: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
560 |
case vmIntrinsics::_isInterface: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
561 |
case vmIntrinsics::_isArray: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
562 |
case vmIntrinsics::_isPrimitive: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
563 |
case vmIntrinsics::_getSuperclass: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
564 |
case vmIntrinsics::_Class_cast: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
565 |
case vmIntrinsics::_getLength: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
566 |
case vmIntrinsics::_newArray: |
32085
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
567 |
case vmIntrinsics::_getClass: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
568 |
if (!InlineClassNatives) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
569 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
570 |
case vmIntrinsics::_currentThread: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
571 |
case vmIntrinsics::_isInterrupted: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
572 |
if (!InlineThreadNatives) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
573 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
574 |
case vmIntrinsics::_floatToRawIntBits: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
575 |
case vmIntrinsics::_intBitsToFloat: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
576 |
case vmIntrinsics::_doubleToRawLongBits: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
577 |
case vmIntrinsics::_longBitsToDouble: |
58421
6fc57e391539
8226721: Missing intrinsics for Math.ceil, floor, rint
neliasso
parents:
57786
diff
changeset
|
578 |
case vmIntrinsics::_ceil: |
6fc57e391539
8226721: Missing intrinsics for Math.ceil, floor, rint
neliasso
parents:
57786
diff
changeset
|
579 |
case vmIntrinsics::_floor: |
6fc57e391539
8226721: Missing intrinsics for Math.ceil, floor, rint
neliasso
parents:
57786
diff
changeset
|
580 |
case vmIntrinsics::_rint: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
581 |
case vmIntrinsics::_dabs: |
54750 | 582 |
case vmIntrinsics::_fabs: |
583 |
case vmIntrinsics::_iabs: |
|
584 |
case vmIntrinsics::_labs: |
|
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
585 |
case vmIntrinsics::_dsqrt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
586 |
case vmIntrinsics::_dsin: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
587 |
case vmIntrinsics::_dcos: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
588 |
case vmIntrinsics::_dtan: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
589 |
case vmIntrinsics::_dlog: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
590 |
case vmIntrinsics::_dexp: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
591 |
case vmIntrinsics::_dpow: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
592 |
case vmIntrinsics::_dlog10: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
593 |
case vmIntrinsics::_datan2: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
594 |
case vmIntrinsics::_min: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
595 |
case vmIntrinsics::_max: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
596 |
case vmIntrinsics::_floatToIntBits: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
597 |
case vmIntrinsics::_doubleToLongBits: |
53041 | 598 |
case vmIntrinsics::_maxF: |
599 |
case vmIntrinsics::_minF: |
|
600 |
case vmIntrinsics::_maxD: |
|
601 |
case vmIntrinsics::_minD: |
|
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
602 |
if (!InlineMathNatives) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
603 |
break; |
41323 | 604 |
case vmIntrinsics::_fmaD: |
605 |
case vmIntrinsics::_fmaF: |
|
606 |
if (!InlineMathNatives || !UseFMA) return true; |
|
607 |
break; |
|
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
608 |
case vmIntrinsics::_arraycopy: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
609 |
if (!InlineArrayCopy) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
610 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
611 |
case vmIntrinsics::_updateCRC32: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
612 |
case vmIntrinsics::_updateBytesCRC32: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
613 |
case vmIntrinsics::_updateByteBufferCRC32: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
614 |
if (!UseCRC32Intrinsics) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
615 |
break; |
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
616 |
case vmIntrinsics::_getReference: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
617 |
case vmIntrinsics::_getBoolean: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
618 |
case vmIntrinsics::_getByte: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
619 |
case vmIntrinsics::_getShort: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
620 |
case vmIntrinsics::_getChar: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
621 |
case vmIntrinsics::_getInt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
622 |
case vmIntrinsics::_getLong: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
623 |
case vmIntrinsics::_getFloat: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
624 |
case vmIntrinsics::_getDouble: |
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
625 |
case vmIntrinsics::_putReference: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
626 |
case vmIntrinsics::_putBoolean: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
627 |
case vmIntrinsics::_putByte: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
628 |
case vmIntrinsics::_putShort: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
629 |
case vmIntrinsics::_putChar: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
630 |
case vmIntrinsics::_putInt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
631 |
case vmIntrinsics::_putLong: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
632 |
case vmIntrinsics::_putFloat: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
633 |
case vmIntrinsics::_putDouble: |
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
634 |
case vmIntrinsics::_getReferenceVolatile: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
635 |
case vmIntrinsics::_getBooleanVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
636 |
case vmIntrinsics::_getByteVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
637 |
case vmIntrinsics::_getShortVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
638 |
case vmIntrinsics::_getCharVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
639 |
case vmIntrinsics::_getIntVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
640 |
case vmIntrinsics::_getLongVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
641 |
case vmIntrinsics::_getFloatVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
642 |
case vmIntrinsics::_getDoubleVolatile: |
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
643 |
case vmIntrinsics::_putReferenceVolatile: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
644 |
case vmIntrinsics::_putBooleanVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
645 |
case vmIntrinsics::_putByteVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
646 |
case vmIntrinsics::_putShortVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
647 |
case vmIntrinsics::_putCharVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
648 |
case vmIntrinsics::_putIntVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
649 |
case vmIntrinsics::_putLongVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
650 |
case vmIntrinsics::_putFloatVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
651 |
case vmIntrinsics::_putDoubleVolatile: |
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
652 |
case vmIntrinsics::_getReferenceAcquire: |
36316
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
653 |
case vmIntrinsics::_getBooleanAcquire: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
654 |
case vmIntrinsics::_getByteAcquire: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
655 |
case vmIntrinsics::_getShortAcquire: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
656 |
case vmIntrinsics::_getCharAcquire: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
657 |
case vmIntrinsics::_getIntAcquire: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
658 |
case vmIntrinsics::_getLongAcquire: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
659 |
case vmIntrinsics::_getFloatAcquire: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
660 |
case vmIntrinsics::_getDoubleAcquire: |
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
661 |
case vmIntrinsics::_putReferenceRelease: |
36316
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
662 |
case vmIntrinsics::_putBooleanRelease: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
663 |
case vmIntrinsics::_putByteRelease: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
664 |
case vmIntrinsics::_putShortRelease: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
665 |
case vmIntrinsics::_putCharRelease: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
666 |
case vmIntrinsics::_putIntRelease: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
667 |
case vmIntrinsics::_putLongRelease: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
668 |
case vmIntrinsics::_putFloatRelease: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
669 |
case vmIntrinsics::_putDoubleRelease: |
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
670 |
case vmIntrinsics::_getReferenceOpaque: |
36316
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
671 |
case vmIntrinsics::_getBooleanOpaque: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
672 |
case vmIntrinsics::_getByteOpaque: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
673 |
case vmIntrinsics::_getShortOpaque: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
674 |
case vmIntrinsics::_getCharOpaque: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
675 |
case vmIntrinsics::_getIntOpaque: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
676 |
case vmIntrinsics::_getLongOpaque: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
677 |
case vmIntrinsics::_getFloatOpaque: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
678 |
case vmIntrinsics::_getDoubleOpaque: |
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
679 |
case vmIntrinsics::_putReferenceOpaque: |
36316
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
680 |
case vmIntrinsics::_putBooleanOpaque: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
681 |
case vmIntrinsics::_putByteOpaque: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
682 |
case vmIntrinsics::_putShortOpaque: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
683 |
case vmIntrinsics::_putCharOpaque: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
684 |
case vmIntrinsics::_putIntOpaque: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
685 |
case vmIntrinsics::_putLongOpaque: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
686 |
case vmIntrinsics::_putFloatOpaque: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
687 |
case vmIntrinsics::_putDoubleOpaque: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
688 |
case vmIntrinsics::_getAndAddInt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
689 |
case vmIntrinsics::_getAndAddLong: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
690 |
case vmIntrinsics::_getAndSetInt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
691 |
case vmIntrinsics::_getAndSetLong: |
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
692 |
case vmIntrinsics::_getAndSetReference: |
32085
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
693 |
case vmIntrinsics::_loadFence: |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
694 |
case vmIntrinsics::_storeFence: |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
695 |
case vmIntrinsics::_fullFence: |
45514
0fc9cc73ce45
8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents:
41330
diff
changeset
|
696 |
case vmIntrinsics::_compareAndSetLong: |
0fc9cc73ce45
8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents:
41330
diff
changeset
|
697 |
case vmIntrinsics::_weakCompareAndSetLong: |
0fc9cc73ce45
8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents:
41330
diff
changeset
|
698 |
case vmIntrinsics::_weakCompareAndSetLongPlain: |
0fc9cc73ce45
8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents:
41330
diff
changeset
|
699 |
case vmIntrinsics::_weakCompareAndSetLongAcquire: |
0fc9cc73ce45
8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents:
41330
diff
changeset
|
700 |
case vmIntrinsics::_weakCompareAndSetLongRelease: |
0fc9cc73ce45
8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents:
41330
diff
changeset
|
701 |
case vmIntrinsics::_compareAndSetInt: |
0fc9cc73ce45
8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents:
41330
diff
changeset
|
702 |
case vmIntrinsics::_weakCompareAndSetInt: |
0fc9cc73ce45
8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents:
41330
diff
changeset
|
703 |
case vmIntrinsics::_weakCompareAndSetIntPlain: |
0fc9cc73ce45
8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents:
41330
diff
changeset
|
704 |
case vmIntrinsics::_weakCompareAndSetIntAcquire: |
0fc9cc73ce45
8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents:
41330
diff
changeset
|
705 |
case vmIntrinsics::_weakCompareAndSetIntRelease: |
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
706 |
case vmIntrinsics::_compareAndSetReference: |
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
707 |
case vmIntrinsics::_weakCompareAndSetReference: |
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
708 |
case vmIntrinsics::_weakCompareAndSetReferencePlain: |
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
709 |
case vmIntrinsics::_weakCompareAndSetReferenceAcquire: |
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
710 |
case vmIntrinsics::_weakCompareAndSetReferenceRelease: |
45514
0fc9cc73ce45
8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents:
41330
diff
changeset
|
711 |
case vmIntrinsics::_compareAndExchangeInt: |
36316
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
712 |
case vmIntrinsics::_compareAndExchangeIntAcquire: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
713 |
case vmIntrinsics::_compareAndExchangeIntRelease: |
45514
0fc9cc73ce45
8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents:
41330
diff
changeset
|
714 |
case vmIntrinsics::_compareAndExchangeLong: |
36316
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
715 |
case vmIntrinsics::_compareAndExchangeLongAcquire: |
7a83de7aabca
8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents:
35154
diff
changeset
|
716 |
case vmIntrinsics::_compareAndExchangeLongRelease: |
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
717 |
case vmIntrinsics::_compareAndExchangeReference: |
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
718 |
case vmIntrinsics::_compareAndExchangeReferenceAcquire: |
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
51997
diff
changeset
|
719 |
case vmIntrinsics::_compareAndExchangeReferenceRelease: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
720 |
if (!InlineUnsafeOps) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
721 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
722 |
case vmIntrinsics::_getShortUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
723 |
case vmIntrinsics::_getCharUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
724 |
case vmIntrinsics::_getIntUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
725 |
case vmIntrinsics::_getLongUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
726 |
case vmIntrinsics::_putShortUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
727 |
case vmIntrinsics::_putCharUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
728 |
case vmIntrinsics::_putIntUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
729 |
case vmIntrinsics::_putLongUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
730 |
case vmIntrinsics::_allocateInstance: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
731 |
if (!InlineUnsafeOps || !UseUnalignedAccesses) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
732 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
733 |
case vmIntrinsics::_hashCode: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
734 |
if (!InlineObjectHash) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
735 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
736 |
case vmIntrinsics::_aescrypt_encryptBlock: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
737 |
case vmIntrinsics::_aescrypt_decryptBlock: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
738 |
if (!UseAESIntrinsics) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
739 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
740 |
case vmIntrinsics::_cipherBlockChaining_encryptAESCrypt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
741 |
case vmIntrinsics::_cipherBlockChaining_decryptAESCrypt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
742 |
if (!UseAESIntrinsics) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
743 |
break; |
57786
948ac3112da8
8225625: AES Electronic Codebook (ECB) encryption and decryption optimization using AVX512 + VAES instructions
srukmannagar
parents:
54847
diff
changeset
|
744 |
case vmIntrinsics::_electronicCodeBook_encryptAESCrypt: |
948ac3112da8
8225625: AES Electronic Codebook (ECB) encryption and decryption optimization using AVX512 + VAES instructions
srukmannagar
parents:
54847
diff
changeset
|
745 |
case vmIntrinsics::_electronicCodeBook_decryptAESCrypt: |
948ac3112da8
8225625: AES Electronic Codebook (ECB) encryption and decryption optimization using AVX512 + VAES instructions
srukmannagar
parents:
54847
diff
changeset
|
746 |
if (!UseAESIntrinsics) return true; |
948ac3112da8
8225625: AES Electronic Codebook (ECB) encryption and decryption optimization using AVX512 + VAES instructions
srukmannagar
parents:
54847
diff
changeset
|
747 |
break; |
35154 | 748 |
case vmIntrinsics::_counterMode_AESCrypt: |
749 |
if (!UseAESCTRIntrinsics) return true; |
|
750 |
break; |
|
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
751 |
case vmIntrinsics::_sha_implCompress: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
752 |
if (!UseSHA1Intrinsics) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
753 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
754 |
case vmIntrinsics::_sha2_implCompress: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
755 |
if (!UseSHA256Intrinsics) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
756 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
757 |
case vmIntrinsics::_sha5_implCompress: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
758 |
if (!UseSHA512Intrinsics) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
759 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
760 |
case vmIntrinsics::_digestBase_implCompressMB: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
761 |
if (!(UseSHA1Intrinsics || UseSHA256Intrinsics || UseSHA512Intrinsics)) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
762 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
763 |
case vmIntrinsics::_ghash_processBlocks: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
764 |
if (!UseGHASHIntrinsics) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
765 |
break; |
50860
480a96a43b62
8205528: Base64 encoding algorithm using AVX512 instructions
kvn
parents:
50525
diff
changeset
|
766 |
case vmIntrinsics::_base64_encodeBlock: |
480a96a43b62
8205528: Base64 encoding algorithm using AVX512 instructions
kvn
parents:
50525
diff
changeset
|
767 |
if (!UseBASE64Intrinsics) return true; |
480a96a43b62
8205528: Base64 encoding algorithm using AVX512 instructions
kvn
parents:
50525
diff
changeset
|
768 |
break; |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
769 |
case vmIntrinsics::_updateBytesCRC32C: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
770 |
case vmIntrinsics::_updateDirectByteBufferCRC32C: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
771 |
if (!UseCRC32CIntrinsics) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
772 |
break; |
38238
1bbcc430c78d
8151268: Wire up the x86 _vectorizedMismatch stub routine in C1
psandoz
parents:
36827
diff
changeset
|
773 |
case vmIntrinsics::_vectorizedMismatch: |
1bbcc430c78d
8151268: Wire up the x86 _vectorizedMismatch stub routine in C1
psandoz
parents:
36827
diff
changeset
|
774 |
if (!UseVectorizedMismatchIntrinsic) return true; |
1bbcc430c78d
8151268: Wire up the x86 _vectorizedMismatch stub routine in C1
psandoz
parents:
36827
diff
changeset
|
775 |
break; |
32581 | 776 |
case vmIntrinsics::_updateBytesAdler32: |
777 |
case vmIntrinsics::_updateByteBufferAdler32: |
|
778 |
if (!UseAdler32Intrinsics) return true; |
|
779 |
break; |
|
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
780 |
case vmIntrinsics::_copyMemory: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
781 |
if (!InlineArrayCopy || !InlineUnsafeOps) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
782 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
783 |
#ifdef COMPILER1 |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
784 |
case vmIntrinsics::_checkIndex: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
785 |
if (!InlineNIOCheckIndex) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
786 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
787 |
#endif // COMPILER1 |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
788 |
#ifdef COMPILER2 |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
789 |
case vmIntrinsics::_clone: |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
50113
diff
changeset
|
790 |
#if INCLUDE_ZGC |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
50113
diff
changeset
|
791 |
if (UseZGC) return true; |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
50113
diff
changeset
|
792 |
#endif |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
793 |
case vmIntrinsics::_copyOf: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
794 |
case vmIntrinsics::_copyOfRange: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
795 |
// These intrinsics use both the objectcopy and the arraycopy |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
796 |
// intrinsic mechanism. |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
797 |
if (!InlineObjectCopy || !InlineArrayCopy) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
798 |
break; |
33628 | 799 |
case vmIntrinsics::_compareToL: |
800 |
case vmIntrinsics::_compareToU: |
|
801 |
case vmIntrinsics::_compareToLU: |
|
802 |
case vmIntrinsics::_compareToUL: |
|
32085
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
803 |
if (!SpecialStringCompareTo) return true; |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
804 |
break; |
33628 | 805 |
case vmIntrinsics::_indexOfL: |
806 |
case vmIntrinsics::_indexOfU: |
|
807 |
case vmIntrinsics::_indexOfUL: |
|
808 |
case vmIntrinsics::_indexOfIL: |
|
809 |
case vmIntrinsics::_indexOfIU: |
|
810 |
case vmIntrinsics::_indexOfIUL: |
|
811 |
case vmIntrinsics::_indexOfU_char: |
|
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
812 |
if (!SpecialStringIndexOf) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
813 |
break; |
33628 | 814 |
case vmIntrinsics::_equalsL: |
815 |
case vmIntrinsics::_equalsU: |
|
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
816 |
if (!SpecialStringEquals) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
817 |
break; |
33628 | 818 |
case vmIntrinsics::_equalsB: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
819 |
case vmIntrinsics::_equalsC: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
820 |
if (!SpecialArraysEquals) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
821 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
822 |
case vmIntrinsics::_encodeISOArray: |
33628 | 823 |
case vmIntrinsics::_encodeByteISOArray: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
824 |
if (!SpecialEncodeISOArray) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
825 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
826 |
case vmIntrinsics::_getCallerClass: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
827 |
if (!InlineReflectionGetCallerClass) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
828 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
829 |
case vmIntrinsics::_multiplyToLen: |
32085
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
830 |
if (!UseMultiplyToLenIntrinsic) return true; |
d869c505b624
8132457: Unify command-line flags controlling the usage of compiler intrinsics
zmajo
parents:
31962
diff
changeset
|
831 |
break; |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
832 |
case vmIntrinsics::_squareToLen: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
833 |
if (!UseSquareToLenIntrinsic) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
834 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
835 |
case vmIntrinsics::_mulAdd: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
836 |
if (!UseMulAddIntrinsic) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
837 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
838 |
case vmIntrinsics::_montgomeryMultiply: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
839 |
if (!UseMontgomeryMultiplyIntrinsic) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
840 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
841 |
case vmIntrinsics::_montgomerySquare: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
842 |
if (!UseMontgomerySquareIntrinsic) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
843 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
844 |
case vmIntrinsics::_addExactI: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
845 |
case vmIntrinsics::_addExactL: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
846 |
case vmIntrinsics::_decrementExactI: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
847 |
case vmIntrinsics::_decrementExactL: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
848 |
case vmIntrinsics::_incrementExactI: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
849 |
case vmIntrinsics::_incrementExactL: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
850 |
case vmIntrinsics::_multiplyExactI: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
851 |
case vmIntrinsics::_multiplyExactL: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
852 |
case vmIntrinsics::_negateExactI: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
853 |
case vmIntrinsics::_negateExactL: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
854 |
case vmIntrinsics::_subtractExactI: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
855 |
case vmIntrinsics::_subtractExactL: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
856 |
if (!UseMathExactIntrinsics || !InlineMathNatives) return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
857 |
break; |
52979
7384e00d5860
8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents:
52894
diff
changeset
|
858 |
case vmIntrinsics::_isDigit: |
7384e00d5860
8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents:
52894
diff
changeset
|
859 |
case vmIntrinsics::_isLowerCase: |
7384e00d5860
8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents:
52894
diff
changeset
|
860 |
case vmIntrinsics::_isUpperCase: |
7384e00d5860
8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents:
52894
diff
changeset
|
861 |
case vmIntrinsics::_isWhitespace: |
7384e00d5860
8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents:
52894
diff
changeset
|
862 |
if (!UseCharacterCompareIntrinsics) return true; |
7384e00d5860
8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents:
52894
diff
changeset
|
863 |
break; |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
864 |
#endif // COMPILER2 |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
865 |
default: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
866 |
return false; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
867 |
} |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
868 |
|
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
869 |
return false; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
24424
diff
changeset
|
870 |
} |
1 | 871 |
|
872 |
#define VM_INTRINSIC_INITIALIZE(id, klass, name, sig, flags) #id "\0" |
|
873 |
static const char* vm_intrinsic_name_bodies = |
|
874 |
VM_INTRINSICS_DO(VM_INTRINSIC_INITIALIZE, |
|
875 |
VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE); |
|
876 |
||
877 |
static const char* vm_intrinsic_name_table[vmIntrinsics::ID_LIMIT]; |
|
878 |
||
879 |
const char* vmIntrinsics::name_at(vmIntrinsics::ID id) { |
|
880 |
const char** nt = &vm_intrinsic_name_table[0]; |
|
881 |
if (nt[_none] == NULL) { |
|
882 |
char* string = (char*) &vm_intrinsic_name_bodies[0]; |
|
883 |
for (int index = FIRST_ID; index < ID_LIMIT; index++) { |
|
884 |
nt[index] = string; |
|
885 |
string += strlen(string); // skip string body |
|
886 |
string += 1; // skip trailing null |
|
887 |
} |
|
888 |
assert(!strcmp(nt[_hashCode], "_hashCode"), "lined up"); |
|
889 |
nt[_none] = "_none"; |
|
890 |
} |
|
891 |
if ((uint)id < (uint)ID_LIMIT) |
|
892 |
return vm_intrinsic_name_table[(uint)id]; |
|
893 |
else |
|
894 |
return "(unknown intrinsic)"; |
|
895 |
} |
|
896 |
||
897 |
// These are flag-matching functions: |
|
898 |
inline bool match_F_R(jshort flags) { |
|
899 |
const int req = 0; |
|
900 |
const int neg = JVM_ACC_STATIC | JVM_ACC_SYNCHRONIZED; |
|
901 |
return (flags & (req | neg)) == req; |
|
902 |
} |
|
4450
6d700b859b3e
6892658: C2 should optimize some stringbuilder patterns
never
parents:
670
diff
changeset
|
903 |
inline bool match_F_Y(jshort flags) { |
6d700b859b3e
6892658: C2 should optimize some stringbuilder patterns
never
parents:
670
diff
changeset
|
904 |
const int req = JVM_ACC_SYNCHRONIZED; |
6d700b859b3e
6892658: C2 should optimize some stringbuilder patterns
never
parents:
670
diff
changeset
|
905 |
const int neg = JVM_ACC_STATIC; |
6d700b859b3e
6892658: C2 should optimize some stringbuilder patterns
never
parents:
670
diff
changeset
|
906 |
return (flags & (req | neg)) == req; |
6d700b859b3e
6892658: C2 should optimize some stringbuilder patterns
never
parents:
670
diff
changeset
|
907 |
} |
1 | 908 |
inline bool match_F_RN(jshort flags) { |
909 |
const int req = JVM_ACC_NATIVE; |
|
910 |
const int neg = JVM_ACC_STATIC | JVM_ACC_SYNCHRONIZED; |
|
911 |
return (flags & (req | neg)) == req; |
|
912 |
} |
|
913 |
inline bool match_F_S(jshort flags) { |
|
914 |
const int req = JVM_ACC_STATIC; |
|
915 |
const int neg = JVM_ACC_SYNCHRONIZED; |
|
916 |
return (flags & (req | neg)) == req; |
|
917 |
} |
|
918 |
inline bool match_F_SN(jshort flags) { |
|
919 |
const int req = JVM_ACC_STATIC | JVM_ACC_NATIVE; |
|
920 |
const int neg = JVM_ACC_SYNCHRONIZED; |
|
921 |
return (flags & (req | neg)) == req; |
|
922 |
} |
|
218
a0e996680b05
6667615: (Escape Analysis) extend MDO to cache arguments escape state
kvn
parents:
1
diff
changeset
|
923 |
inline bool match_F_RNY(jshort flags) { |
a0e996680b05
6667615: (Escape Analysis) extend MDO to cache arguments escape state
kvn
parents:
1
diff
changeset
|
924 |
const int req = JVM_ACC_NATIVE | JVM_ACC_SYNCHRONIZED; |
a0e996680b05
6667615: (Escape Analysis) extend MDO to cache arguments escape state
kvn
parents:
1
diff
changeset
|
925 |
const int neg = JVM_ACC_STATIC; |
a0e996680b05
6667615: (Escape Analysis) extend MDO to cache arguments escape state
kvn
parents:
1
diff
changeset
|
926 |
return (flags & (req | neg)) == req; |
a0e996680b05
6667615: (Escape Analysis) extend MDO to cache arguments escape state
kvn
parents:
1
diff
changeset
|
927 |
} |
1 | 928 |
|
929 |
// These are for forming case labels: |
|
4562
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
930 |
#define ID3(x, y, z) (( jlong)(z) + \ |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
931 |
((jlong)(y) << vmSymbols::log2_SID_LIMIT) + \ |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
932 |
((jlong)(x) << (2*vmSymbols::log2_SID_LIMIT)) ) |
1 | 933 |
#define SID_ENUM(n) vmSymbols::VM_SYMBOL_ENUM_NAME(n) |
934 |
||
4562
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
935 |
vmIntrinsics::ID vmIntrinsics::find_id_impl(vmSymbols::SID holder, |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
936 |
vmSymbols::SID name, |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
937 |
vmSymbols::SID sig, |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
938 |
jshort flags) { |
1 | 939 |
assert((int)vmSymbols::SID_LIMIT <= (1<<vmSymbols::log2_SID_LIMIT), "must fit"); |
940 |
||
941 |
// Let the C compiler build the decision tree. |
|
942 |
||
943 |
#define VM_INTRINSIC_CASE(id, klass, name, sig, fcode) \ |
|
944 |
case ID3(SID_ENUM(klass), SID_ENUM(name), SID_ENUM(sig)): \ |
|
945 |
if (!match_##fcode(flags)) break; \ |
|
946 |
return id; |
|
947 |
||
948 |
switch (ID3(holder, name, sig)) { |
|
949 |
VM_INTRINSICS_DO(VM_INTRINSIC_CASE, |
|
950 |
VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE); |
|
951 |
} |
|
952 |
return vmIntrinsics::_none; |
|
953 |
||
954 |
#undef VM_INTRINSIC_CASE |
|
955 |
} |
|
956 |
||
957 |
||
958 |
const char* vmIntrinsics::short_name_as_C_string(vmIntrinsics::ID id, char* buf, int buflen) { |
|
959 |
const char* str = name_at(id); |
|
960 |
#ifndef PRODUCT |
|
961 |
const char* kname = vmSymbols::name_for(class_for(id)); |
|
962 |
const char* mname = vmSymbols::name_for(name_for(id)); |
|
963 |
const char* sname = vmSymbols::name_for(signature_for(id)); |
|
964 |
const char* fname = ""; |
|
965 |
switch (flags_for(id)) { |
|
4450
6d700b859b3e
6892658: C2 should optimize some stringbuilder patterns
never
parents:
670
diff
changeset
|
966 |
case F_Y: fname = "synchronized "; break; |
1 | 967 |
case F_RN: fname = "native "; break; |
968 |
case F_SN: fname = "native static "; break; |
|
969 |
case F_S: fname = "static "; break; |
|
218
a0e996680b05
6667615: (Escape Analysis) extend MDO to cache arguments escape state
kvn
parents:
1
diff
changeset
|
970 |
case F_RNY:fname = "native synchronized "; break; |
46630
75aa3e39d02c
8182299: Enable disabled clang warnings, build on OSX 10 + Xcode 8
jwilhelm
parents:
46560
diff
changeset
|
971 |
default: break; |
1 | 972 |
} |
58722
cba8afa5cfed
8231844: Enhance type signature characters in classfile_constants.h and improve the JVM to use type signature characters more consistently
lfoltan
parents:
58421
diff
changeset
|
973 |
const char* kptr = strrchr(kname, JVM_SIGNATURE_SLASH); |
1 | 974 |
if (kptr != NULL) kname = kptr + 1; |
975 |
int len = jio_snprintf(buf, buflen, "%s: %s%s.%s%s", |
|
976 |
str, fname, kname, mname, sname); |
|
977 |
if (len < buflen) |
|
978 |
str = buf; |
|
979 |
#endif //PRODUCT |
|
980 |
return str; |
|
981 |
} |
|
982 |
||
983 |
||
4562
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
984 |
// These are to get information about intrinsics. |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
985 |
|
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
986 |
#define ID4(x, y, z, f) ((ID3(x, y, z) << vmIntrinsics::log2_FLAG_LIMIT) | (jlong) (f)) |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
987 |
|
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
988 |
static const jlong intrinsic_info_array[vmIntrinsics::ID_LIMIT+1] = { |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
989 |
#define VM_INTRINSIC_INFO(ignore_id, klass, name, sig, fcode) \ |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
990 |
ID4(SID_ENUM(klass), SID_ENUM(name), SID_ENUM(sig), vmIntrinsics::fcode), |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
991 |
|
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
992 |
0, VM_INTRINSICS_DO(VM_INTRINSIC_INFO, |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
993 |
VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
994 |
0 |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
995 |
#undef VM_INTRINSIC_INFO |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
996 |
}; |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
997 |
|
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
998 |
inline jlong intrinsic_info(vmIntrinsics::ID id) { |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
999 |
return intrinsic_info_array[vmIntrinsics::ID_from((int)id)]; |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
1000 |
} |
1 | 1001 |
|
1002 |
vmSymbols::SID vmIntrinsics::class_for(vmIntrinsics::ID id) { |
|
4562
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
1003 |
jlong info = intrinsic_info(id); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
1004 |
int shift = 2*vmSymbols::log2_SID_LIMIT + log2_FLAG_LIMIT, mask = right_n_bits(vmSymbols::log2_SID_LIMIT); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
1005 |
assert(((ID4(1021,1022,1023,15) >> shift) & mask) == 1021, ""); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
1006 |
return vmSymbols::SID( (info >> shift) & mask ); |
1 | 1007 |
} |
1008 |
||
1009 |
vmSymbols::SID vmIntrinsics::name_for(vmIntrinsics::ID id) { |
|
4562
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
1010 |
jlong info = intrinsic_info(id); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
1011 |
int shift = vmSymbols::log2_SID_LIMIT + log2_FLAG_LIMIT, mask = right_n_bits(vmSymbols::log2_SID_LIMIT); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
1012 |
assert(((ID4(1021,1022,1023,15) >> shift) & mask) == 1022, ""); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
1013 |
return vmSymbols::SID( (info >> shift) & mask ); |
1 | 1014 |
} |
1015 |
||
1016 |
vmSymbols::SID vmIntrinsics::signature_for(vmIntrinsics::ID id) { |
|
4562
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
1017 |
jlong info = intrinsic_info(id); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
1018 |
int shift = log2_FLAG_LIMIT, mask = right_n_bits(vmSymbols::log2_SID_LIMIT); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
1019 |
assert(((ID4(1021,1022,1023,15) >> shift) & mask) == 1023, ""); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
1020 |
return vmSymbols::SID( (info >> shift) & mask ); |
1 | 1021 |
} |
1022 |
||
1023 |
vmIntrinsics::Flags vmIntrinsics::flags_for(vmIntrinsics::ID id) { |
|
4562
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
1024 |
jlong info = intrinsic_info(id); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
1025 |
int shift = 0, mask = right_n_bits(log2_FLAG_LIMIT); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
1026 |
assert(((ID4(1021,1022,1023,15) >> shift) & mask) == 15, ""); |
5d93cb2d2090
6894206: JVM needs a way to traverse method handle structures
twisti
parents:
4450
diff
changeset
|
1027 |
return Flags( (info >> shift) & mask ); |
1 | 1028 |
} |
1029 |
||
1030 |
||
1031 |
#ifndef PRODUCT |
|
1032 |
// verify_method performs an extra check on a matched intrinsic method |
|
1033 |
||
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13391
diff
changeset
|
1034 |
static bool match_method(Method* m, Symbol* n, Symbol* s) { |
1 | 1035 |
return (m->name() == n && |
1036 |
m->signature() == s); |
|
1037 |
} |
|
1038 |
||
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13391
diff
changeset
|
1039 |
static vmIntrinsics::ID match_method_with_klass(Method* m, Symbol* mk) { |
1 | 1040 |
#define VM_INTRINSIC_MATCH(id, klassname, namepart, sigpart, flags) \ |
8076
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
1041 |
{ Symbol* k = vmSymbols::klassname(); \ |
1 | 1042 |
if (mk == k) { \ |
8076
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
1043 |
Symbol* n = vmSymbols::namepart(); \ |
96d498ec7ae1
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
7397
diff
changeset
|
1044 |
Symbol* s = vmSymbols::sigpart(); \ |
1 | 1045 |
if (match_method(m, n, s)) \ |
1046 |
return vmIntrinsics::id; \ |
|
1047 |
} } |
|
1048 |
VM_INTRINSICS_DO(VM_INTRINSIC_MATCH, |
|
1049 |
VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE); |
|
1050 |
return vmIntrinsics::_none; |
|
1051 |
#undef VM_INTRINSIC_MATCH |
|
1052 |
} |
|
1053 |
||
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13391
diff
changeset
|
1054 |
void vmIntrinsics::verify_method(ID actual_id, Method* m) { |
14391
df0a1573d5bd
8000725: NPG: method_holder() and pool_holder() and pool_holder field should be InstanceKlass
coleenp
parents:
13968
diff
changeset
|
1055 |
Symbol* mk = m->method_holder()->name(); |
1 | 1056 |
ID declared_id = match_method_with_klass(m, mk); |
1057 |
||
1058 |
if (declared_id == actual_id) return; // success |
|
1059 |
||
1060 |
if (declared_id == _none && actual_id != _none && mk == vmSymbols::java_lang_StrictMath()) { |
|
1061 |
// Here are a few special cases in StrictMath not declared in vmSymbols.hpp. |
|
1062 |
switch (actual_id) { |
|
1063 |
case _min: |
|
1064 |
case _max: |
|
1065 |
case _dsqrt: |
|
1066 |
declared_id = match_method_with_klass(m, vmSymbols::java_lang_Math()); |
|
1067 |
if (declared_id == actual_id) return; // acceptable alias |
|
1068 |
break; |
|
46630
75aa3e39d02c
8182299: Enable disabled clang warnings, build on OSX 10 + Xcode 8
jwilhelm
parents:
46560
diff
changeset
|
1069 |
default: |
75aa3e39d02c
8182299: Enable disabled clang warnings, build on OSX 10 + Xcode 8
jwilhelm
parents:
46560
diff
changeset
|
1070 |
break; |
1 | 1071 |
} |
1072 |
} |
|
1073 |
||
1074 |
const char* declared_name = name_at(declared_id); |
|
1075 |
const char* actual_name = name_at(actual_id); |
|
1076 |
methodHandle mh = m; |
|
1077 |
m = NULL; |
|
1078 |
ttyLocker ttyl; |
|
1079 |
if (xtty != NULL) { |
|
1080 |
xtty->begin_elem("intrinsic_misdeclared actual='%s' declared='%s'", |
|
1081 |
actual_name, declared_name); |
|
1082 |
xtty->method(mh); |
|
24424
2658d7834c6e
8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents:
22234
diff
changeset
|
1083 |
xtty->end_elem("%s", ""); |
1 | 1084 |
} |
1085 |
if (PrintMiscellaneous && (WizardMode || Verbose)) { |
|
1086 |
tty->print_cr("*** misidentified method; %s(%d) should be %s(%d):", |
|
1087 |
declared_name, declared_id, actual_name, actual_id); |
|
218
a0e996680b05
6667615: (Escape Analysis) extend MDO to cache arguments escape state
kvn
parents:
1
diff
changeset
|
1088 |
mh()->print_short_name(tty); |
1 | 1089 |
tty->cr(); |
1090 |
} |
|
1091 |
} |
|
1092 |
#endif //PRODUCT |