Skip to content

Commit

Permalink
8298893: Rename option UsePolyIntrinsics to UsePoly1305Intrinsics
Browse files Browse the repository at this point in the history
Reviewed-by: jnimeh, chagedorn, thartmann
  • Loading branch information
vpaprotsk authored and Sandhya Viswanathan committed Dec 21, 2022
1 parent 9adc349 commit 22007a1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/hotspot/cpu/x86/stubGenerator_x86_64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3709,7 +3709,7 @@ void StubGenerator::generate_initial() {
StubRoutines::_updateBytesCRC32 = generate_updateBytesCRC32();
}

if (UsePolyIntrinsics) {
if (UsePoly1305Intrinsics) {
StubRoutines::_poly1305_processBlocks = generate_poly1305_processBlocks();
}

Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/cpu/x86/vm_version_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1351,14 +1351,14 @@ void VM_Version::get_processor_features() {

#ifdef _LP64
if (supports_avx512ifma() && supports_avx512vlbw() && MaxVectorSize >= 64) {
if (FLAG_IS_DEFAULT(UsePolyIntrinsics)) {
FLAG_SET_DEFAULT(UsePolyIntrinsics, true);
if (FLAG_IS_DEFAULT(UsePoly1305Intrinsics)) {
FLAG_SET_DEFAULT(UsePoly1305Intrinsics, true);
}
} else
#endif
if (UsePolyIntrinsics) {
if (UsePoly1305Intrinsics) {
warning("Intrinsics for Poly1305 crypto hash functions not available on this CPU.");
FLAG_SET_DEFAULT(UsePolyIntrinsics, false);
FLAG_SET_DEFAULT(UsePoly1305Intrinsics, false);
}

#ifdef _LP64
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/classfile/vmIntrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ bool vmIntrinsics::disabled_by_jvm_flags(vmIntrinsics::ID id) {
if (!UseBASE64Intrinsics) return true;
break;
case vmIntrinsics::_poly1305_processBlocks:
if (!UsePolyIntrinsics) return true;
if (!UsePoly1305Intrinsics) return true;
break;
case vmIntrinsics::_updateBytesCRC32C:
case vmIntrinsics::_updateDirectByteBufferCRC32C:
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/opto/library_call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7003,7 +7003,7 @@ bool LibraryCallKit::inline_base64_decodeBlock() {
bool LibraryCallKit::inline_poly1305_processBlocks() {
address stubAddr;
const char *stubName;
assert(UsePolyIntrinsics, "need Poly intrinsics support");
assert(UsePoly1305Intrinsics, "need Poly intrinsics support");
assert(callee()->signature()->size() == 5, "poly1305_processBlocks has %d parameters", callee()->signature()->size());
stubAddr = StubRoutines::poly1305_processBlocks();
stubName = "poly1305_processBlocks";
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/runtime/globals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ const int ObjectAlignmentInBytes = 8;
product(bool, UseBASE64Intrinsics, false, \
"Use intrinsics for java.util.Base64") \
\
product(bool, UsePolyIntrinsics, false, DIAGNOSTIC, \
product(bool, UsePoly1305Intrinsics, false, DIAGNOSTIC, \
"Use intrinsics for sun.security.util.math.intpoly") \
\
product(size_t, LargePageSizeInBytes, 0, \
Expand Down

0 comments on commit 22007a1

Please sign in to comment.