File: cpu.go

package info (click to toggle)
golang-github-segmentio-asm 1.2.0%2Bgit20231107.1cfacc8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 932 kB
  • sloc: asm: 6,093; makefile: 32
file content (22 lines) | stat: -rw-r--r-- 588 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Pakage cpu provides APIs to detect CPU features available at runtime.
package cpu

import (
	"github.com/segmentio/asm/cpu/arm"
	"github.com/segmentio/asm/cpu/arm64"
	"github.com/segmentio/asm/cpu/x86"
)

var (
	// X86 is the bitset representing the set of the x86 instruction sets are
	// supported by the CPU.
	X86 = x86.ABI()

	// ARM is the bitset representing which parts of the arm instruction sets
	// are supported by the CPU.
	ARM = arm.ABI()

	// ARM64 is the bitset representing which parts of the arm64 instruction
	// sets are supported by the CPU.
	ARM64 = arm64.ABI()
)