src/hotspot/share/opto/c2compiler.cpp
author chegar
Thu, 17 Oct 2019 20:54:25 +0100
branchdatagramsocketimpl-branch
changeset 58679 9c3209ff7550
parent 58678 9cf78a70fa4f
parent 58512 5185bc8dcbb1
permissions -rw-r--r--
datagramsocketimpl-branch: merge with default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
53582
881c5fbeb849 8218041: Assorted wrong/missing includes
rehn
parents: 53041
diff changeset
     2
 * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5353
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5353
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: 5353
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6180
diff changeset
    25
#include "precompiled.hpp"
53582
881c5fbeb849 8218041: Assorted wrong/missing includes
rehn
parents: 53041
diff changeset
    26
#include "runtime/handles.inline.hpp"
50113
caf115bb98ad 8199712: Flight Recorder
egahlin
parents: 47587
diff changeset
    27
#include "jfr/support/jfrIntrinsics.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6180
diff changeset
    28
#include "opto/c2compiler.hpp"
26796
666464578742 8015774: Add support for multiple code heaps
thartmann
parents: 25715
diff changeset
    29
#include "opto/compile.hpp"
25715
d5a8dbdc5150 8049325: Introduce and clean up umbrella headers for the files in the cpu subdirectories.
goetz
parents: 24673
diff changeset
    30
#include "opto/optoreg.hpp"
26796
666464578742 8015774: Add support for multiple code heaps
thartmann
parents: 25715
diff changeset
    31
#include "opto/output.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6180
diff changeset
    32
#include "opto/runtime.hpp"
50113
caf115bb98ad 8199712: Flight Recorder
egahlin
parents: 47587
diff changeset
    33
#include "utilities/macros.hpp"
caf115bb98ad 8199712: Flight Recorder
egahlin
parents: 47587
diff changeset
    34
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
// register information defined by ADLC
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
extern const char register_save_policy[];
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
extern const int  register_save_type[];
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
const char* C2Compiler::retry_no_subsuming_loads() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
  return "retry without subsuming loads";
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
}
211
e2b60448c234 6667610: (Escape Analysis) retry compilation without EA if it fails
kvn
parents: 1
diff changeset
    43
const char* C2Compiler::retry_no_escape_analysis() {
e2b60448c234 6667610: (Escape Analysis) retry compilation without EA if it fails
kvn
parents: 1
diff changeset
    44
  return "retry without escape analysis";
e2b60448c234 6667610: (Escape Analysis) retry compilation without EA if it fails
kvn
parents: 1
diff changeset
    45
}
28395
fbe08d791778 8055530: assert(_exits.control()->is_top() || !_gvn.type(ret_phi)->empty()) failed: return value must be well defined
roland
parents: 27706
diff changeset
    46
const char* C2Compiler::retry_class_loading_during_parsing() {
fbe08d791778 8055530: assert(_exits.control()->is_top() || !_gvn.type(ret_phi)->empty()) failed: return value must be well defined
roland
parents: 27706
diff changeset
    47
  return "retry class loading during parsing";
fbe08d791778 8055530: assert(_exits.control()->is_top() || !_gvn.type(ret_phi)->empty()) failed: return value must be well defined
roland
parents: 27706
diff changeset
    48
}
20707
b3b658c6d1f8 8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents: 17383
diff changeset
    49
