diff options
author | nimelehin <nimelehin@gmail.com> | 2021-09-15 18:37:08 +0000 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2021-09-15 20:29:43 +0000 |
commit | 03df68d3c33e83a23cf5f22389a37f2d09721bef (patch) | |
tree | dab4001c21b78559d4a1f049e7875db893ab3283 | |
parent | 6196979365ec6b527b3731c9ec13d7ddfe429f86 (diff) | |
download | go-03df68d3c33e83a23cf5f22389a37f2d09721bef.tar.gz go-03df68d3c33e83a23cf5f22389a37f2d09721bef.zip |
runtime: fix setting of cpu features for amd64
Because of wrong case of letters, the cpu features flags were not
set properly for amd64.
Fixes #48406.
Change-Id: If19782851670e91fd31d119f4701c47373fa7e71
GitHub-Last-Rev: 91c7321ca49343c86917f071babec8a004ca5c77
GitHub-Pull-Request: golang/go#48403
Reviewed-on: https://go-review.googlesource.com/c/go/+/350151
Trust: Keith Randall <khr@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
-rw-r--r-- | src/runtime/proc.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go index 197441dfa7..605e133000 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -623,7 +623,7 @@ func cpuinit() { // Support cpu feature variables are used in code generated by the compiler // to guard execution of instructions that can not be assumed to be always supported. switch GOARCH { - case "386", "AMD64": + case "386", "amd64": x86HasPOPCNT = cpu.X86.HasPOPCNT x86HasSSE41 = cpu.X86.HasSSE41 x86HasFMA = cpu.X86.HasFMA |