diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2018-04-11 09:57:18 +0200 |
---|---|---|
committer | Tobias Klauser <tobias.klauser@gmail.com> | 2018-04-11 13:50:04 +0000 |
commit | e0ac5f540bf0d5fff39ce05d60e82d97a011e935 (patch) | |
tree | f4081b9912223fe70db94a7b1415d19873c7409d /src/runtime/cpuflags_amd64.go | |
parent | 51533fdac6157c4abb546619bf05530821557539 (diff) | |
download | go-e0ac5f540bf0d5fff39ce05d60e82d97a011e935.tar.gz go-e0ac5f540bf0d5fff39ce05d60e82d97a011e935.zip |
runtime: use internal/cpu instead of support_avx
After CL 104636 cpu.X86.HasAVX is set early enough that it can be used
to determine useAVXmemmove. Use it and remove support_avx.
Change-Id: Ib7a627bede2bf96c92362507e742bd833cb42a74
Reviewed-on: https://go-review.googlesource.com/106235
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/cpuflags_amd64.go')
-rw-r--r-- | src/runtime/cpuflags_amd64.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/cpuflags_amd64.go b/src/runtime/cpuflags_amd64.go index 3e408dae5f..9d2d4fcbe2 100644 --- a/src/runtime/cpuflags_amd64.go +++ b/src/runtime/cpuflags_amd64.go @@ -4,6 +4,8 @@ package runtime +import "internal/cpu" + var useAVXmemmove bool func init() { @@ -16,5 +18,5 @@ func init() { processor == 0x306A0 || processor == 0x306E0 - useAVXmemmove = support_avx && !isIntelBridgeFamily + useAVXmemmove = cpu.X86.HasAVX && !isIntelBridgeFamily } |