mirror of https://github.com/golang/go.git
runtime/internal/atomic: fix s390x's StorepNoWB implementation
Same as CL 170323, but for s390x instead of wasm. Fixes #31495. Change-Id: Ie39f649f5e33690375a8bcb1bc3b92d912ca4398 Reviewed-on: https://go-review.googlesource.com/c/go/+/172417 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
644543dd64
commit
13b7c04d3f
|
|
@ -42,11 +42,14 @@ func Store64(ptr *uint64, val uint64) {
|
||||||
*ptr = val
|
*ptr = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//go:notinheap
|
||||||
|
type noWB struct{}
|
||||||
|
|
||||||
// NO go:noescape annotation; see atomic_pointer.go.
|
// NO go:noescape annotation; see atomic_pointer.go.
|
||||||
//go:noinline
|
//go:noinline
|
||||||
//go:nosplit
|
//go:nosplit
|
||||||
func StorepNoWB(ptr unsafe.Pointer, val unsafe.Pointer) {
|
func StorepNoWB(ptr unsafe.Pointer, val unsafe.Pointer) {
|
||||||
*(*uintptr)(ptr) = uintptr(val)
|
*(**noWB)(ptr) = (*noWB)(val)
|
||||||
}
|
}
|
||||||
|
|
||||||
//go:noinline
|
//go:noinline
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue