Skip to content

Commit 00f2c38

Browse files
Dhamoder NallaHao Sun
authored andcommitted
8371161: [AArch64] Enable CPU feature UseSHA3Intrinsics for the Qualcomm processor family
Reviewed-by: aph, haosun
1 parent 8a7af77 commit 00f2c38

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/hotspot/cpu/aarch64/vm_version_aarch64.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ void VM_Version::initialize() {
378378
if (UseSHA && VM_Version::supports_sha3()) {
379379
// Auto-enable UseSHA3Intrinsics on hardware with performance benefit.
380380
// Note that the evaluation of UseSHA3Intrinsics shows better performance
381-
// on Apple silicon but worse performance on Neoverse V1 and N2.
382-
if (_cpu == CPU_APPLE) { // Apple silicon
381+
// on Apple and Qualcomm silicon but worse performance on Neoverse V1 and N2.
382+
if (_cpu == CPU_APPLE || _cpu == CPU_QUALCOMM) { // Apple or Qualcomm silicon
383383
if (FLAG_IS_DEFAULT(UseSHA3Intrinsics)) {
384384
FLAG_SET_DEFAULT(UseSHA3Intrinsics, true);
385385
}

src/hotspot/cpu/aarch64/vm_version_aarch64.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class VM_Version : public Abstract_VM_Version {
106106
CPU_MOTOROLA = 'M',
107107
CPU_NVIDIA = 'N',
108108
CPU_AMCC = 'P',
109-
CPU_QUALCOM = 'Q',
109+
CPU_QUALCOMM = 'Q',
110110
CPU_MARVELL = 'V',
111111
CPU_INTEL = 'i',
112112
CPU_APPLE = 'a',

src/hotspot/os_cpu/windows_aarch64/vm_version_windows_aarch64.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ void VM_Version::get_os_cpu_info() {
8484
_cpu = CPU_AMCC;
8585
} else if (buf && strstr(buf, "Cavium Inc.") != nullptr) {
8686
_cpu = CPU_CAVIUM;
87+
} else if (buf && strstr(buf, "Qualcomm Technologies Inc") != nullptr) {
88+
_cpu = CPU_QUALCOMM;
8789
} else {
8890
log_info(os)("VM_Version: unknown CPU model");
8991
}

0 commit comments

Comments
 (0)