]> Cypherpunks repositories - gostls13.git/commit
internal/cpu: detect support of AVX512
authorAchille Roussel <achille.roussel@gmail.com>
Wed, 18 Oct 2023 19:21:55 +0000 (19:21 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 15 Nov 2023 18:30:03 +0000 (18:30 +0000)
commit8f262a2843a6f3ef32e938ce39c0ffeb84f04a42
treeca40845996cae5efdd651a33d1bb60fe7a620e9f
parent6ef98ac87c8a4185c0bace496d84cb3b68f069e3
internal/cpu: detect support of AVX512

Extracts changes from that were submitted in other CLs to enable AVX512
detection, notably:
- https://go-review.googlesource.com/c/go/+/271521
- https://go-review.googlesource.com/c/go/+/379394
- https://go-review.googlesource.com/c/go/+/502476

This change adds properties to the cpu.X86 fields to enable runtime
detection of AVX512, and the hasAVX512F, hasAVX512BW, and hasAVX512VL
macros to support bypassing runtime checks in assembly code when
GOAMD64=v4 is set.

Change-Id: Ia7c3f22f1e66bf1de575aba522cb0d0a55ce791f
Reviewed-on: https://go-review.googlesource.com/c/go/+/536257
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Martin Möhrmann <martin@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Martin Möhrmann <martin@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
Commit-Queue: Martin Möhrmann <martin@golang.org>
Reviewed-by: Martin Möhrmann <moehrmann@google.com>
src/internal/cpu/cpu.go
src/internal/cpu/cpu_x86.go
src/internal/cpu/cpu_x86_test.go
src/runtime/asm_amd64.h
src/runtime/asm_amd64.s