bool C2Compiler::init_c2_runtime() {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
  // Check assumptions used while running ADLC
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
  Compile::adlc_verification();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
  assert(REG_COUNT <= ConcreteRegisterImpl::number_of_registers, "incompatible register counts");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
  for (int i = 0; i < ConcreteRegisterImpl::number_of_registers ; i++ ) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
      OptoReg::vm2opto[i] = OptoReg::Bad;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
  for( OptoReg::Name i=OptoReg::Name(0); i<OptoReg::Name(REG_COUNT); i = OptoReg::add(i,1) ) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
    VMReg r = OptoReg::as_VMReg(i);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
    if (r->is_valid()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
      OptoReg::vm2opto[r->value()] = i;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
  // Check that runtime and architecture description agree on callee-saved-floats
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
  bool callee_saved_floats = false;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
  for( OptoReg::Name i=OptoReg::Name(0); i<OptoReg::Name(_last_Mach_Reg); i = OptoReg::add(i,1) ) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
    // Is there a callee-saved float or double?
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
    if( register_save_policy[i] == 'E' /* callee-saved */ &&
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
       (register_save_type[i] == Op_RegF || register_save_type[i] == Op_RegD) ) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
      callee_saved_floats = true;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
  DEBUG_ONLY( Node::init_NodeProperty(); )
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
  Compile::pd_compiler2_init();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
  CompilerThread* thread = CompilerThread::current();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
20707
b3b658c6d1f8 8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents: 17383
diff changeset
    82
  HandleMark handle_mark(thread);
b3b658c6d1f8 8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents: 17383
diff changeset
    83
  return OptoRuntime::generate(thread->env());
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
void C2Compiler::initialize() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  // The first compiler thread that gets here will initialize the
20707
b3b658c6d1f8 8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents: 17383
diff changeset
    88
  // small amount of global state (and runtime stubs) that C2 needs.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
  // There is a race possible once at startup and then we're fine
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
  // Note that this is being called from a compiler thread not the
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
  // main startup thread.
20707
b3b658c6d1f8 8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents: 17383
diff changeset
    94
  if (should_perform_init()) {
b3b658c6d1f8 8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents: 17383
diff changeset
    95
    bool successful = C2Compiler::init_c2_runtime();
b3b658c6d1f8 8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents: 17383
diff changeset
    96
    int new_state = (successful) ? initialized : failed;
b3b658c6d1f8 8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents: 17383
diff changeset
    97
    set_state(new_state);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
33451
0712796e4039 8137167: JEP165: Compiler Control: Implementation task
neliasso
parents: 32581
diff changeset
   101
void C2Compiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci, DirectiveSet* directive) {
20707
b3b658c6d1f8 8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents: 17383
diff changeset
   102
  assert(is_initialized(), "Compiler thread must be initialized");
b3b658c6d1f8 8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents: 17383
diff changeset
   103
6180
53c1bf468c81 6973963: SEGV in ciBlock::start_bci() with EA
kvn
parents: 5547
diff changeset
   104
  bool subsume_loads = SubsumeLoads;
58512
5185bc8dcbb1 8230677: Should disable Escape Analysis if JVMTI capability can_get_owned_monitor_info was taken
rrich
parents: 58421
diff changeset
   105
  bool do_escape_analysis = DoEscapeAnalysis && !env->should_retain_local_variables()
5185bc8dcbb1 8230677: Should disable Escape Analysis if JVMTI capability can_get_owned_monitor_info was taken
rrich
parents: 58421
diff changeset
   106
                                             && !env->jvmti_can_get_owned_monitor_info();
17383
3665c0901a0d 6934604: enable parts of EliminateAutoBox by default
kvn
parents: 8921
diff changeset
   107
  bool eliminate_boxing = EliminateAutoBox;
33451
0712796e4039 8137167: JEP165: Compiler Control: Implementation task
neliasso
parents: 32581
diff changeset
   108
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
  while (!env->failing()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
    // Attempt to compile while subsuming loads into machine instructions.
33451
0712796e4039 8137167: JEP165: Compiler Control: Implementation task
neliasso
parents: 32581
diff changeset
   111
    Compile C(env, this, target, entry_bci, subsume_loads, do_escape_analysis, eliminate_boxing, directive);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
    // Check result and retry if appropriate.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
    if (C.failure_reason() != NULL) {
28395
fbe08d791778 8055530: assert(_exits.control()->is_top() || !_gvn.type(ret_phi)->empty()) failed: return value must be well defined
roland
parents: 27706
diff changeset
   115
      if (C.failure_reason_is(retry_class_loading_during_parsing())) {
fbe08d791778 8055530: assert(_exits.control()->is_top() || !_gvn.type(ret_phi)->empty()) failed: return value must be well defined
roland
parents: 27706
diff changeset
   116
        env->report_failure(C.failure_reason());
fbe08d791778 8055530: assert(_exits.control()->is_top() || !_gvn.type(ret_phi)->empty()) failed: return value must be well defined
roland
parents: 27706
diff changeset
   117
        continue;  // retry
fbe08d791778 8055530: assert(_exits.control()->is_top() || !_gvn.type(ret_phi)->empty()) failed: return value must be well defined
roland
parents: 27706
diff changeset
   118
      }
211
e2b60448c234 6667610: (Escape Analysis) retry compilation without EA if it fails
kvn
parents: 1
diff changeset
   119
      if (C.failure_reason_is(retry_no_subsuming_loads())) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
        assert(subsume_loads, "must make progress");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
        subsume_loads = false;
27706
3f10f4ac2bd6 8065339: Failed compilation does not always trigger a JFR event 'CompilerFailure'
thartmann
parents: 26913
diff changeset
   122
        env->report_failure(C.failure_reason());
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
        continue;  // retry
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
      }
211
e2b60448c234 6667610: (Escape Analysis) retry compilation without EA if it fails
kvn
parents: 1
diff changeset
   125
      if (C.failure_reason_is(retry_no_escape_analysis())) {
e2b60448c234 6667610: (Escape Analysis) retry compilation without EA if it fails
kvn
parents: 1
diff changeset
   126
        assert(do_escape_analysis, "must make progress");
e2b60448c234 6667610: (Escape Analysis) retry compilation without EA if it fails
kvn
parents: 1
diff changeset
   127
        do_escape_analysis = false;
27706
3f10f4ac2bd6 8065339: Failed compilation does not always trigger a JFR event 'CompilerFailure'
thartmann
parents: 26913
diff changeset
   128
        env->report_failure(C.failure_reason());
211
e2b60448c234 6667610: (Escape Analysis) retry compilation without EA if it fails
kvn
parents: 1
diff changeset
   129
        continue;  // retry
e2b60448c234 6667610: (Escape Analysis) retry compilation without EA if it fails
kvn
parents: 1
diff changeset
   130
      }
17383
3665c0901a0d 6934604: enable parts of EliminateAutoBox by default
kvn
parents: 8921
diff changeset
   131
      if (C.has_boxed_value()) {
3665c0901a0d 6934604: enable parts of EliminateAutoBox by default
kvn
parents: 8921
diff changeset
   132
        // Recompile without boxing elimination regardless failure reason.
3665c0901a0d 6934604: enable parts of EliminateAutoBox by default
kvn
parents: 8921
diff changeset
   133
        assert(eliminate_boxing, "must make progress");
3665c0901a0d 6934604: enable parts of EliminateAutoBox by default
kvn
parents: 8921
diff changeset
   134
        eliminate_boxing = false;
27706
3f10f4ac2bd6 8065339: Failed compilation does not always trigger a JFR event 'CompilerFailure'
thartmann
parents: 26913
diff changeset
   135
        env->report_failure(C.failure_reason());
17383
3665c0901a0d 6934604: enable parts of EliminateAutoBox by default
kvn
parents: 8921
diff changeset
   136
        continue;  // retry
3665c0901a0d 6934604: enable parts of EliminateAutoBox by default
kvn
parents: 8921
diff changeset
   137
      }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
      // Pass any other failure reason up to the ciEnv.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
      // Note that serious, irreversible failures are already logged
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
      // on the ciEnv via env->record_method_not_compilable().
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
      env->record_failure(C.failure_reason());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
    }
6180
53c1bf468c81 6973963: SEGV in ciBlock::start_bci() with EA
kvn
parents: 5547
diff changeset
   143
    if (StressRecompilation) {
53c1bf468c81 6973963: SEGV in ciBlock::start_bci() with EA
kvn
parents: 5547
diff changeset
   144
      if (subsume_loads) {
53c1bf468c81 6973963: SEGV in ciBlock::start_bci() with EA
kvn
parents: 5547
diff changeset
   145
        subsume_loads = false;
53c1bf468c81 6973963: SEGV in ciBlock::start_bci() with EA
kvn
parents: 5547
diff changeset
   146
        continue;  // retry
53c1bf468c81 6973963: SEGV in ciBlock::start_bci() with EA
kvn
parents: 5547
diff changeset
   147
      }
53c1bf468c81 6973963: SEGV in ciBlock::start_bci() with EA
kvn
parents: 5547
diff changeset
   148
      if (do_escape_analysis) {
53c1bf468c81 6973963: SEGV in ciBlock::start_bci() with EA
kvn
parents: 5547
diff changeset
   149
        do_escape_analysis = false;
53c1bf468c81 6973963: SEGV in ciBlock::start_bci() with EA
kvn
parents: 5547
diff changeset
   150
        continue;  // retry
53c1bf468c81 6973963: SEGV in ciBlock::start_bci() with EA
kvn
parents: 5547
diff changeset
   151
      }
53c1bf468c81 6973963: SEGV in ciBlock::start_bci() with EA
kvn
parents: 5547
diff changeset
   152
    }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
24673
2ec56802b829 8043638: Multiple compilation attempts break LogCompulation, lead to confusing PrintInlining output
roland
parents: 22894
diff changeset
   154
    // print inlining for last compilation only
2ec56802b829 8043638: Multiple compilation attempts break LogCompulation, lead to confusing PrintInlining output
roland
parents: 22894
diff changeset
   155
    C.dump_print_inlining();
2ec56802b829 8043638: Multiple compilation attempts break LogCompulation, lead to confusing PrintInlining output
roland
parents: 22894
diff changeset
   156
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
    // No retry; just break the loop.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
    break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
void C2Compiler::print_timers() {
26913
9ad70cd32368 8058968: Compiler time traces should be improved
shade
parents: 26796
diff changeset
   163
  Compile::print_timers();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
}
26796
666464578742 8015774: Add support for multiple code heaps
thartmann
parents: 25715
diff changeset
   165
33593
60764a78fa5c 8140274: methodHandles and constantPoolHandles should be passed as const references
coleenp
parents: 32581
diff changeset
   166
bool C2Compiler::is_intrinsic_supported(const methodHandle& method, bool is_virtual) {
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   167
  vmIntrinsics::ID id = method->intrinsic_id();
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   168
  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: 28395
diff changeset
   169
32371
8815f2d1447f 8133599: Unsafe.getAndSetObject() is no longer intrinsified by c2
roland
parents: 32085
diff changeset
   170
  if (id < vmIntrinsics::FIRST_ID || id > vmIntrinsics::LAST_COMPILER_INLINE) {
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   171
    return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   172
  }
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   173
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   174
  // Only Object.hashCode and Object.clone intrinsics implement also a virtual
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   175
  // dispatch because calling both methods is expensive but both methods are
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   176
  // frequently overridden. All other intrinsics implement only a non-virtual
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   177
  // dispatch.
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   178
  if (is_virtual) {
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   179
    switch (id) {
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   180
    case vmIntrinsics::_hashCode:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   181
    case vmIntrinsics::_clone:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   182
      break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   183
    default:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   184
      return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   185
    }
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   186
  }
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   187
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   188
  switch (id) {
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   189
  case vmIntrinsics::_compressStringC:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   190
  case vmIntrinsics::_compressStringB:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   191
    if (!Matcher::has_match_rule(Op_StrCompressedCopy)) return false;
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   192
    break;
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   193
  case vmIntrinsics::_inflateStringC:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   194
  case vmIntrinsics::_inflateStringB:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   195
    if (!Matcher::has_match_rule(Op_StrInflatedCopy)) return false;
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   196
    break;
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   197
  case vmIntrinsics::_compareToL:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   198
  case vmIntrinsics::_compareToU:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   199
  case vmIntrinsics::_compareToLU:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   200
  case vmIntrinsics::_compareToUL:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   201
    if (!Matcher::match_rule_supported(Op_StrComp)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   202
    break;
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   203
  case vmIntrinsics::_equalsL:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   204
  case vmIntrinsics::_equalsU:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   205
    if (!Matcher::match_rule_supported(Op_StrEquals)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   206
    break;
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   207
  case vmIntrinsics::_equalsB:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   208
  case vmIntrinsics::_equalsC:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   209
    if (!Matcher::match_rule_supported(Op_AryEq)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   210
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   211
  case vmIntrinsics::_copyMemory:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   212
    if (StubRoutines::unsafe_arraycopy() == NULL) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   213
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   214
  case vmIntrinsics::_encodeISOArray:
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   215
  case vmIntrinsics::_encodeByteISOArray:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   216
    if (!Matcher::match_rule_supported(Op_EncodeISOArray)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   217
    break;
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   218
  case vmIntrinsics::_hasNegatives:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   219
    if (!Matcher::match_rule_supported(Op_HasNegatives))  return false;
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   220
    break;
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   221
  case vmIntrinsics::_bitCount_i:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   222
    if (!Matcher::match_rule_supported(Op_PopCountI)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   223
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   224
  case vmIntrinsics::_bitCount_l:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   225
    if (!Matcher::match_rule_supported(Op_PopCountL)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   226
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   227
  case vmIntrinsics::_numberOfLeadingZeros_i:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   228
    if (!Matcher::match_rule_supported(Op_CountLeadingZerosI)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   229
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   230
  case vmIntrinsics::_numberOfLeadingZeros_l:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   231
    if (!Matcher::match_rule_supported(Op_CountLeadingZerosL)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   232
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   233
  case vmIntrinsics::_numberOfTrailingZeros_i:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   234
    if (!Matcher::match_rule_supported(Op_CountTrailingZerosI)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   235
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   236
  case vmIntrinsics::_numberOfTrailingZeros_l:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   237
    if (!Matcher::match_rule_supported(Op_CountTrailingZerosL)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   238
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   239
  case vmIntrinsics::_reverseBytes_c:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   240
    if (!Matcher::match_rule_supported(Op_ReverseBytesUS)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   241
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   242
  case vmIntrinsics::_reverseBytes_s:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   243
    if (!Matcher::match_rule_supported(Op_ReverseBytesS)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   244
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   245
  case vmIntrinsics::_reverseBytes_i:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   246
    if (!Matcher::match_rule_supported(Op_ReverseBytesI)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   247
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   248
  case vmIntrinsics::_reverseBytes_l:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   249
    if (!Matcher::match_rule_supported(Op_ReverseBytesL)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   250
    break;
36316
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   251
45514
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   252
  /* CompareAndSet, Object: */
52220
9c260a6b6471 8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents: 50860
diff changeset
   253
  case vmIntrinsics::_compareAndSetReference:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   254
#ifdef _LP64
36316
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   255
    if ( UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndSwapN)) return false;
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   256
    if (!UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndSwapP)) return false;
36316
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   257
#else
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   258
    if (!Matcher::match_rule_supported(Op_CompareAndSwapP)) return false;
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   259
#endif
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   260
    break;
52220
9c260a6b6471 8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents: 50860
diff changeset
   261
  case vmIntrinsics::_weakCompareAndSetReferencePlain:
9c260a6b6471 8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents: 50860
diff changeset
   262
  case vmIntrinsics::_weakCompareAndSetReferenceAcquire:
9c260a6b6471 8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents: 50860
diff changeset
   263
  case vmIntrinsics::_weakCompareAndSetReferenceRelease:
9c260a6b6471 8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents: 50860
diff changeset
   264
  case vmIntrinsics::_weakCompareAndSetReference:
36316
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   265
#ifdef _LP64
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   266
    if ( UseCompressedOops && !Matcher::match_rule_supported(Op_WeakCompareAndSwapN)) return false;
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   267
    if (!UseCompressedOops && !Matcher::match_rule_supported(Op_WeakCompareAndSwapP)) return false;
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   268
#else
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   269
    if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapP)) return false;
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   270
#endif
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   271
    break;
45514
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   272
  /* CompareAndSet, Long: */
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   273
  case vmIntrinsics::_compareAndSetLong:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   274
    if (!Matcher::match_rule_supported(Op_CompareAndSwapL)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   275
    break;
45514
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   276
  case vmIntrinsics::_weakCompareAndSetLongPlain:
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   277
  case vmIntrinsics::_weakCompareAndSetLongAcquire:
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   278
  case vmIntrinsics::_weakCompareAndSetLongRelease:
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   279
  case vmIntrinsics::_weakCompareAndSetLong:
36316
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   280
    if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapL)) return false;
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   281
    break;
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   282
45514
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   283
  /* CompareAndSet, Int: */
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   284
  case vmIntrinsics::_compareAndSetInt:
36316
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   285
    if (!Matcher::match_rule_supported(Op_CompareAndSwapI)) return false;
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   286
    break;
45514
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   287
  case vmIntrinsics::_weakCompareAndSetIntPlain:
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   288
  case vmIntrinsics::_weakCompareAndSetIntAcquire:
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   289
  case vmIntrinsics::_weakCompareAndSetIntRelease:
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   290
  case vmIntrinsics::_weakCompareAndSetInt:
46992
95000145dd81 8186666: Bug in the C2 matcher code
rraghavan
parents: 45514
diff changeset
   291
    if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapI)) return false;
36316
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   292
    break;
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   293
45514
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   294
  /* CompareAndSet, Byte: */
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   295
  case vmIntrinsics::_compareAndSetByte:
39419
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   296
    if (!Matcher::match_rule_supported(Op_CompareAndSwapB)) return false;
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   297
    break;
45514
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   298
  case vmIntrinsics::_weakCompareAndSetBytePlain:
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   299
  case vmIntrinsics::_weakCompareAndSetByteAcquire:
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   300
  case vmIntrinsics::_weakCompareAndSetByteRelease:
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   301
  case vmIntrinsics::_weakCompareAndSetByte:
39419
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   302
    if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapB)) return false;
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   303
    break;
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   304
45514
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   305
  /* CompareAndSet, Short: */
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   306
  case vmIntrinsics::_compareAndSetShort:
39419
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   307
    if (!Matcher::match_rule_supported(Op_CompareAndSwapS)) return false;
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   308
    break;
45514
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   309
  case vmIntrinsics::_weakCompareAndSetShortPlain:
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   310
  case vmIntrinsics::_weakCompareAndSetShortAcquire:
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   311
  case vmIntrinsics::_weakCompareAndSetShortRelease:
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   312
  case vmIntrinsics::_weakCompareAndSetShort:
39419
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   313
    if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapS)) return false;
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   314
    break;
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   315
36316
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   316
  /* CompareAndExchange, Object: */
52220
9c260a6b6471 8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents: 50860
diff changeset
   317
  case vmIntrinsics::_compareAndExchangeReference:
9c260a6b6471 8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents: 50860
diff changeset
   318
  case vmIntrinsics::_compareAndExchangeReferenceAcquire:
9c260a6b6471 8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents: 50860
diff changeset
   319
  case vmIntrinsics::_compareAndExchangeReferenceRelease:
36316
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   320
#ifdef _LP64
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   321
    if ( UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndExchangeN)) return false;
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   322
    if (!UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndExchangeP)) return false;
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   323
#else
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   324
    if (!Matcher::match_rule_supported(Op_CompareAndExchangeP)) return false;
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   325
#endif
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   326
    break;
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   327
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   328
  /* CompareAndExchange, Long: */
45514
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   329
  case vmIntrinsics::_compareAndExchangeLong:
36316
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   330
  case vmIntrinsics::_compareAndExchangeLongAcquire:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   331
  case vmIntrinsics::_compareAndExchangeLongRelease:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   332
    if (!Matcher::match_rule_supported(Op_CompareAndExchangeL)) return false;
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   333
    break;
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   334
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   335
  /* CompareAndExchange, Int: */
45514
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   336
  case vmIntrinsics::_compareAndExchangeInt:
36316
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   337
  case vmIntrinsics::_compareAndExchangeIntAcquire:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   338
  case vmIntrinsics::_compareAndExchangeIntRelease:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   339
    if (!Matcher::match_rule_supported(Op_CompareAndExchangeI)) return false;
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   340
    break;
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   341
39419
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   342
  /* CompareAndExchange, Byte: */
45514
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   343
  case vmIntrinsics::_compareAndExchangeByte:
39419
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   344
  case vmIntrinsics::_compareAndExchangeByteAcquire:
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   345
  case vmIntrinsics::_compareAndExchangeByteRelease:
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   346
    if (!Matcher::match_rule_supported(Op_CompareAndExchangeB)) return false;
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   347
    break;
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   348
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   349
  /* CompareAndExchange, Short: */
45514
0fc9cc73ce45 8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents: 42037
diff changeset
   350
  case vmIntrinsics::_compareAndExchangeShort:
39419
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   351
  case vmIntrinsics::_compareAndExchangeShortAcquire:
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   352
  case vmIntrinsics::_compareAndExchangeShortRelease:
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   353
    if (!Matcher::match_rule_supported(Op_CompareAndExchangeS)) return false;
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   354
    break;
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   355
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   356
  case vmIntrinsics::_getAndAddByte:
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   357
    if (!Matcher::match_rule_supported(Op_GetAndAddB)) return false;
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   358
    break;
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   359
  case vmIntrinsics::_getAndAddShort:
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   360
    if (!Matcher::match_rule_supported(Op_GetAndAddS)) return false;
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   361
    break;
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   362
  case vmIntrinsics::_getAndAddInt:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   363
    if (!Matcher::match_rule_supported(Op_GetAndAddI)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   364
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   365
  case vmIntrinsics::_getAndAddLong:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   366
    if (!Matcher::match_rule_supported(Op_GetAndAddL)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   367
    break;
39419
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   368
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   369
  case vmIntrinsics::_getAndSetByte:
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   370
    if (!Matcher::match_rule_supported(Op_GetAndSetB)) return false;
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   371
    break;
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   372
  case vmIntrinsics::_getAndSetShort:
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   373
    if (!Matcher::match_rule_supported(Op_GetAndSetS)) return false;
cc993a4ab581 8157726: VarHandles/Unsafe should support sub-word atomic ops
shade
parents: 38246
diff changeset
   374
    break;
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   375
  case vmIntrinsics::_getAndSetInt:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   376
    if (!Matcher::match_rule_supported(Op_GetAndSetI)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   377
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   378
  case vmIntrinsics::_getAndSetLong:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   379
    if (!Matcher::match_rule_supported(Op_GetAndSetL)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   380
    break;
52220
9c260a6b6471 8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents: 50860
diff changeset
   381
  case vmIntrinsics::_getAndSetReference:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   382
#ifdef _LP64
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   383
    if (!UseCompressedOops && !Matcher::match_rule_supported(Op_GetAndSetP)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   384
    if (UseCompressedOops && !Matcher::match_rule_supported(Op_GetAndSetN)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   385
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   386
#else
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   387
    if (!Matcher::match_rule_supported(Op_GetAndSetP)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   388
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   389
#endif
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   390
  case vmIntrinsics::_incrementExactI:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   391
  case vmIntrinsics::_addExactI:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   392
    if (!Matcher::match_rule_supported(Op_OverflowAddI)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   393
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   394
  case vmIntrinsics::_incrementExactL:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   395
  case vmIntrinsics::_addExactL:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   396
    if (!Matcher::match_rule_supported(Op_OverflowAddL)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   397
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   398
  case vmIntrinsics::_decrementExactI:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   399
  case vmIntrinsics::_subtractExactI:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   400
    if (!Matcher::match_rule_supported(Op_OverflowSubI)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   401
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   402
  case vmIntrinsics::_decrementExactL:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   403
  case vmIntrinsics::_subtractExactL:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   404
    if (!Matcher::match_rule_supported(Op_OverflowSubL)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   405
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   406
  case vmIntrinsics::_negateExactI:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   407
    if (!Matcher::match_rule_supported(Op_OverflowSubI)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   408
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   409
  case vmIntrinsics::_negateExactL:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   410
    if (!Matcher::match_rule_supported(Op_OverflowSubL)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   411
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   412
  case vmIntrinsics::_multiplyExactI:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   413
    if (!Matcher::match_rule_supported(Op_OverflowMulI)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   414
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   415
  case vmIntrinsics::_multiplyExactL:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   416
    if (!Matcher::match_rule_supported(Op_OverflowMulL)) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   417
    break;
47587
bf73ca31add9 8187684: Intrinsify Math.multiplyHigh(long, long)
dpochepk
parents: 47216
diff changeset
   418
  case vmIntrinsics::_multiplyHigh:
bf73ca31add9 8187684: Intrinsify Math.multiplyHigh(long, long)
dpochepk
parents: 47216
diff changeset
   419
    if (!Matcher::match_rule_supported(Op_MulHiL)) return false;
bf73ca31add9 8187684: Intrinsify Math.multiplyHigh(long, long)
dpochepk
parents: 47216
diff changeset
   420
    break;
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   421
  case vmIntrinsics::_getCallerClass:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   422
    if (SystemDictionary::reflect_CallerSensitive_klass() == NULL) return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   423
    break;
38017
55047d16f141 8147844: new method j.l.Runtime.onSpinWait() and the corresponding x86 hotspot instrinsic
ikrylov
parents: 36827
diff changeset
   424
  case vmIntrinsics::_onSpinWait:
55047d16f141 8147844: new method j.l.Runtime.onSpinWait() and the corresponding x86 hotspot instrinsic
ikrylov
parents: 36827
diff changeset
   425
    if (!Matcher::match_rule_supported(Op_OnSpinWait)) return false;
55047d16f141 8147844: new method j.l.Runtime.onSpinWait() and the corresponding x86 hotspot instrinsic
ikrylov
parents: 36827
diff changeset
   426
    break;
41323
ddd5600d4762 8154122: Intrinsify fused mac operations
vdeshpande
parents: 39419
diff changeset
   427
  case vmIntrinsics::_fmaD:
ddd5600d4762 8154122: Intrinsify fused mac operations
vdeshpande
parents: 39419
diff changeset
   428
    if (!UseFMA || !Matcher::match_rule_supported(Op_FmaD)) return false;
ddd5600d4762 8154122: Intrinsify fused mac operations
vdeshpande
parents: 39419
diff changeset
   429
    break;
ddd5600d4762 8154122: Intrinsify fused mac operations
vdeshpande
parents: 39419
diff changeset
   430
  case vmIntrinsics::_fmaF:
ddd5600d4762 8154122: Intrinsify fused mac operations
vdeshpande
parents: 39419
diff changeset
   431
    if (!UseFMA || !Matcher::match_rule_supported(Op_FmaF)) return false;
ddd5600d4762 8154122: Intrinsify fused mac operations
vdeshpande
parents: 39419
diff changeset
   432
    break;
52979
7384e00d5860 8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents: 52325
diff changeset
   433
  case vmIntrinsics::_isDigit:
7384e00d5860 8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents: 52325
diff changeset
   434
    if (!Matcher::match_rule_supported(Op_Digit)) return false;
7384e00d5860 8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents: 52325
diff changeset
   435
    break;
7384e00d5860 8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents: 52325
diff changeset
   436
  case vmIntrinsics::_isLowerCase:
7384e00d5860 8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents: 52325
diff changeset
   437
    if (!Matcher::match_rule_supported(Op_LowerCase)) return false;
7384e00d5860 8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents: 52325
diff changeset
   438
    break;
7384e00d5860 8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents: 52325
diff changeset
   439
  case vmIntrinsics::_isUpperCase:
7384e00d5860 8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents: 52325
diff changeset
   440
    if (!Matcher::match_rule_supported(Op_UpperCase)) return false;
7384e00d5860 8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents: 52325
diff changeset
   441
    break;
7384e00d5860 8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents: 52325
diff changeset
   442
  case vmIntrinsics::_isWhitespace:
7384e00d5860 8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents: 52325
diff changeset
   443
    if (!Matcher::match_rule_supported(Op_Whitespace)) return false;
7384e00d5860 8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
mhorie
parents: 52325
diff changeset
   444
    break;
53041
f15af1e2c683 8212043: Add floating-point Math.min/max intrinsics
pli
parents: 52979
diff changeset
   445
  case vmIntrinsics::_maxF:
f15af1e2c683 8212043: Add floating-point Math.min/max intrinsics
pli
parents: 52979
diff changeset
   446
    if (!Matcher::match_rule_supported(Op_MaxF)) return false;
f15af1e2c683 8212043: Add floating-point Math.min/max intrinsics
pli
parents: 52979
diff changeset
   447
    break;
f15af1e2c683 8212043: Add floating-point Math.min/max intrinsics
pli
parents: 52979
diff changeset
   448
  case vmIntrinsics::_minF:
f15af1e2c683 8212043: Add floating-point Math.min/max intrinsics
pli
parents: 52979
diff changeset
   449
    if (!Matcher::match_rule_supported(Op_MinF)) return false;
f15af1e2c683 8212043: Add floating-point Math.min/max intrinsics
pli
parents: 52979
diff changeset
   450
    break;
f15af1e2c683 8212043: Add floating-point Math.min/max intrinsics
pli
parents: 52979
diff changeset
   451
  case vmIntrinsics::_maxD:
f15af1e2c683 8212043: Add floating-point Math.min/max intrinsics
pli
parents: 52979
diff changeset
   452
    if (!Matcher::match_rule_supported(Op_MaxD)) return false;
f15af1e2c683 8212043: Add floating-point Math.min/max intrinsics
pli
parents: 52979
diff changeset
   453
    break;
f15af1e2c683 8212043: Add floating-point Math.min/max intrinsics
pli
parents: 52979
diff changeset
   454
  case vmIntrinsics::_minD:
f15af1e2c683 8212043: Add floating-point Math.min/max intrinsics
pli
parents: 52979
diff changeset
   455
    if (!Matcher::match_rule_supported(Op_MinD)) return false;
f15af1e2c683 8212043: Add floating-point Math.min/max intrinsics
pli
parents: 52979
diff changeset
   456
    break;
57804
9b7b9f16dfd9 8224974: Implement JEP 352
adinn
parents: 57786
diff changeset
   457
  case vmIntrinsics::_writeback0:
9b7b9f16dfd9 8224974: Implement JEP 352
adinn
parents: 57786
diff changeset
   458
    if (!Matcher::match_rule_supported(Op_CacheWB)) return false;
9b7b9f16dfd9 8224974: Implement JEP 352
adinn
parents: 57786
diff changeset
   459
    break;
9b7b9f16dfd9 8224974: Implement JEP 352
adinn
parents: 57786
diff changeset
   460
  case vmIntrinsics::_writebackPreSync0:
9b7b9f16dfd9 8224974: Implement JEP 352
adinn
parents: 57786
diff changeset
   461
    if (!Matcher::match_rule_supported(Op_CacheWBPreSync)) return false;
9b7b9f16dfd9 8224974: Implement JEP 352
adinn
parents: 57786
diff changeset
   462
    break;
9b7b9f16dfd9 8224974: Implement JEP 352
adinn
parents: 57786
diff changeset
   463
  case vmIntrinsics::_writebackPostSync0:
9b7b9f16dfd9 8224974: Implement JEP 352
adinn
parents: 57786
diff changeset
   464
    if (!Matcher::match_rule_supported(Op_CacheWBPostSync)) return false;
9b7b9f16dfd9 8224974: Implement JEP 352
adinn
parents: 57786
diff changeset
   465
    break;
58421
6fc57e391539 8226721: Missing intrinsics for Math.ceil, floor, rint
neliasso
parents: 57804
diff changeset
   466
  case vmIntrinsics::_rint:
6fc57e391539 8226721: Missing intrinsics for Math.ceil, floor, rint
neliasso
parents: 57804
diff changeset
   467
  case vmIntrinsics::_ceil:
6fc57e391539 8226721: Missing intrinsics for Math.ceil, floor, rint
neliasso
parents: 57804
diff changeset
   468
  case vmIntrinsics::_floor:
6fc57e391539 8226721: Missing intrinsics for Math.ceil, floor, rint
neliasso
parents: 57804
diff changeset
   469
    if (!Matcher::match_rule_supported(Op_RoundDoubleMode)) return false;
6fc57e391539 8226721: Missing intrinsics for Math.ceil, floor, rint
neliasso
parents: 57804
diff changeset
   470
    break;
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   471
  case vmIntrinsics::_hashCode:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   472
  case vmIntrinsics::_identityHashCode:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   473
  case vmIntrinsics::_getClass:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   474
  case vmIntrinsics::_dsin:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   475
  case vmIntrinsics::_dcos:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   476
  case vmIntrinsics::_dtan:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   477
  case vmIntrinsics::_dabs:
54750
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53582
diff changeset
   478
  case vmIntrinsics::_fabs:
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53582
diff changeset
   479
  case vmIntrinsics::_iabs:
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53582
diff changeset
   480
  case vmIntrinsics::_labs:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   481
  case vmIntrinsics::_datan2:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   482
  case vmIntrinsics::_dsqrt:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   483
  case vmIntrinsics::_dexp:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   484
  case vmIntrinsics::_dlog:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   485
  case vmIntrinsics::_dlog10:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   486
  case vmIntrinsics::_dpow:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   487
  case vmIntrinsics::_min:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   488
  case vmIntrinsics::_max:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   489
  case vmIntrinsics::_arraycopy:
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   490
  case vmIntrinsics::_indexOfL:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   491
  case vmIntrinsics::_indexOfU:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   492
  case vmIntrinsics::_indexOfUL:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   493
  case vmIntrinsics::_indexOfIL:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   494
  case vmIntrinsics::_indexOfIU:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   495
  case vmIntrinsics::_indexOfIUL:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   496
  case vmIntrinsics::_indexOfU_char:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   497
  case vmIntrinsics::_toBytesStringU:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   498
  case vmIntrinsics::_getCharsStringU:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   499
  case vmIntrinsics::_getCharStringU:
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33451
diff changeset
   500
  case vmIntrinsics::_putCharStringU:
52220
9c260a6b6471 8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents: 50860
diff changeset
   501
  case vmIntrinsics::_getReference:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   502
  case vmIntrinsics::_getBoolean:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   503
  case vmIntrinsics::_getByte:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   504
  case vmIntrinsics::_getShort:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   505
  case vmIntrinsics::_getChar:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   506
  case vmIntrinsics::_getInt:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   507
  case vmIntrinsics::_getLong:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   508
  case vmIntrinsics::_getFloat:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   509
  case vmIntrinsics::_getDouble:
52220
9c260a6b6471 8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents: 50860
diff changeset
   510
  case vmIntrinsics::_putReference:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   511
  case vmIntrinsics::_putBoolean:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   512
  case vmIntrinsics::_putByte:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   513
  case vmIntrinsics::_putShort:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   514
  case vmIntrinsics::_putChar:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   515
  case vmIntrinsics::_putInt:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   516
  case vmIntrinsics::_putLong:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   517
  case vmIntrinsics::_putFloat:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   518
  case vmIntrinsics::_putDouble:
52220
9c260a6b6471 8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents: 50860
diff changeset
   519
  case vmIntrinsics::_getReferenceVolatile:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   520
  case vmIntrinsics::_getBooleanVolatile:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   521
  case vmIntrinsics::_getByteVolatile:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   522
  case vmIntrinsics::_getShortVolatile:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   523
  case vmIntrinsics::_getCharVolatile:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   524
  case vmIntrinsics::_getIntVolatile:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   525
  case vmIntrinsics::_getLongVolatile:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   526
  case vmIntrinsics::_getFloatVolatile:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   527
  case vmIntrinsics::_getDoubleVolatile:
52220
9c260a6b6471 8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents: 50860
diff changeset
   528
  case vmIntrinsics::_putReferenceVolatile:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   529
  case vmIntrinsics::_putBooleanVolatile:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   530
  case vmIntrinsics::_putByteVolatile:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   531
  case vmIntrinsics::_putShortVolatile:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   532
  case vmIntrinsics::_putCharVolatile:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   533
  case vmIntrinsics::_putIntVolatile:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   534
  case vmIntrinsics::_putLongVolatile:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   535
  case vmIntrinsics::_putFloatVolatile:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   536
  case vmIntrinsics::_putDoubleVolatile:
52220
9c260a6b6471 8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents: 50860
diff changeset
   537
  case vmIntrinsics::_getReferenceAcquire:
36316
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   538
  case vmIntrinsics::_getBooleanAcquire:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   539
  case vmIntrinsics::_getByteAcquire:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   540
  case vmIntrinsics::_getShortAcquire:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   541
  case vmIntrinsics::_getCharAcquire:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   542
  case vmIntrinsics::_getIntAcquire:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   543
  case vmIntrinsics::_getLongAcquire:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   544
  case vmIntrinsics::_getFloatAcquire:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   545
  case vmIntrinsics::_getDoubleAcquire:
52220
9c260a6b6471 8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents: 50860
diff changeset
   546
  case vmIntrinsics::_putReferenceRelease:
36316
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   547
  case vmIntrinsics::_putBooleanRelease:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   548
  case vmIntrinsics::_putByteRelease:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   549
  case vmIntrinsics::_putShortRelease:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   550
  case vmIntrinsics::_putCharRelease:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   551
  case vmIntrinsics::_putIntRelease:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   552
  case vmIntrinsics::_putLongRelease:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   553
  case vmIntrinsics::_putFloatRelease:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   554
  case vmIntrinsics::_putDoubleRelease:
52220
9c260a6b6471 8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents: 50860
diff changeset
   555
  case vmIntrinsics::_getReferenceOpaque:
36316
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   556
  case vmIntrinsics::_getBooleanOpaque:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   557
  case vmIntrinsics::_getByteOpaque:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   558
  case vmIntrinsics::_getShortOpaque:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   559
  case vmIntrinsics::_getCharOpaque:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   560
  case vmIntrinsics::_getIntOpaque:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   561
  case vmIntrinsics::_getLongOpaque:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   562
  case vmIntrinsics::_getFloatOpaque:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   563
  case vmIntrinsics::_getDoubleOpaque:
52220
9c260a6b6471 8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents: 50860
diff changeset
   564
  case vmIntrinsics::_putReferenceOpaque:
36316
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   565
  case vmIntrinsics::_putBooleanOpaque:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   566
  case vmIntrinsics::_putByteOpaque:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   567
  case vmIntrinsics::_putShortOpaque:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   568
  case vmIntrinsics::_putCharOpaque:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   569
  case vmIntrinsics::_putIntOpaque:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   570
  case vmIntrinsics::_putLongOpaque:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   571
  case vmIntrinsics::_putFloatOpaque:
7a83de7aabca 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
shade
parents: 35154
diff changeset
   572
  case vmIntrinsics::_putDoubleOpaque:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   573
  case vmIntrinsics::_getShortUnaligned:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   574
  case vmIntrinsics::_getCharUnaligned:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   575
  case vmIntrinsics::_getIntUnaligned:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   576
  case vmIntrinsics::_getLongUnaligned:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   577
  case vmIntrinsics::_putShortUnaligned:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   578
  case vmIntrinsics::_putCharUnaligned:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   579
  case vmIntrinsics::_putIntUnaligned:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   580
  case vmIntrinsics::_putLongUnaligned:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   581
  case vmIntrinsics::_loadFence:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   582
  case vmIntrinsics::_storeFence:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   583
  case vmIntrinsics::_fullFence:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   584
  case vmIntrinsics::_currentThread:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   585
  case vmIntrinsics::_isInterrupted:
50113
caf115bb98ad 8199712: Flight Recorder
egahlin
parents: 47587
diff changeset
   586
#ifdef JFR_HAVE_INTRINSICS
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   587
  case vmIntrinsics::_counterTime:
40899
d7140c75c2c6 8163589: Add back class id intrinsic method for event based tracing
rehn
parents: 39419
diff changeset
   588
  case vmIntrinsics::_getClassId:
50113
caf115bb98ad 8199712: Flight Recorder
egahlin
parents: 47587
diff changeset
   589
  case vmIntrinsics::_getEventWriter:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   590
#endif
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   591
  case vmIntrinsics::_currentTimeMillis:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   592
  case vmIntrinsics::_nanoTime:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   593
  case vmIntrinsics::_allocateInstance:
36553
203b2b5d149b 8150465: Unsafe methods to produce uninitialized arrays
shade
parents: 36316
diff changeset
   594
  case vmIntrinsics::_allocateUninitializedArray:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   595
  case vmIntrinsics::_newArray:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   596
  case vmIntrinsics::_getLength:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   597
  case vmIntrinsics::_copyOf:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   598
  case vmIntrinsics::_copyOfRange:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   599
  case vmIntrinsics::_clone:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   600
  case vmIntrinsics::_isAssignableFrom:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   601
  case vmIntrinsics::_isInstance:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   602
  case vmIntrinsics::_getModifiers:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   603
  case vmIntrinsics::_isInterface:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   604
  case vmIntrinsics::_isArray:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   605
  case vmIntrinsics::_isPrimitive:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   606
  case vmIntrinsics::_getSuperclass:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   607
  case vmIntrinsics::_getClassAccessFlags:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   608
  case vmIntrinsics::_floatToRawIntBits:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   609
  case vmIntrinsics::_floatToIntBits:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   610
  case vmIntrinsics::_intBitsToFloat:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   611
  case vmIntrinsics::_doubleToRawLongBits:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   612
  case vmIntrinsics::_doubleToLongBits:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   613
  case vmIntrinsics::_longBitsToDouble:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   614
  case vmIntrinsics::_Reference_get:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   615
  case vmIntrinsics::_Class_cast:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   616
  case vmIntrinsics::_aescrypt_encryptBlock:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   617
  case vmIntrinsics::_aescrypt_decryptBlock:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   618
  case vmIntrinsics::_cipherBlockChaining_encryptAESCrypt:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   619
  case vmIntrinsics::_cipherBlockChaining_decryptAESCrypt:
57786
948ac3112da8 8225625: AES Electronic Codebook (ECB) encryption and decryption optimization using AVX512 + VAES instructions
srukmannagar
parents: 54750
diff changeset
   620
  case vmIntrinsics::_electronicCodeBook_encryptAESCrypt:
948ac3112da8 8225625: AES Electronic Codebook (ECB) encryption and decryption optimization using AVX512 + VAES instructions
srukmannagar
parents: 54750
diff changeset
   621
  case vmIntrinsics::_electronicCodeBook_decryptAESCrypt:
35154
a9b3c1984a01 8143925: Enhancing CounterMode.crypt() for AES
kvn
parents: 35110
diff changeset
   622
  case vmIntrinsics::_counterMode_AESCrypt:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   623
  case vmIntrinsics::_sha_implCompress:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   624
  case vmIntrinsics::_sha2_implCompress:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   625
  case vmIntrinsics::_sha5_implCompress:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   626
  case vmIntrinsics::_digestBase_implCompressMB:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   627
  case vmIntrinsics::_multiplyToLen:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   628
  case vmIntrinsics::_squareToLen:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   629
  case vmIntrinsics::_mulAdd:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   630
  case vmIntrinsics::_montgomeryMultiply:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   631
  case vmIntrinsics::_montgomerySquare:
35110
f19bcdf40799 8143355: Update for addition of vectorizedMismatch intrinsic for x86
kvn
parents: 34186
diff changeset
   632
  case vmIntrinsics::_vectorizedMismatch:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   633
  case vmIntrinsics::_ghash_processBlocks:
50860
480a96a43b62 8205528: Base64 encoding algorithm using AVX512 instructions
kvn
parents: 50113
diff changeset
   634
  case vmIntrinsics::_base64_encodeBlock:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   635
  case vmIntrinsics::_updateCRC32:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   636
  case vmIntrinsics::_updateBytesCRC32:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   637
  case vmIntrinsics::_updateByteBufferCRC32:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   638
  case vmIntrinsics::_updateBytesCRC32C:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   639
  case vmIntrinsics::_updateDirectByteBufferCRC32C:
32581
632402f18fe6 8132081: C2 support for Adler32 on SPARC
kvn
parents: 32371
diff changeset
   640
  case vmIntrinsics::_updateBytesAdler32:
632402f18fe6 8132081: C2 support for Adler32 on SPARC
kvn
parents: 32371
diff changeset
   641
  case vmIntrinsics::_updateByteBufferAdler32:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   642
  case vmIntrinsics::_profileBoolean:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   643
  case vmIntrinsics::_isCompileConstant:
38240
28e0cafd5222 8155794: Move Objects.checkIndex BiFunction accepting methods to an internal package
psandoz
parents: 38017
diff changeset
   644
  case vmIntrinsics::_Preconditions_checkIndex:
31962
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   645
    break;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   646
  default:
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   647
    return false;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   648
  }
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   649
  return true;
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   650
}
d05e0a4d1b43 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents: 28395
diff changeset
   651
52325
0451e0a2f1f5 8177899: Tests fail due to code cache exhaustion on machines with many cores
thartmann
parents: 52220
diff changeset
   652
int C2Compiler::initial_code_buffer_size(int const_size) {
0451e0a2f1f5 8177899: Tests fail due to code cache exhaustion on machines with many cores
thartmann
parents: 52220
diff changeset
   653
  // See Compile::init_scratch_buffer_blob
0451e0a2f1f5 8177899: Tests fail due to code cache exhaustion on machines with many cores
thartmann
parents: 52220
diff changeset
   654
  int locs_size = sizeof(relocInfo) * Compile::MAX_locs_size;
0451e0a2f1f5 8177899: Tests fail due to code cache exhaustion on machines with many cores
thartmann
parents: 52220
diff changeset
   655
  int slop = 2 * CodeSection::end_slop(); // space between sections
0451e0a2f1f5 8177899: Tests fail due to code cache exhaustion on machines with many cores
thartmann
parents: 52220
diff changeset
   656
  return Compile::MAX_inst_size + Compile::MAX_stubs_size + const_size + slop + locs_size;
26796
666464578742 8015774: Add support for multiple code heaps
thartmann
parents: 25715
diff changeset
   657
}