8324734: Relax too-strict assert(VM_Version::supports_evex()) in Assembler::locate_operand()
Co-authored-by: Vladimir Kozlov <kvn@openjdk.org> Reviewed-by: kvn, shade
This commit is contained in:
parent
fd8adf3083
commit
f0024f585d
src/hotspot
@ -1089,7 +1089,7 @@ address Assembler::locate_operand(address inst, WhichOperand which) {
|
||||
break;
|
||||
|
||||
case 0x62: // EVEX_4bytes
|
||||
assert(VM_Version::supports_evex(), "shouldn't have EVEX prefix");
|
||||
assert(VM_Version::cpu_supports_evex(), "shouldn't have EVEX prefix");
|
||||
assert(ip == inst+1, "no prefixes allowed");
|
||||
// no EVEX collisions, all instructions that have 0x62 opcodes
|
||||
// have EVEX versions and are subopcodes of 0x66
|
||||
|
@ -809,7 +809,8 @@ void VM_Version::get_processor_features() {
|
||||
_stepping = cpu_stepping();
|
||||
|
||||
if (cpu_family() > 4) { // it supports CPUID
|
||||
_features = feature_flags();
|
||||
_features = feature_flags(); // These can be changed by VM settings
|
||||
_cpu_features = _features; // Preserve features
|
||||
// Logical processors are only available on P4s and above,
|
||||
// and only if hyperthreading is available.
|
||||
_logical_processors_per_package = logical_processor_count();
|
||||
|
@ -640,7 +640,7 @@ public:
|
||||
}
|
||||
|
||||
//
|
||||
// Feature identification
|
||||
// Feature identification which can be affected by VM settings
|
||||
//
|
||||
static bool supports_cpuid() { return _features != 0; }
|
||||
static bool supports_cmov() { return (_features & CPU_CMOV) != 0; }
|
||||
@ -703,6 +703,11 @@ public:
|
||||
static bool supports_cet_ss() { return (_features & CPU_CET_SS) != 0; }
|
||||
static bool supports_cet_ibt() { return (_features & CPU_CET_IBT) != 0; }
|
||||
|
||||
//
|
||||
// Feature identification not affected by VM flags
|
||||
//
|
||||
static bool cpu_supports_evex() { return (_cpu_features & CPU_AVX512F) != 0; }
|
||||
|
||||
// Intel features
|
||||
static bool is_intel_family_core() { return is_intel() &&
|
||||
extended_cpu_family() == CPU_FAMILY_INTEL_CORE; }
|
||||
|
@ -34,6 +34,7 @@ const char* Abstract_VM_Version::_s_internal_vm_info_string = Abstract_VM_Versio
|
||||
|
||||
uint64_t Abstract_VM_Version::_features = 0;
|
||||
const char* Abstract_VM_Version::_features_string = "";
|
||||
uint64_t Abstract_VM_Version::_cpu_features = 0;
|
||||
|
||||
#ifndef SUPPORTS_NATIVE_CX8
|
||||
bool Abstract_VM_Version::_supports_cx8 = false;
|
||||
|
@ -54,10 +54,13 @@ class Abstract_VM_Version: AllStatic {
|
||||
static const char* _s_vm_release;
|
||||
static const char* _s_internal_vm_info_string;
|
||||
|
||||
// CPU feature flags.
|
||||
// CPU feature flags, can be affected by VM settings.
|
||||
static uint64_t _features;
|
||||
static const char* _features_string;
|
||||
|
||||
// Original CPU feature flags, not affected by VM settings.
|
||||
static uint64_t _cpu_features;
|
||||
|
||||
// These are set by machine-dependent initializations
|
||||
#ifndef SUPPORTS_NATIVE_CX8
|
||||
static bool _supports_cx8;
|
||||
|
Loading…
x
Reference in New Issue
Block a user