Permalink
Browse files

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>
  • Loading branch information...
martisch committed Sep 9, 2017
1 parent f797e48 commit 1a3230f281e2ad7a35f7f81a5e6bae291b8e6245
Showing with 2 additions and 0 deletions.
  1. +1 −0 src/internal/cpu/cpu.go
  2. +1 −0 src/internal/cpu/cpu_x86.go
View
@@ -20,6 +20,7 @@ type x86 struct {
HasBMI1 bool
HasBMI2 bool
HasERMS bool
HasFMA bool
HasOSXSAVE bool
HasPCLMULQDQ bool
HasPOPCNT bool
@@ -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)

0 comments on commit 1a3230f

Please sign in to comment.