diff --git a/ms-patches/detect-lse.yml b/ms-patches/detect-lse.yml new file mode 100644 index 00000000000..639215d3ac9 --- /dev/null +++ b/ms-patches/detect-lse.yml @@ -0,0 +1,9 @@ +title: Detect LSE on Windows AArch64 +- work_item: 2905855 +- jbs_bug: +- author: macarte +- owner: macarte +- contributors: macarte +- details: +- release_note: + - Detect LSE on Windows AArch64 and set the UseLSE flag appropriately diff --git a/src/hotspot/os_cpu/windows_aarch64/vm_version_windows_aarch64.cpp b/src/hotspot/os_cpu/windows_aarch64/vm_version_windows_aarch64.cpp index 5548a31255e..55f005c69da 100644 --- a/src/hotspot/os_cpu/windows_aarch64/vm_version_windows_aarch64.cpp +++ b/src/hotspot/os_cpu/windows_aarch64/vm_version_windows_aarch64.cpp @@ -33,6 +33,10 @@ void VM_Version::get_os_cpu_info() { if (IsProcessorFeaturePresent(PF_ARM_VFP_32_REGISTERS_AVAILABLE)) _features |= CPU_ASIMD; // No check for CPU_PMULL + if (IsProcessorFeaturePresent(PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE)) { + _features |= CPU_LSE; + } + __int64 dczid_el0 = _ReadStatusReg(0x5807 /* ARM64_DCZID_EL0 */); if (!(dczid_el0 & 0x10)) {