mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: mark architecture-specific unsafe points
Introduce a mechanism for marking architecture-specific Ops unsafe. And mark ones that use REGTMP on ARM64, as for async preemption we will be using REGTMP as a temporary register in the injected call. Change-Id: I8ff22e87d8f9cb10d02a2f0af7c12ad6d7d58f54 Reviewed-on: https://go-review.googlesource.com/c/go/+/203459 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
parent
0f992b9948
commit
4a7ed1fab7
5 changed files with 32 additions and 8 deletions
|
|
@ -639,6 +639,15 @@ func (lv *Liveness) markUnsafePoints() {
|
|||
|
||||
lv.unsafePoints = bvalloc(int32(lv.f.NumValues()))
|
||||
|
||||
// Mark architecture-specific unsafe pointes.
|
||||
for _, b := range lv.f.Blocks {
|
||||
for _, v := range b.Values {
|
||||
if v.Op.UnsafePoint() {
|
||||
lv.unsafePoints.Set(int32(v.ID))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Mark write barrier unsafe points.
|
||||
for _, wbBlock := range lv.f.WBLoads {
|
||||
if wbBlock.Kind == ssa.BlockPlain && len(wbBlock.Values) == 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue