mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-28 04:46:44 -04:00
cpu: add DIT option and hwcap DIT support
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>
This commit is contained in:
@@ -38,6 +38,7 @@ func initOptions() {
|
|||||||
{Name: "dcpop", Feature: &ARM64.HasDCPOP},
|
{Name: "dcpop", Feature: &ARM64.HasDCPOP},
|
||||||
{Name: "asimddp", Feature: &ARM64.HasASIMDDP},
|
{Name: "asimddp", Feature: &ARM64.HasASIMDDP},
|
||||||
{Name: "asimdfhm", Feature: &ARM64.HasASIMDFHM},
|
{Name: "asimdfhm", Feature: &ARM64.HasASIMDFHM},
|
||||||
|
{Name: "dit", Feature: &ARM64.HasDIT},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ const (
|
|||||||
hwcap_SHA512 = 1 << 21
|
hwcap_SHA512 = 1 << 21
|
||||||
hwcap_SVE = 1 << 22
|
hwcap_SVE = 1 << 22
|
||||||
hwcap_ASIMDFHM = 1 << 23
|
hwcap_ASIMDFHM = 1 << 23
|
||||||
|
hwcap_DIT = 1 << 24
|
||||||
|
|
||||||
hwcap2_SVE2 = 1 << 1
|
hwcap2_SVE2 = 1 << 1
|
||||||
)
|
)
|
||||||
@@ -106,6 +107,8 @@ func doinit() {
|
|||||||
ARM64.HasSHA512 = isSet(hwCap, hwcap_SHA512)
|
ARM64.HasSHA512 = isSet(hwCap, hwcap_SHA512)
|
||||||
ARM64.HasSVE = isSet(hwCap, hwcap_SVE)
|
ARM64.HasSVE = isSet(hwCap, hwcap_SVE)
|
||||||
ARM64.HasASIMDFHM = isSet(hwCap, hwcap_ASIMDFHM)
|
ARM64.HasASIMDFHM = isSet(hwCap, hwcap_ASIMDFHM)
|
||||||
|
ARM64.HasDIT = isSet(hwCap, hwcap_DIT)
|
||||||
|
|
||||||
|
|
||||||
// HWCAP2 feature bits
|
// HWCAP2 feature bits
|
||||||
ARM64.HasSVE2 = isSet(hwCap2, hwcap2_SVE2)
|
ARM64.HasSVE2 = isSet(hwCap2, hwcap2_SVE2)
|
||||||
|
|||||||
Reference in New Issue
Block a user