8343600: RISC-V: enable CRC32 intrinsic when either Zba or RVV are supported
Reviewed-by: fyang
This commit is contained in:
parent
3727f40461
commit
2c1e4c3816
@ -122,22 +122,6 @@ void VM_Version::common_initialize() {
|
||||
FLAG_SET_DEFAULT(AllocatePrefetchDistance, 0);
|
||||
}
|
||||
|
||||
if (UseZba) {
|
||||
if (FLAG_IS_DEFAULT(UseCRC32Intrinsics)) {
|
||||
FLAG_SET_DEFAULT(UseCRC32Intrinsics, true);
|
||||
}
|
||||
} else {
|
||||
if (!FLAG_IS_DEFAULT(UseCRC32Intrinsics)) {
|
||||
warning("CRC32 intrinsic requires Zba instructions (not available on this CPU)");
|
||||
}
|
||||
FLAG_SET_DEFAULT(UseCRC32Intrinsics, false);
|
||||
}
|
||||
|
||||
if (UseCRC32CIntrinsics) {
|
||||
warning("CRC32C intrinsics are not available on this CPU.");
|
||||
FLAG_SET_DEFAULT(UseCRC32CIntrinsics, false);
|
||||
}
|
||||
|
||||
if (UseVectorizedMismatchIntrinsic) {
|
||||
warning("VectorizedMismatch intrinsic is not available on this CPU.");
|
||||
FLAG_SET_DEFAULT(UseVectorizedMismatchIntrinsic, false);
|
||||
@ -217,6 +201,24 @@ void VM_Version::common_initialize() {
|
||||
_initial_vector_length = cpu_vector_length();
|
||||
}
|
||||
}
|
||||
|
||||
// Misc Intrinsics could depend on RVV
|
||||
|
||||
if (UseZba || UseRVV) {
|
||||
if (FLAG_IS_DEFAULT(UseCRC32Intrinsics)) {
|
||||
FLAG_SET_DEFAULT(UseCRC32Intrinsics, true);
|
||||
}
|
||||
} else {
|
||||
if (!FLAG_IS_DEFAULT(UseCRC32Intrinsics)) {
|
||||
warning("CRC32 intrinsic requires Zba or RVV instructions (not available on this CPU)");
|
||||
}
|
||||
FLAG_SET_DEFAULT(UseCRC32Intrinsics, false);
|
||||
}
|
||||
|
||||
if (UseCRC32CIntrinsics) {
|
||||
warning("CRC32C intrinsics are not available on this CPU.");
|
||||
FLAG_SET_DEFAULT(UseCRC32CIntrinsics, false);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef COMPILER2
|
||||
|
Loading…
x
Reference in New Issue
Block a user