-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
31 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package cpuid | ||
|
||
import "golang.org/x/sys/cpu" | ||
|
||
var HasAES = cpu.X86.HasAES | ||
var HasGFMUL = cpu.X86.HasPCLMULQDQ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package cpuid | ||
|
||
import "golang.org/x/sys/cpu" | ||
|
||
var HasAES = cpu.ARM64.HasAES | ||
var HasGFMUL = cpu.ARM64.HasPMULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//go:build arm64 && darwin && !ios | ||
|
||
package cpuid | ||
|
||
// There are no hw.optional sysctl values for the below features on Mac OS 11.0 | ||
// to detect their supported state dynamically. Assume the CPU features that | ||
// Apple Silicon M1 supports to be available as a minimal set of features | ||
// to all Go programs running on darwin/arm64. | ||
var HasAES = true | ||
var HasGFMUL = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters