Skip to content

Commit adf21a9

Browse files
zhangfannierandall77
authored andcommitted
internal/cpu: add a detection for Neoverse(N3, V3, V3ae) cores
The memmove implementation relies on the variable runtime.arm64UseAlignedLoads to select fastest code path. Considering Neoverse N3, V3 and V3ae cores prefer aligned loads, this patch adds code to detect them for memmove performance. Change-Id: I7266fc35d8b2c15ff516c592b987bafacb82b620 Reviewed-on: https://go-review.googlesource.com/c/go/+/664038 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com>
1 parent e278a78 commit adf21a9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/internal/cpu/cpu_arm64_hwcap.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,14 @@ func hwcapInit(os string) {
6767
// d40 - NeoverseV1
6868
// d49 - NeoverseN2
6969
// d4f - NeoverseV2
70-
if implementer == 'A' && (part_num == 0xd0c || part_num == 0xd40 ||
71-
part_num == 0xd49 || part_num == 0xd4f) {
72-
ARM64.IsNeoverse = true
70+
// d8e - NeoverseN3
71+
// d84 - NeoverseV3
72+
// d83 - NeoverseV3ae
73+
if implementer == 'A' {
74+
switch part_num {
75+
case 0xd0c, 0xd40, 0xd49, 0xd4f, 0xd8e, 0xd84, 0xd83:
76+
ARM64.IsNeoverse = true
77+
}
7378
}
7479
}
7580
}

0 commit comments

Comments
 (0)