| 1 |
// Pakage cpu provides APIs to detect CPU features available at runtime. |
| 2 |
package cpu |
| 3 |
|
| 4 |
import ( |
| 5 |
"github.com/segmentio/asm/cpu/arm" |
| 6 |
"github.com/segmentio/asm/cpu/arm64" |
| 7 |
"github.com/segmentio/asm/cpu/x86" |
| 8 |
) |
| 9 |
|
| 10 |
var ( |
| 11 |
// X86 is the bitset representing the set of the x86 instruction sets are |
| 12 |
// supported by the CPU. |
| 13 |
X86 = x86.ABI() |
| 14 |
|
| 15 |
// ARM is the bitset representing which parts of the arm instruction sets |
| 16 |
// are supported by the CPU. |
| 17 |
ARM = arm.ABI() |
| 18 |
|
| 19 |
// ARM64 is the bitset representing which parts of the arm64 instruction |
| 20 |
// sets are supported by the CPU. |
| 21 |
ARM64 = arm64.ABI() |
| 22 |
) |