]> Cypherpunks repositories - gostls13.git/commit
runtime: save R15 before checking AVX state
authorKeith Randall <khr@golang.org>
Mon, 1 Feb 2021 08:45:41 +0000 (00:45 -0800)
committerKeith Randall <khr@golang.org>
Tue, 23 Feb 2021 20:05:37 +0000 (20:05 +0000)
commitc49c7a675a2c8ee7591a2d6243255813856b65ce
treed464e707368f75500d3bb32f2a023bb538b919f9
parentd2911d76127deaa08644979cec7d990559f0aa54
runtime: save R15 before checking AVX state

When in dynlink mode, reading a global can clobber R15.
Just to be safe, save R15 before checking the AVX state to see
if we need to VZEROUPPER or not.

This could cause a problem in buildmodes that aren't supported yet.

Change-Id: I8fda62d3fbe808584774fa5e8d9810a4612a84e5
Reviewed-on: https://go-review.googlesource.com/c/go/+/288452
Trust: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/runtime/mkpreempt.go
src/runtime/preempt_amd64.s