]> Cypherpunks repositories - gostls13.git/commit
internal/cpu: add a detection for Neoverse(N2, V2) cores
authorfanzha02 <fannie.zhang@arm.com>
Thu, 20 Apr 2023 07:28:50 +0000 (07:28 +0000)
committerJoel Sing <joel@sing.id.au>
Tue, 25 Apr 2023 14:08:20 +0000 (14:08 +0000)
commite4b03f9425a70f53acb9526dc9cd9c21373308e5
treea3fef565f623dd6d3e0e0db8157e3b74b9838662
parenta1284d0185110b82b34200a13700fecacfa200fa
internal/cpu: add a detection for Neoverse(N2, V2) cores

The memmove implementation relies on the variable
runtime.arm64UseAlignedLoads to select fastest code
path. Considering Neoverse N2 and V2 cores prefer aligned
loads, this patch adds code to detect them for
memmove performance.

And this patch uses a new variable ARM64.IsNeoverse to
represent all Neoverse cores, removing the more specific
versions.

Change-Id: I9e06eae01a0325a0b604ac6af1e55711dd6133f7
Reviewed-on: https://go-review.googlesource.com/c/go/+/487815
Reviewed-by: Joel Sing <joel@sing.id.au>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Fannie Zhang <Fannie.Zhang@arm.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/internal/cpu/cpu.go
src/internal/cpu/cpu_arm64.go
src/internal/cpu/cpu_arm64_hwcap.go
src/runtime/cpuflags_arm64.go