1
0
mirror of https://github.com/golang/go synced 2024-11-20 09:24:50 -07:00

internal/cpu: add support for x86 FMA cpu feature detection

Change-Id: I88ea39de01b07e6afa1c187c0df6a258da4aa8e4
Reviewed-on: https://go-review.googlesource.com/62650
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Martin Möhrmann 2017-09-09 22:41:30 +02:00
parent f797e485e0
commit 1a3230f281
2 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,7 @@ type x86 struct {
HasBMI1 bool
HasBMI2 bool
HasERMS bool
HasFMA bool
HasOSXSAVE bool
HasPCLMULQDQ bool
HasPOPCNT bool

View File

@ -27,6 +27,7 @@ func init() {
X86.HasSSE3 = isSet(0, ecx1)
X86.HasPCLMULQDQ = isSet(1, ecx1)
X86.HasSSSE3 = isSet(9, ecx1)
X86.HasFMA = isSet(12, ecx1)
X86.HasSSE41 = isSet(19, ecx1)
X86.HasSSE42 = isSet(20, ecx1)
X86.HasPOPCNT = isSet(23, ecx1)