aboutsummaryrefslogtreecommitdiff
path: root/src/simd/archsimd/cpu.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/simd/archsimd/cpu.go')
-rw-r--r--src/simd/archsimd/cpu.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/simd/archsimd/cpu.go b/src/simd/archsimd/cpu.go
index 8069ee7f26..a25556ae65 100644
--- a/src/simd/archsimd/cpu.go
+++ b/src/simd/archsimd/cpu.go
@@ -158,3 +158,13 @@ func (X86Features) FMA() bool {
func (X86Features) SHA() bool {
return cpu.X86.HasSHA
}
+
+// VAES returns whether the CPU supports the VAES feature.
+//
+// If it returns true, then the CPU also supports AVX.
+//
+// VAES is defined on all GOARCHes, but will only return true on
+// GOARCH amd64.
+func (X86Features) VAES() bool {
+ return cpu.X86.HasVAES
+}