490
491 public:
492 // Offsets for cpuid asm stub
493 static ByteSize std_cpuid0_offset() { return byte_offset_of(CpuidInfo, std_max_function); }
494 static ByteSize std_cpuid1_offset() { return byte_offset_of(CpuidInfo, std_cpuid1_eax); }
495 static ByteSize dcp_cpuid4_offset() { return byte_offset_of(CpuidInfo, dcp_cpuid4_eax); }
496 static ByteSize sef_cpuid7_offset() { return byte_offset_of(CpuidInfo, sef_cpuid7_eax); }
497 static ByteSize ext_cpuid1_offset() { return byte_offset_of(CpuidInfo, ext_cpuid1_eax); }
498 static ByteSize ext_cpuid5_offset() { return byte_offset_of(CpuidInfo, ext_cpuid5_eax); }
499 static ByteSize ext_cpuid7_offset() { return byte_offset_of(CpuidInfo, ext_cpuid7_eax); }
500 static ByteSize ext_cpuid8_offset() { return byte_offset_of(CpuidInfo, ext_cpuid8_eax); }
501 static ByteSize tpl_cpuidB0_offset() { return byte_offset_of(CpuidInfo, tpl_cpuidB0_eax); }
502 static ByteSize tpl_cpuidB1_offset() { return byte_offset_of(CpuidInfo, tpl_cpuidB1_eax); }
503 static ByteSize tpl_cpuidB2_offset() { return byte_offset_of(CpuidInfo, tpl_cpuidB2_eax); }
504 static ByteSize xem_xcr0_offset() { return byte_offset_of(CpuidInfo, xem_xcr0_eax); }
505 static ByteSize ymm_save_offset() { return byte_offset_of(CpuidInfo, ymm_save); }
506
507 // The value used to check ymm register after signal handle
508 static int ymm_test_value() { return 0xCAFEBABE; }
509
510 static void set_cpuinfo_segv_addr(address pc) { _cpuinfo_segv_addr = pc; }
511 static bool is_cpuinfo_segv_addr(address pc) { return _cpuinfo_segv_addr == pc; }
512 static void set_cpuinfo_cont_addr(address pc) { _cpuinfo_cont_addr = pc; }
513 static address cpuinfo_cont_addr() { return _cpuinfo_cont_addr; }
514
515 static void clean_cpuFeatures() { _cpuFeatures = 0; }
516 static void set_avx_cpuFeatures() { _cpuFeatures = (CPU_SSE | CPU_SSE2 | CPU_AVX); }
517
518
519 // Initialization
520 static void initialize();
521
522 // Override Abstract_VM_Version implementation
523 static bool use_biased_locking();
524
525 // Asserts
526 static void assert_is_initialized() {
527 assert(_cpuid_info.std_cpuid1_eax.bits.family != 0, "VM_Version not initialized");
528 }
529
|
490
491 public:
492 // Offsets for cpuid asm stub
493 static ByteSize std_cpuid0_offset() { return byte_offset_of(CpuidInfo, std_max_function); }
494 static ByteSize std_cpuid1_offset() { return byte_offset_of(CpuidInfo, std_cpuid1_eax); }
495 static ByteSize dcp_cpuid4_offset() { return byte_offset_of(CpuidInfo, dcp_cpuid4_eax); }
496 static ByteSize sef_cpuid7_offset() { return byte_offset_of(CpuidInfo, sef_cpuid7_eax); }
497 static ByteSize ext_cpuid1_offset() { return byte_offset_of(CpuidInfo, ext_cpuid1_eax); }
498 static ByteSize ext_cpuid5_offset() { return byte_offset_of(CpuidInfo, ext_cpuid5_eax); }
499 static ByteSize ext_cpuid7_offset() { return byte_offset_of(CpuidInfo, ext_cpuid7_eax); }
500 static ByteSize ext_cpuid8_offset() { return byte_offset_of(CpuidInfo, ext_cpuid8_eax); }
501 static ByteSize tpl_cpuidB0_offset() { return byte_offset_of(CpuidInfo, tpl_cpuidB0_eax); }
502 static ByteSize tpl_cpuidB1_offset() { return byte_offset_of(CpuidInfo, tpl_cpuidB1_eax); }
503 static ByteSize tpl_cpuidB2_offset() { return byte_offset_of(CpuidInfo, tpl_cpuidB2_eax); }
504 static ByteSize xem_xcr0_offset() { return byte_offset_of(CpuidInfo, xem_xcr0_eax); }
505 static ByteSize ymm_save_offset() { return byte_offset_of(CpuidInfo, ymm_save); }
506
507 // The value used to check ymm register after signal handle
508 static int ymm_test_value() { return 0xCAFEBABE; }
509
510 static void getPsrInfo_wrapper();
511 static void set_cpuinfo_segv_addr(address pc) { _cpuinfo_segv_addr = pc; }
512 static bool is_cpuinfo_segv_addr(address pc) { return _cpuinfo_segv_addr == pc; }
513 static void set_cpuinfo_cont_addr(address pc) { _cpuinfo_cont_addr = pc; }
514 static address cpuinfo_cont_addr() { return _cpuinfo_cont_addr; }
515
516 static void clean_cpuFeatures() { _cpuFeatures = 0; }
517 static void set_avx_cpuFeatures() { _cpuFeatures = (CPU_SSE | CPU_SSE2 | CPU_AVX); }
518
519
520 // Initialization
521 static void initialize();
522
523 // Override Abstract_VM_Version implementation
524 static bool use_biased_locking();
525
526 // Asserts
527 static void assert_is_initialized() {
528 assert(_cpuid_info.std_cpuid1_eax.bits.family != 0, "VM_Version not initialized");
529 }
530
|