438 switch(id) {
439 case vmIntrinsics::_hashCode:
440 case vmIntrinsics::_clone:
441 return true;
442 break;
443 default:
444 return false;
445 }
446 }
447
448 int vmIntrinsics::predicates_needed(vmIntrinsics::ID id) {
449 assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
450 switch (id) {
451 case vmIntrinsics::_cipherBlockChaining_encryptAESCrypt:
452 case vmIntrinsics::_cipherBlockChaining_decryptAESCrypt:
453 case vmIntrinsics::_electronicCodeBook_encryptAESCrypt:
454 case vmIntrinsics::_electronicCodeBook_decryptAESCrypt:
455 case vmIntrinsics::_counterMode_AESCrypt:
456 return 1;
457 case vmIntrinsics::_digestBase_implCompressMB:
458 return 4;
459 default:
460 return 0;
461 }
462 }
463
464 bool vmIntrinsics::disabled_by_jvm_flags(vmIntrinsics::ID id) {
465 assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
466
467 // -XX:-InlineNatives disables nearly all intrinsics except the ones listed in
468 // the following switch statement.
469 if (!InlineNatives) {
470 switch (id) {
471 case vmIntrinsics::_indexOfL:
472 case vmIntrinsics::_indexOfU:
473 case vmIntrinsics::_indexOfUL:
474 case vmIntrinsics::_indexOfIL:
475 case vmIntrinsics::_indexOfIU:
476 case vmIntrinsics::_indexOfIUL:
477 case vmIntrinsics::_indexOfU_char:
478 case vmIntrinsics::_compareToL:
694 break;
695 case vmIntrinsics::_electronicCodeBook_encryptAESCrypt:
696 case vmIntrinsics::_electronicCodeBook_decryptAESCrypt:
697 if (!UseAESIntrinsics) return true;
698 break;
699 case vmIntrinsics::_counterMode_AESCrypt:
700 if (!UseAESCTRIntrinsics) return true;
701 break;
702 case vmIntrinsics::_md5_implCompress:
703 if (!UseMD5Intrinsics) return true;
704 break;
705 case vmIntrinsics::_sha_implCompress:
706 if (!UseSHA1Intrinsics) return true;
707 break;
708 case vmIntrinsics::_sha2_implCompress:
709 if (!UseSHA256Intrinsics) return true;
710 break;
711 case vmIntrinsics::_sha5_implCompress:
712 if (!UseSHA512Intrinsics) return true;
713 break;
714 case vmIntrinsics::_digestBase_implCompressMB:
715 if (!(UseMD5Intrinsics || UseSHA1Intrinsics || UseSHA256Intrinsics || UseSHA512Intrinsics)) return true;
716 break;
717 case vmIntrinsics::_ghash_processBlocks:
718 if (!UseGHASHIntrinsics) return true;
719 break;
720 case vmIntrinsics::_base64_encodeBlock:
721 if (!UseBASE64Intrinsics) return true;
722 break;
723 case vmIntrinsics::_updateBytesCRC32C:
724 case vmIntrinsics::_updateDirectByteBufferCRC32C:
725 if (!UseCRC32CIntrinsics) return true;
726 break;
727 case vmIntrinsics::_vectorizedMismatch:
728 if (!UseVectorizedMismatchIntrinsic) return true;
729 break;
730 case vmIntrinsics::_updateBytesAdler32:
731 case vmIntrinsics::_updateByteBufferAdler32:
732 if (!UseAdler32Intrinsics) return true;
733 break;
734 case vmIntrinsics::_copyMemory:
735 if (!InlineArrayCopy || !InlineUnsafeOps) return true;
|
438 switch(id) {
439 case vmIntrinsics::_hashCode:
440 case vmIntrinsics::_clone:
441 return true;
442 break;
443 default:
444 return false;
445 }
446 }
447
448 int vmIntrinsics::predicates_needed(vmIntrinsics::ID id) {
449 assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
450 switch (id) {
451 case vmIntrinsics::_cipherBlockChaining_encryptAESCrypt:
452 case vmIntrinsics::_cipherBlockChaining_decryptAESCrypt:
453 case vmIntrinsics::_electronicCodeBook_encryptAESCrypt:
454 case vmIntrinsics::_electronicCodeBook_decryptAESCrypt:
455 case vmIntrinsics::_counterMode_AESCrypt:
456 return 1;
457 case vmIntrinsics::_digestBase_implCompressMB:
458 return 5;
459 default:
460 return 0;
461 }
462 }
463
464 bool vmIntrinsics::disabled_by_jvm_flags(vmIntrinsics::ID id) {
465 assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
466
467 // -XX:-InlineNatives disables nearly all intrinsics except the ones listed in
468 // the following switch statement.
469 if (!InlineNatives) {
470 switch (id) {
471 case vmIntrinsics::_indexOfL:
472 case vmIntrinsics::_indexOfU:
473 case vmIntrinsics::_indexOfUL:
474 case vmIntrinsics::_indexOfIL:
475 case vmIntrinsics::_indexOfIU:
476 case vmIntrinsics::_indexOfIUL:
477 case vmIntrinsics::_indexOfU_char:
478 case vmIntrinsics::_compareToL:
694 break;
695 case vmIntrinsics::_electronicCodeBook_encryptAESCrypt:
696 case vmIntrinsics::_electronicCodeBook_decryptAESCrypt:
697 if (!UseAESIntrinsics) return true;
698 break;
699 case vmIntrinsics::_counterMode_AESCrypt:
700 if (!UseAESCTRIntrinsics) return true;
701 break;
702 case vmIntrinsics::_md5_implCompress:
703 if (!UseMD5Intrinsics) return true;
704 break;
705 case vmIntrinsics::_sha_implCompress:
706 if (!UseSHA1Intrinsics) return true;
707 break;
708 case vmIntrinsics::_sha2_implCompress:
709 if (!UseSHA256Intrinsics) return true;
710 break;
711 case vmIntrinsics::_sha5_implCompress:
712 if (!UseSHA512Intrinsics) return true;
713 break;
714 case vmIntrinsics::_sha3_implCompress:
715 if (!UseSHA3Intrinsics) return true;
716 break;
717 case vmIntrinsics::_digestBase_implCompressMB:
718 if (!(UseMD5Intrinsics || UseSHA1Intrinsics || UseSHA256Intrinsics || UseSHA512Intrinsics || UseSHA3Intrinsics)) return true;
719 break;
720 case vmIntrinsics::_ghash_processBlocks:
721 if (!UseGHASHIntrinsics) return true;
722 break;
723 case vmIntrinsics::_base64_encodeBlock:
724 if (!UseBASE64Intrinsics) return true;
725 break;
726 case vmIntrinsics::_updateBytesCRC32C:
727 case vmIntrinsics::_updateDirectByteBufferCRC32C:
728 if (!UseCRC32CIntrinsics) return true;
729 break;
730 case vmIntrinsics::_vectorizedMismatch:
731 if (!UseVectorizedMismatchIntrinsic) return true;
732 break;
733 case vmIntrinsics::_updateBytesAdler32:
734 case vmIntrinsics::_updateByteBufferAdler32:
735 if (!UseAdler32Intrinsics) return true;
736 break;
737 case vmIntrinsics::_copyMemory:
738 if (!InlineArrayCopy || !InlineUnsafeOps) return true;
|