]> Cypherpunks.ru repositories - gostls13.git/commit
internal/cpu: disable FMA when OSXSAVE is not enabled on x86
authorMartin Möhrmann <moehrmann@google.com>
Thu, 3 Dec 2020 15:41:57 +0000 (16:41 +0100)
committerMartin Möhrmann <moehrmann@google.com>
Thu, 3 Dec 2020 16:31:53 +0000 (16:31 +0000)
commitdda2991c2ea0c5914714469c4defc2562a907230
treeba9a0ad470f714eda686627243fd382fdf21e633
parent58768ae15b3f892b9b1902220ba3564375e5c6de
internal/cpu: disable FMA when OSXSAVE is not enabled on x86

All instructions in the FMA extension on x86 are VEX prefixed.
VEX prefixed instructions generally require OSXSAVE to be enabled.

The execution of FMA instructions emitted by the Go compiler on amd64
will generate an invalid opcode exception if OSXSAVE is not enabled.

Fixes #41022

Change-Id: I49881630e7195c804110a2bd81b5bec8cac31ba8
Reviewed-on: https://go-review.googlesource.com/c/go/+/274479
Trust: Martin Möhrmann <moehrmann@google.com>
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/internal/cpu/cpu_x86.go