aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/proc.go
diff options
context:
space:
mode:
authorMartin Möhrmann <moehrmann@google.com>2018-05-25 14:01:25 +0200
committerBrad Fitzpatrick <bradfitz@golang.org>2018-05-25 13:14:07 +0000
commit91d326e7341247dc3f4c391cc7eb7dd7163446aa (patch)
tree566def6093657a7e43be2bf1c529f60062b1fc80 /src/runtime/proc.go
parentbdaadeb3878eebf672e240f4d2a37318594bc45e (diff)
downloadgo-91d326e7341247dc3f4c391cc7eb7dd7163446aa.tar.xz
runtime: remove duplicate cpu feature detection on x86
This also allows the GODEBUGCPU options to change the support_* runtime cpu feature variable values. Change-Id: I884c5f03993afc7e3344ff2fd471a2c6cfde43d4 Reviewed-on: https://go-review.googlesource.com/114615 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/proc.go')
-rw-r--r--src/runtime/proc.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index ba76f7c3e7..e312c575d0 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -5,6 +5,7 @@
package runtime
import (
+ "internal/cpu"
"runtime/internal/atomic"
"runtime/internal/sys"
"unsafe"
@@ -507,6 +508,11 @@ func cpuinit() {
}
internal_cpu_initialize(env)
+
+ support_erms = cpu.X86.HasERMS
+ support_popcnt = cpu.X86.HasPOPCNT
+ support_sse2 = cpu.X86.HasSSE2
+ support_sse41 = cpu.X86.HasSSE41
}
// The bootstrap sequence is: