Skip to content

Commit

Permalink
cpu: add DIT option and hwcap DIT support
Browse files Browse the repository at this point in the history
Follow-up to https://go.dev/cl/597377, add a option for DIT so it can be
set via GODEBUG, and add hwcap support for Linux.

Change-Id: Ib094b520edea9c099d37f121b09d02b31644a433
Reviewed-on: https://go-review.googlesource.com/c/sys/+/598719
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
  • Loading branch information
rolandshoemaker committed Jul 17, 2024
1 parent dce4e64 commit 0c18c88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions cpu/cpu_arm64.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func initOptions() {
{Name: "dcpop", Feature: &ARM64.HasDCPOP},
{Name: "asimddp", Feature: &ARM64.HasASIMDDP},
{Name: "asimdfhm", Feature: &ARM64.HasASIMDFHM},
{Name: "dit", Feature: &ARM64.HasDIT},
}
}

Expand Down
3 changes: 3 additions & 0 deletions cpu/cpu_linux_arm64.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const (
hwcap_SHA512 = 1 << 21
hwcap_SVE = 1 << 22
hwcap_ASIMDFHM = 1 << 23
hwcap_DIT = 1 << 24

hwcap2_SVE2 = 1 << 1
)
Expand Down Expand Up @@ -106,6 +107,8 @@ func doinit() {
ARM64.HasSHA512 = isSet(hwCap, hwcap_SHA512)
ARM64.HasSVE = isSet(hwCap, hwcap_SVE)
ARM64.HasASIMDFHM = isSet(hwCap, hwcap_ASIMDFHM)
ARM64.HasDIT = isSet(hwCap, hwcap_DIT)


// HWCAP2 feature bits
ARM64.HasSVE2 = isSet(hwCap2, hwcap2_SVE2)
Expand Down

0 comments on commit 0c18c88

Please sign in to comment.