summaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/sys/cpu/cpu_x86.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/sys/cpu/cpu_x86.go')
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_x86.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/vendor/golang.org/x/sys/cpu/cpu_x86.go b/vendor/golang.org/x/sys/cpu/cpu_x86.go
index 5ea287b7e..f5aacfc82 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_x86.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_x86.go
@@ -90,9 +90,10 @@ func archInit() {
osSupportsAVX = isSet(1, eax) && isSet(2, eax)
if runtime.GOOS == "darwin" {
- // Check darwin commpage for AVX512 support. Necessary because:
- // https://github.com/apple/darwin-xnu/blob/0a798f6738bc1db01281fc08ae024145e84df927/osfmk/i386/fpu.c#L175-L201
- osSupportsAVX512 = osSupportsAVX && darwinSupportsAVX512()
+ // Darwin doesn't save/restore AVX-512 mask registers correctly across signal handlers.
+ // Since users can't rely on mask register contents, let's not advertise AVX-512 support.
+ // See issue 49233.
+ osSupportsAVX512 = false
} else {
// Check if OPMASK and ZMM registers have OS support.
osSupportsAVX512 = osSupportsAVX && isSet(5, eax) && isSet(6, eax) && isSet(7, eax)