]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/arm64: mark unsafe points
authorCherry Zhang <cherryyz@google.com>
Mon, 21 Oct 2019 18:08:11 +0000 (14:08 -0400)
committerCherry Zhang <cherryyz@google.com>
Thu, 7 Nov 2019 19:17:50 +0000 (19:17 +0000)
commit47360884638e5c8ad65003515b324ec33b823861
treeb880c067af46058609cfd99b6cbbdb9a99cd0643
parente5ce13c178cc0be72ca220b4c3f0c95f570c19ab
cmd/internal/obj/arm64: mark unsafe points

For async preemption, we will be using REGTMP as a temporary
register in injected call on ARM64, which will clobber it. So any
code that uses REGTMP is not safe for async preemption.

In the assembler backend, we expand a Prog to multiple machine
instructions and use REGTMP as a temporary register if necessary.
These need to be marked unsafe. In fact, most of the
multi-instruction Progs use REGTMP, so we mark all of them,
except ones that are whitelisted.

Change-Id: I6e97805a13950e3b693fb606d77834940ac3722e
Reviewed-on: https://go-review.googlesource.com/c/go/+/203460
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/internal/obj/arm64/asm7.go
src/cmd/internal/obj/arm64/obj7.go
src/cmd/internal/obj/plist.go