mirror of
https://github.com/golang/sys.git
synced 2026-01-29 15:12:09 +03:00
cpu: add support for detecting cmpxchg16b
Change-Id: I892de938e85205c0506aa82e31297b7a99e48e44 Reviewed-on: https://go-review.googlesource.com/c/sys/+/329450 Trust: Martin Möhrmann <martin@golang.org> Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Martin Möhrmann <martin@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Martin Möhrmann <martin@golang.org>
This commit is contained in:
committed by
Martin Möhrmann
parent
41cdb8703e
commit
63515b42dc
@@ -56,6 +56,7 @@ var X86 struct {
|
|||||||
HasAVX512BF16 bool // Advanced vector extension 512 BFloat16 Instructions
|
HasAVX512BF16 bool // Advanced vector extension 512 BFloat16 Instructions
|
||||||
HasBMI1 bool // Bit manipulation instruction set 1
|
HasBMI1 bool // Bit manipulation instruction set 1
|
||||||
HasBMI2 bool // Bit manipulation instruction set 2
|
HasBMI2 bool // Bit manipulation instruction set 2
|
||||||
|
HasCX16 bool // Compare and exchange 16 Bytes
|
||||||
HasERMS bool // Enhanced REP for MOVSB and STOSB
|
HasERMS bool // Enhanced REP for MOVSB and STOSB
|
||||||
HasFMA bool // Fused-multiply-add instructions
|
HasFMA bool // Fused-multiply-add instructions
|
||||||
HasOSXSAVE bool // OS supports XSAVE/XRESTOR for saving/restoring XMM registers.
|
HasOSXSAVE bool // OS supports XSAVE/XRESTOR for saving/restoring XMM registers.
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ func initOptions() {
|
|||||||
{Name: "avx512bf16", Feature: &X86.HasAVX512BF16},
|
{Name: "avx512bf16", Feature: &X86.HasAVX512BF16},
|
||||||
{Name: "bmi1", Feature: &X86.HasBMI1},
|
{Name: "bmi1", Feature: &X86.HasBMI1},
|
||||||
{Name: "bmi2", Feature: &X86.HasBMI2},
|
{Name: "bmi2", Feature: &X86.HasBMI2},
|
||||||
|
{Name: "cx16", Feature: &X86.HasCX16},
|
||||||
{Name: "erms", Feature: &X86.HasERMS},
|
{Name: "erms", Feature: &X86.HasERMS},
|
||||||
{Name: "fma", Feature: &X86.HasFMA},
|
{Name: "fma", Feature: &X86.HasFMA},
|
||||||
{Name: "osxsave", Feature: &X86.HasOSXSAVE},
|
{Name: "osxsave", Feature: &X86.HasOSXSAVE},
|
||||||
@@ -73,6 +74,7 @@ func archInit() {
|
|||||||
X86.HasPCLMULQDQ = isSet(1, ecx1)
|
X86.HasPCLMULQDQ = isSet(1, ecx1)
|
||||||
X86.HasSSSE3 = isSet(9, ecx1)
|
X86.HasSSSE3 = isSet(9, ecx1)
|
||||||
X86.HasFMA = isSet(12, ecx1)
|
X86.HasFMA = isSet(12, ecx1)
|
||||||
|
X86.HasCX16 = isSet(13, ecx1)
|
||||||
X86.HasSSE41 = isSet(19, ecx1)
|
X86.HasSSE41 = isSet(19, ecx1)
|
||||||
X86.HasSSE42 = isSet(20, ecx1)
|
X86.HasSSE42 = isSet(20, ecx1)
|
||||||
X86.HasPOPCNT = isSet(23, ecx1)
|
X86.HasPOPCNT = isSet(23, ecx1)
|
||||||
|
|||||||
Reference in New Issue
Block a user