< prev index next >

src/share/vm/opto/c2compiler.cpp

Print this page




  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "opto/c2compiler.hpp"
  27 #include "opto/compile.hpp"
  28 #include "opto/optoreg.hpp"
  29 #include "opto/output.hpp"
  30 #include "opto/runtime.hpp"
  31 
  32 // register information defined by ADLC
  33 extern const char register_save_policy[];
  34 extern const int  register_save_type[];
  35 
  36 const char* C2Compiler::retry_no_subsuming_loads() {
  37   return "retry without subsuming loads";
  38 }
  39 const char* C2Compiler::retry_no_escape_analysis() {
  40   return "retry without escape analysis";
  41 }
  42 const char* C2Compiler::retry_class_loading_during_parsing() {
  43   return "retry class loading during parsing";
  44 }
  45 bool C2Compiler::init_c2_runtime() {
  46 
  47   // Check assumptions used while running ADLC
  48   Compile::adlc_verification();
  49   assert(REG_COUNT <= ConcreteRegisterImpl::number_of_registers, "incompatible register counts");
  50 
  51   for (int i = 0; i < ConcreteRegisterImpl::number_of_registers ; i++ ) {
  52       OptoReg::vm2opto[i] = OptoReg::Bad;
  53   }
  54 
  55   for( OptoReg::Name i=OptoReg::Name(0); i<OptoReg::Name(REG_COUNT); i = OptoReg::add(i,1) ) {
  56     VMReg r = OptoReg::as_VMReg(i);
  57     if (r->is_valid()) {
  58       OptoReg::vm2opto[r->value()] = i;
  59     }
  60   }
  61 
  62   // Check that runtime and architecture description agree on callee-saved-floats
  63   bool callee_saved_floats = false;
  64   for( OptoReg::Name i=OptoReg::Name(0); i<OptoReg::Name(_last_Mach_Reg); i = OptoReg::add(i,1) ) {
  65     // Is there a callee-saved float or double?
  66     if( register_save_policy[i] == 'E' /* callee-saved */ &&
  67        (register_save_type[i] == Op_RegF || register_save_type[i] == Op_RegD) ) {
  68       callee_saved_floats = true;
  69     }
  70   }
  71 
  72   DEBUG_ONLY( Node::init_NodeProperty(); )
  73 
  74   Compile::pd_compiler2_init();
  75 
  76   CompilerThread* thread = CompilerThread::current();
  77 
  78   HandleMark handle_mark(thread);
  79   return OptoRuntime::generate(thread->env());
  80 }
  81 
  82 void C2Compiler::initialize() {
  83   // The first compiler thread that gets here will initialize the
  84   // small amount of global state (and runtime stubs) that C2 needs.
  85 
  86   // There is a race possible once at startup and then we're fine
  87 


 166     return false;
 167   }
 168 
 169   // Only Object.hashCode and Object.clone intrinsics implement also a virtual
 170   // dispatch because calling both methods is expensive but both methods are
 171   // frequently overridden. All other intrinsics implement only a non-virtual
 172   // dispatch.
 173   if (is_virtual) {
 174     switch (id) {
 175     case vmIntrinsics::_hashCode:
 176     case vmIntrinsics::_clone:
 177       break;
 178     default:
 179       return false;
 180     }
 181   }
 182 
 183   switch (id) {
 184   case vmIntrinsics::_compressStringC:
 185   case vmIntrinsics::_compressStringB:
 186     if (!Matcher::has_match_rule(Op_StrCompressedCopy)) return false;
 187     break;
 188   case vmIntrinsics::_inflateStringC:
 189   case vmIntrinsics::_inflateStringB:
 190     if (!Matcher::has_match_rule(Op_StrInflatedCopy)) return false;
 191     break;
 192   case vmIntrinsics::_compareToL:
 193   case vmIntrinsics::_compareToU:
 194   case vmIntrinsics::_compareToLU:
 195   case vmIntrinsics::_compareToUL:
 196     if (!Matcher::match_rule_supported(Op_StrComp)) return false;
 197     break;
 198   case vmIntrinsics::_equalsL:
 199   case vmIntrinsics::_equalsU:
 200     if (!Matcher::match_rule_supported(Op_StrEquals)) return false;
 201     break;
 202   case vmIntrinsics::_equalsB:
 203   case vmIntrinsics::_equalsC:
 204     if (!Matcher::match_rule_supported(Op_AryEq)) return false;
 205     break;
 206   case vmIntrinsics::_copyMemory:
 207     if (StubRoutines::unsafe_arraycopy() == NULL) return false;
 208     break;
 209   case vmIntrinsics::_encodeISOArray:
 210   case vmIntrinsics::_encodeByteISOArray:
 211     if (!Matcher::match_rule_supported(Op_EncodeISOArray)) return false;
 212     break;
 213   case vmIntrinsics::_hasNegatives:
 214     if (!Matcher::match_rule_supported(Op_HasNegatives))  return false;
 215     break;
 216   case vmIntrinsics::_bitCount_i:
 217     if (!Matcher::match_rule_supported(Op_PopCountI)) return false;
 218     break;
 219   case vmIntrinsics::_bitCount_l:
 220     if (!Matcher::match_rule_supported(Op_PopCountL)) return false;
 221     break;
 222   case vmIntrinsics::_numberOfLeadingZeros_i:
 223     if (!Matcher::match_rule_supported(Op_CountLeadingZerosI)) return false;
 224     break;
 225   case vmIntrinsics::_numberOfLeadingZeros_l:
 226     if (!Matcher::match_rule_supported(Op_CountLeadingZerosL)) return false;
 227     break;
 228   case vmIntrinsics::_numberOfTrailingZeros_i:
 229     if (!Matcher::match_rule_supported(Op_CountTrailingZerosI)) return false;
 230     break;
 231   case vmIntrinsics::_numberOfTrailingZeros_l:
 232     if (!Matcher::match_rule_supported(Op_CountTrailingZerosL)) return false;
 233     break;
 234   case vmIntrinsics::_reverseBytes_c:
 235     if (!Matcher::match_rule_supported(Op_ReverseBytesUS)) return false;
 236     break;
 237   case vmIntrinsics::_reverseBytes_s:
 238     if (!Matcher::match_rule_supported(Op_ReverseBytesS)) return false;
 239     break;
 240   case vmIntrinsics::_reverseBytes_i:
 241     if (!Matcher::match_rule_supported(Op_ReverseBytesI)) return false;
 242     break;
 243   case vmIntrinsics::_reverseBytes_l:
 244     if (!Matcher::match_rule_supported(Op_ReverseBytesL)) return false;
 245     break;
 246 
 247   /* CompareAndSwap, Object: */
 248   case vmIntrinsics::_compareAndSwapObject:
 249 #ifdef _LP64
 250     if ( UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndSwapN)) return false;
 251     if (!UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndSwapP)) return false;
 252 #else
 253     if (!Matcher::match_rule_supported(Op_CompareAndSwapP)) return false;
 254 #endif
 255     break;
 256   case vmIntrinsics::_weakCompareAndSwapObject:
 257   case vmIntrinsics::_weakCompareAndSwapObjectAcquire:
 258   case vmIntrinsics::_weakCompareAndSwapObjectRelease:
 259   case vmIntrinsics::_weakCompareAndSwapObjectVolatile:
 260 #ifdef _LP64
 261     if ( UseCompressedOops && !Matcher::match_rule_supported(Op_WeakCompareAndSwapN)) return false;
 262     if (!UseCompressedOops && !Matcher::match_rule_supported(Op_WeakCompareAndSwapP)) return false;
 263 #else
 264     if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapP)) return false;
 265 #endif
 266     break;
 267   /* CompareAndSwap, Long: */
 268   case vmIntrinsics::_compareAndSwapLong:
 269     if (!Matcher::match_rule_supported(Op_CompareAndSwapL)) return false;
 270     break;
 271   case vmIntrinsics::_weakCompareAndSwapLong:
 272   case vmIntrinsics::_weakCompareAndSwapLongAcquire:
 273   case vmIntrinsics::_weakCompareAndSwapLongRelease:
 274   case vmIntrinsics::_weakCompareAndSwapLongVolatile:
 275     if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapL)) return false;
 276     break;
 277 
 278   /* CompareAndSwap, Int: */
 279   case vmIntrinsics::_compareAndSwapInt:
 280     if (!Matcher::match_rule_supported(Op_CompareAndSwapI)) return false;
 281     break;
 282   case vmIntrinsics::_weakCompareAndSwapInt:
 283   case vmIntrinsics::_weakCompareAndSwapIntAcquire:
 284   case vmIntrinsics::_weakCompareAndSwapIntRelease:
 285   case vmIntrinsics::_weakCompareAndSwapIntVolatile:
 286     if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapL)) return false;
 287     break;
 288 
 289   /* CompareAndSwap, Byte: */
 290   case vmIntrinsics::_compareAndSwapByte:
 291     if (!Matcher::match_rule_supported(Op_CompareAndSwapB)) return false;
 292     break;
 293   case vmIntrinsics::_weakCompareAndSwapByte:
 294   case vmIntrinsics::_weakCompareAndSwapByteAcquire:
 295   case vmIntrinsics::_weakCompareAndSwapByteRelease:
 296   case vmIntrinsics::_weakCompareAndSwapByteVolatile:
 297     if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapB)) return false;
 298     break;
 299 
 300   /* CompareAndSwap, Short: */
 301   case vmIntrinsics::_compareAndSwapShort:
 302     if (!Matcher::match_rule_supported(Op_CompareAndSwapS)) return false;
 303     break;
 304   case vmIntrinsics::_weakCompareAndSwapShort:
 305   case vmIntrinsics::_weakCompareAndSwapShortAcquire:
 306   case vmIntrinsics::_weakCompareAndSwapShortRelease:
 307   case vmIntrinsics::_weakCompareAndSwapShortVolatile:
 308     if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapS)) return false;
 309     break;
 310 
 311   /* CompareAndExchange, Object: */
 312   case vmIntrinsics::_compareAndExchangeObjectVolatile:
 313   case vmIntrinsics::_compareAndExchangeObjectAcquire:
 314   case vmIntrinsics::_compareAndExchangeObjectRelease:
 315 #ifdef _LP64
 316     if ( UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndExchangeN)) return false;
 317     if (!UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndExchangeP)) return false;
 318 #else
 319     if (!Matcher::match_rule_supported(Op_CompareAndExchangeP)) return false;
 320 #endif
 321     break;
 322 
 323   /* CompareAndExchange, Long: */
 324   case vmIntrinsics::_compareAndExchangeLongVolatile:
 325   case vmIntrinsics::_compareAndExchangeLongAcquire:
 326   case vmIntrinsics::_compareAndExchangeLongRelease:
 327     if (!Matcher::match_rule_supported(Op_CompareAndExchangeL)) return false;
 328     break;
 329 
 330   /* CompareAndExchange, Int: */
 331   case vmIntrinsics::_compareAndExchangeIntVolatile:
 332   case vmIntrinsics::_compareAndExchangeIntAcquire:
 333   case vmIntrinsics::_compareAndExchangeIntRelease:
 334     if (!Matcher::match_rule_supported(Op_CompareAndExchangeI)) return false;
 335     break;
 336 
 337   /* CompareAndExchange, Byte: */
 338   case vmIntrinsics::_compareAndExchangeByteVolatile:
 339   case vmIntrinsics::_compareAndExchangeByteAcquire:
 340   case vmIntrinsics::_compareAndExchangeByteRelease:
 341     if (!Matcher::match_rule_supported(Op_CompareAndExchangeB)) return false;
 342     break;
 343 
 344   /* CompareAndExchange, Short: */
 345   case vmIntrinsics::_compareAndExchangeShortVolatile:
 346   case vmIntrinsics::_compareAndExchangeShortAcquire:
 347   case vmIntrinsics::_compareAndExchangeShortRelease:
 348     if (!Matcher::match_rule_supported(Op_CompareAndExchangeS)) return false;
 349     break;
 350 
 351   case vmIntrinsics::_getAndAddByte:
 352     if (!Matcher::match_rule_supported(Op_GetAndAddB)) return false;
 353     break;
 354   case vmIntrinsics::_getAndAddShort:
 355     if (!Matcher::match_rule_supported(Op_GetAndAddS)) return false;
 356     break;
 357   case vmIntrinsics::_getAndAddInt:
 358     if (!Matcher::match_rule_supported(Op_GetAndAddI)) return false;
 359     break;
 360   case vmIntrinsics::_getAndAddLong:
 361     if (!Matcher::match_rule_supported(Op_GetAndAddL)) return false;
 362     break;
 363 
 364   case vmIntrinsics::_getAndSetByte:
 365     if (!Matcher::match_rule_supported(Op_GetAndSetB)) return false;
 366     break;
 367   case vmIntrinsics::_getAndSetShort:
 368     if (!Matcher::match_rule_supported(Op_GetAndSetS)) return false;
 369     break;
 370   case vmIntrinsics::_getAndSetInt:
 371     if (!Matcher::match_rule_supported(Op_GetAndSetI)) return false;
 372     break;
 373   case vmIntrinsics::_getAndSetLong:
 374     if (!Matcher::match_rule_supported(Op_GetAndSetL)) return false;
 375     break;
 376   case vmIntrinsics::_getAndSetObject:
 377 #ifdef _LP64
 378     if (!UseCompressedOops && !Matcher::match_rule_supported(Op_GetAndSetP)) return false;
 379     if (UseCompressedOops && !Matcher::match_rule_supported(Op_GetAndSetN)) return false;
 380     break;
 381 #else
 382     if (!Matcher::match_rule_supported(Op_GetAndSetP)) return false;
 383     break;
 384 #endif
 385   case vmIntrinsics::_incrementExactI:
 386   case vmIntrinsics::_addExactI:
 387     if (!Matcher::match_rule_supported(Op_OverflowAddI)) return false;
 388     break;
 389   case vmIntrinsics::_incrementExactL:
 390   case vmIntrinsics::_addExactL:
 391     if (!Matcher::match_rule_supported(Op_OverflowAddL)) return false;
 392     break;
 393   case vmIntrinsics::_decrementExactI:
 394   case vmIntrinsics::_subtractExactI:
 395     if (!Matcher::match_rule_supported(Op_OverflowSubI)) return false;
 396     break;
 397   case vmIntrinsics::_decrementExactL:
 398   case vmIntrinsics::_subtractExactL:
 399     if (!Matcher::match_rule_supported(Op_OverflowSubL)) return false;
 400     break;
 401   case vmIntrinsics::_negateExactI:
 402     if (!Matcher::match_rule_supported(Op_OverflowSubI)) return false;
 403     break;
 404   case vmIntrinsics::_negateExactL:
 405     if (!Matcher::match_rule_supported(Op_OverflowSubL)) return false;
 406     break;
 407   case vmIntrinsics::_multiplyExactI:
 408     if (!Matcher::match_rule_supported(Op_OverflowMulI)) return false;
 409     break;
 410   case vmIntrinsics::_multiplyExactL:
 411     if (!Matcher::match_rule_supported(Op_OverflowMulL)) return false;
 412     break;
 413   case vmIntrinsics::_getCallerClass:
 414     if (SystemDictionary::reflect_CallerSensitive_klass() == NULL) return false;
 415     break;
 416   case vmIntrinsics::_onSpinWait:
 417     if (!Matcher::match_rule_supported(Op_OnSpinWait)) return false;
 418     break;
 419   case vmIntrinsics::_hashCode:
 420   case vmIntrinsics::_identityHashCode:
 421   case vmIntrinsics::_getClass:
 422   case vmIntrinsics::_dsin:
 423   case vmIntrinsics::_dcos:
 424   case vmIntrinsics::_dtan:
 425   case vmIntrinsics::_dabs:
 426   case vmIntrinsics::_datan2:
 427   case vmIntrinsics::_dsqrt:
 428   case vmIntrinsics::_dexp:
 429   case vmIntrinsics::_dlog:
 430   case vmIntrinsics::_dlog10:
 431   case vmIntrinsics::_dpow:
 432   case vmIntrinsics::_min:
 433   case vmIntrinsics::_max:
 434   case vmIntrinsics::_arraycopy:
 435   case vmIntrinsics::_indexOfL:
 436   case vmIntrinsics::_indexOfU:
 437   case vmIntrinsics::_indexOfUL:




  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "opto/c2compiler.hpp"
  27 #include "opto/compile.hpp"
  28 #include "opto/optoreg.hpp"
  29 #include "opto/output.hpp"
  30 #include "opto/runtime.hpp"
  31 
  32 // register information defined by ADLC
  33 extern const char register_save_policy[];
  34 extern const Opcodes register_save_type[];
  35 
  36 const char* C2Compiler::retry_no_subsuming_loads() {
  37   return "retry without subsuming loads";
  38 }
  39 const char* C2Compiler::retry_no_escape_analysis() {
  40   return "retry without escape analysis";
  41 }
  42 const char* C2Compiler::retry_class_loading_during_parsing() {
  43   return "retry class loading during parsing";
  44 }
  45 bool C2Compiler::init_c2_runtime() {
  46 
  47   // Check assumptions used while running ADLC
  48   Compile::adlc_verification();
  49   assert(REG_COUNT <= ConcreteRegisterImpl::number_of_registers, "incompatible register counts");
  50 
  51   for (int i = 0; i < ConcreteRegisterImpl::number_of_registers ; i++ ) {
  52       OptoReg::vm2opto[i] = OptoReg::Bad;
  53   }
  54 
  55   for( OptoReg::Name i=OptoReg::Name(0); i<OptoReg::Name(REG_COUNT); i = OptoReg::add(i,1) ) {
  56     VMReg r = OptoReg::as_VMReg(i);
  57     if (r->is_valid()) {
  58       OptoReg::vm2opto[r->value()] = i;
  59     }
  60   }
  61 
  62   // Check that runtime and architecture description agree on callee-saved-floats
  63   bool callee_saved_floats = false;
  64   for( OptoReg::Name i=OptoReg::Name(0); i<OptoReg::Name(_last_Mach_Reg); i = OptoReg::add(i,1) ) {
  65     // Is there a callee-saved float or double?
  66     if( register_save_policy[i] == 'E' /* callee-saved */ &&
  67        (register_save_type[i] == Opcodes::Op_RegF || register_save_type[i] == Opcodes::Op_RegD) ) {
  68       callee_saved_floats = true;
  69     }
  70   }
  71 
  72   DEBUG_ONLY( Node::init_NodeProperty(); )
  73 
  74   Compile::pd_compiler2_init();
  75 
  76   CompilerThread* thread = CompilerThread::current();
  77 
  78   HandleMark handle_mark(thread);
  79   return OptoRuntime::generate(thread->env());
  80 }
  81 
  82 void C2Compiler::initialize() {
  83   // The first compiler thread that gets here will initialize the
  84   // small amount of global state (and runtime stubs) that C2 needs.
  85 
  86   // There is a race possible once at startup and then we're fine
  87 


 166     return false;
 167   }
 168 
 169   // Only Object.hashCode and Object.clone intrinsics implement also a virtual
 170   // dispatch because calling both methods is expensive but both methods are
 171   // frequently overridden. All other intrinsics implement only a non-virtual
 172   // dispatch.
 173   if (is_virtual) {
 174     switch (id) {
 175     case vmIntrinsics::_hashCode:
 176     case vmIntrinsics::_clone:
 177       break;
 178     default:
 179       return false;
 180     }
 181   }
 182 
 183   switch (id) {
 184   case vmIntrinsics::_compressStringC:
 185   case vmIntrinsics::_compressStringB:
 186     if (!Matcher::has_match_rule(Opcodes::Op_StrCompressedCopy)) return false;
 187     break;
 188   case vmIntrinsics::_inflateStringC:
 189   case vmIntrinsics::_inflateStringB:
 190     if (!Matcher::has_match_rule(Opcodes::Op_StrInflatedCopy)) return false;
 191     break;
 192   case vmIntrinsics::_compareToL:
 193   case vmIntrinsics::_compareToU:
 194   case vmIntrinsics::_compareToLU:
 195   case vmIntrinsics::_compareToUL:
 196     if (!Matcher::match_rule_supported(Opcodes::Op_StrComp)) return false;
 197     break;
 198   case vmIntrinsics::_equalsL:
 199   case vmIntrinsics::_equalsU:
 200     if (!Matcher::match_rule_supported(Opcodes::Op_StrEquals)) return false;
 201     break;
 202   case vmIntrinsics::_equalsB:
 203   case vmIntrinsics::_equalsC:
 204     if (!Matcher::match_rule_supported(Opcodes::Op_AryEq)) return false;
 205     break;
 206   case vmIntrinsics::_copyMemory:
 207     if (StubRoutines::unsafe_arraycopy() == NULL) return false;
 208     break;
 209   case vmIntrinsics::_encodeISOArray:
 210   case vmIntrinsics::_encodeByteISOArray:
 211     if (!Matcher::match_rule_supported(Opcodes::Op_EncodeISOArray)) return false;
 212     break;
 213   case vmIntrinsics::_hasNegatives:
 214     if (!Matcher::match_rule_supported(Opcodes::Op_HasNegatives))  return false;
 215     break;
 216   case vmIntrinsics::_bitCount_i:
 217     if (!Matcher::match_rule_supported(Opcodes::Op_PopCountI)) return false;
 218     break;
 219   case vmIntrinsics::_bitCount_l:
 220     if (!Matcher::match_rule_supported(Opcodes::Op_PopCountL)) return false;
 221     break;
 222   case vmIntrinsics::_numberOfLeadingZeros_i:
 223     if (!Matcher::match_rule_supported(Opcodes::Op_CountLeadingZerosI)) return false;
 224     break;
 225   case vmIntrinsics::_numberOfLeadingZeros_l:
 226     if (!Matcher::match_rule_supported(Opcodes::Op_CountLeadingZerosL)) return false;
 227     break;
 228   case vmIntrinsics::_numberOfTrailingZeros_i:
 229     if (!Matcher::match_rule_supported(Opcodes::Op_CountTrailingZerosI)) return false;
 230     break;
 231   case vmIntrinsics::_numberOfTrailingZeros_l:
 232     if (!Matcher::match_rule_supported(Opcodes::Op_CountTrailingZerosL)) return false;
 233     break;
 234   case vmIntrinsics::_reverseBytes_c:
 235     if (!Matcher::match_rule_supported(Opcodes::Op_ReverseBytesUS)) return false;
 236     break;
 237   case vmIntrinsics::_reverseBytes_s:
 238     if (!Matcher::match_rule_supported(Opcodes::Op_ReverseBytesS)) return false;
 239     break;
 240   case vmIntrinsics::_reverseBytes_i:
 241     if (!Matcher::match_rule_supported(Opcodes::Op_ReverseBytesI)) return false;
 242     break;
 243   case vmIntrinsics::_reverseBytes_l:
 244     if (!Matcher::match_rule_supported(Opcodes::Op_ReverseBytesL)) return false;
 245     break;
 246 
 247   /* CompareAndSwap, Object: */
 248   case vmIntrinsics::_compareAndSwapObject:
 249 #ifdef _LP64
 250     if ( UseCompressedOops && !Matcher::match_rule_supported(Opcodes::Op_CompareAndSwapN)) return false;
 251     if (!UseCompressedOops && !Matcher::match_rule_supported(Opcodes::Op_CompareAndSwapP)) return false;
 252 #else
 253     if (!Matcher::match_rule_supported(Opcodes::Op_CompareAndSwapP)) return false;
 254 #endif
 255     break;
 256   case vmIntrinsics::_weakCompareAndSwapObject:
 257   case vmIntrinsics::_weakCompareAndSwapObjectAcquire:
 258   case vmIntrinsics::_weakCompareAndSwapObjectRelease:
 259   case vmIntrinsics::_weakCompareAndSwapObjectVolatile:
 260 #ifdef _LP64
 261     if ( UseCompressedOops && !Matcher::match_rule_supported(Opcodes::Op_WeakCompareAndSwapN)) return false;
 262     if (!UseCompressedOops && !Matcher::match_rule_supported(Opcodes::Op_WeakCompareAndSwapP)) return false;
 263 #else
 264     if (!Matcher::match_rule_supported(Opcodes::Op_WeakCompareAndSwapP)) return false;
 265 #endif
 266     break;
 267   /* CompareAndSwap, Long: */
 268   case vmIntrinsics::_compareAndSwapLong:
 269     if (!Matcher::match_rule_supported(Opcodes::Op_CompareAndSwapL)) return false;
 270     break;
 271   case vmIntrinsics::_weakCompareAndSwapLong:
 272   case vmIntrinsics::_weakCompareAndSwapLongAcquire:
 273   case vmIntrinsics::_weakCompareAndSwapLongRelease:
 274   case vmIntrinsics::_weakCompareAndSwapLongVolatile:
 275     if (!Matcher::match_rule_supported(Opcodes::Op_WeakCompareAndSwapL)) return false;
 276     break;
 277 
 278   /* CompareAndSwap, Int: */
 279   case vmIntrinsics::_compareAndSwapInt:
 280     if (!Matcher::match_rule_supported(Opcodes::Op_CompareAndSwapI)) return false;
 281     break;
 282   case vmIntrinsics::_weakCompareAndSwapInt:
 283   case vmIntrinsics::_weakCompareAndSwapIntAcquire:
 284   case vmIntrinsics::_weakCompareAndSwapIntRelease:
 285   case vmIntrinsics::_weakCompareAndSwapIntVolatile:
 286     if (!Matcher::match_rule_supported(Opcodes::Op_WeakCompareAndSwapL)) return false;
 287     break;
 288 
 289   /* CompareAndSwap, Byte: */
 290   case vmIntrinsics::_compareAndSwapByte:
 291     if (!Matcher::match_rule_supported(Opcodes::Op_CompareAndSwapB)) return false;
 292     break;
 293   case vmIntrinsics::_weakCompareAndSwapByte:
 294   case vmIntrinsics::_weakCompareAndSwapByteAcquire:
 295   case vmIntrinsics::_weakCompareAndSwapByteRelease:
 296   case vmIntrinsics::_weakCompareAndSwapByteVolatile:
 297     if (!Matcher::match_rule_supported(Opcodes::Op_WeakCompareAndSwapB)) return false;
 298     break;
 299 
 300   /* CompareAndSwap, Short: */
 301   case vmIntrinsics::_compareAndSwapShort:
 302     if (!Matcher::match_rule_supported(Opcodes::Op_CompareAndSwapS)) return false;
 303     break;
 304   case vmIntrinsics::_weakCompareAndSwapShort:
 305   case vmIntrinsics::_weakCompareAndSwapShortAcquire:
 306   case vmIntrinsics::_weakCompareAndSwapShortRelease:
 307   case vmIntrinsics::_weakCompareAndSwapShortVolatile:
 308     if (!Matcher::match_rule_supported(Opcodes::Op_WeakCompareAndSwapS)) return false;
 309     break;
 310 
 311   /* CompareAndExchange, Object: */
 312   case vmIntrinsics::_compareAndExchangeObjectVolatile:
 313   case vmIntrinsics::_compareAndExchangeObjectAcquire:
 314   case vmIntrinsics::_compareAndExchangeObjectRelease:
 315 #ifdef _LP64
 316     if ( UseCompressedOops && !Matcher::match_rule_supported(Opcodes::Op_CompareAndExchangeN)) return false;
 317     if (!UseCompressedOops && !Matcher::match_rule_supported(Opcodes::Op_CompareAndExchangeP)) return false;
 318 #else
 319     if (!Matcher::match_rule_supported(Opcodes::Op_CompareAndExchangeP)) return false;
 320 #endif
 321     break;
 322 
 323   /* CompareAndExchange, Long: */
 324   case vmIntrinsics::_compareAndExchangeLongVolatile:
 325   case vmIntrinsics::_compareAndExchangeLongAcquire:
 326   case vmIntrinsics::_compareAndExchangeLongRelease:
 327     if (!Matcher::match_rule_supported(Opcodes::Op_CompareAndExchangeL)) return false;
 328     break;
 329 
 330   /* CompareAndExchange, Int: */
 331   case vmIntrinsics::_compareAndExchangeIntVolatile:
 332   case vmIntrinsics::_compareAndExchangeIntAcquire:
 333   case vmIntrinsics::_compareAndExchangeIntRelease:
 334     if (!Matcher::match_rule_supported(Opcodes::Op_CompareAndExchangeI)) return false;
 335     break;
 336 
 337   /* CompareAndExchange, Byte: */
 338   case vmIntrinsics::_compareAndExchangeByteVolatile:
 339   case vmIntrinsics::_compareAndExchangeByteAcquire:
 340   case vmIntrinsics::_compareAndExchangeByteRelease:
 341     if (!Matcher::match_rule_supported(Opcodes::Op_CompareAndExchangeB)) return false;
 342     break;
 343 
 344   /* CompareAndExchange, Short: */
 345   case vmIntrinsics::_compareAndExchangeShortVolatile:
 346   case vmIntrinsics::_compareAndExchangeShortAcquire:
 347   case vmIntrinsics::_compareAndExchangeShortRelease:
 348     if (!Matcher::match_rule_supported(Opcodes::Op_CompareAndExchangeS)) return false;
 349     break;
 350 
 351   case vmIntrinsics::_getAndAddByte:
 352     if (!Matcher::match_rule_supported(Opcodes::Op_GetAndAddB)) return false;
 353     break;
 354   case vmIntrinsics::_getAndAddShort:
 355     if (!Matcher::match_rule_supported(Opcodes::Op_GetAndAddS)) return false;
 356     break;
 357   case vmIntrinsics::_getAndAddInt:
 358     if (!Matcher::match_rule_supported(Opcodes::Op_GetAndAddI)) return false;
 359     break;
 360   case vmIntrinsics::_getAndAddLong:
 361     if (!Matcher::match_rule_supported(Opcodes::Op_GetAndAddL)) return false;
 362     break;
 363 
 364   case vmIntrinsics::_getAndSetByte:
 365     if (!Matcher::match_rule_supported(Opcodes::Op_GetAndSetB)) return false;
 366     break;
 367   case vmIntrinsics::_getAndSetShort:
 368     if (!Matcher::match_rule_supported(Opcodes::Op_GetAndSetS)) return false;
 369     break;
 370   case vmIntrinsics::_getAndSetInt:
 371     if (!Matcher::match_rule_supported(Opcodes::Op_GetAndSetI)) return false;
 372     break;
 373   case vmIntrinsics::_getAndSetLong:
 374     if (!Matcher::match_rule_supported(Opcodes::Op_GetAndSetL)) return false;
 375     break;
 376   case vmIntrinsics::_getAndSetObject:
 377 #ifdef _LP64
 378     if (!UseCompressedOops && !Matcher::match_rule_supported(Opcodes::Op_GetAndSetP)) return false;
 379     if (UseCompressedOops && !Matcher::match_rule_supported(Opcodes::Op_GetAndSetN)) return false;
 380     break;
 381 #else
 382     if (!Matcher::match_rule_supported(Opcodes::Op_GetAndSetP)) return false;
 383     break;
 384 #endif
 385   case vmIntrinsics::_incrementExactI:
 386   case vmIntrinsics::_addExactI:
 387     if (!Matcher::match_rule_supported(Opcodes::Op_OverflowAddI)) return false;
 388     break;
 389   case vmIntrinsics::_incrementExactL:
 390   case vmIntrinsics::_addExactL:
 391     if (!Matcher::match_rule_supported(Opcodes::Op_OverflowAddL)) return false;
 392     break;
 393   case vmIntrinsics::_decrementExactI:
 394   case vmIntrinsics::_subtractExactI:
 395     if (!Matcher::match_rule_supported(Opcodes::Op_OverflowSubI)) return false;
 396     break;
 397   case vmIntrinsics::_decrementExactL:
 398   case vmIntrinsics::_subtractExactL:
 399     if (!Matcher::match_rule_supported(Opcodes::Op_OverflowSubL)) return false;
 400     break;
 401   case vmIntrinsics::_negateExactI:
 402     if (!Matcher::match_rule_supported(Opcodes::Op_OverflowSubI)) return false;
 403     break;
 404   case vmIntrinsics::_negateExactL:
 405     if (!Matcher::match_rule_supported(Opcodes::Op_OverflowSubL)) return false;
 406     break;
 407   case vmIntrinsics::_multiplyExactI:
 408     if (!Matcher::match_rule_supported(Opcodes::Op_OverflowMulI)) return false;
 409     break;
 410   case vmIntrinsics::_multiplyExactL:
 411     if (!Matcher::match_rule_supported(Opcodes::Op_OverflowMulL)) return false;
 412     break;
 413   case vmIntrinsics::_getCallerClass:
 414     if (SystemDictionary::reflect_CallerSensitive_klass() == NULL) return false;
 415     break;
 416   case vmIntrinsics::_onSpinWait:
 417     if (!Matcher::match_rule_supported(Opcodes::Op_OnSpinWait)) return false;
 418     break;
 419   case vmIntrinsics::_hashCode:
 420   case vmIntrinsics::_identityHashCode:
 421   case vmIntrinsics::_getClass:
 422   case vmIntrinsics::_dsin:
 423   case vmIntrinsics::_dcos:
 424   case vmIntrinsics::_dtan:
 425   case vmIntrinsics::_dabs:
 426   case vmIntrinsics::_datan2:
 427   case vmIntrinsics::_dsqrt:
 428   case vmIntrinsics::_dexp:
 429   case vmIntrinsics::_dlog:
 430   case vmIntrinsics::_dlog10:
 431   case vmIntrinsics::_dpow:
 432   case vmIntrinsics::_min:
 433   case vmIntrinsics::_max:
 434   case vmIntrinsics::_arraycopy:
 435   case vmIntrinsics::_indexOfL:
 436   case vmIntrinsics::_indexOfU:
 437   case vmIntrinsics::_indexOfUL:


< prev index next >