aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/internal/atomic/atomic_wasm.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2019-10-23 09:47:53 -0400
committerAustin Clements <austin@google.com>2019-10-29 03:18:52 +0000
commitd2101e54908dc6899863be0772658dbd7e0bbc71 (patch)
treed7fe851bcc4e4c7972c9105b0219b757801b1eec /src/runtime/internal/atomic/atomic_wasm.go
parentfd1e60f6e3bd42075e335a90ad36719ffed0eb1a (diff)
downloadgo-d2101e54908dc6899863be0772658dbd7e0bbc71.tar.xz
runtime/internal/atomic: add Store8
We already have Load8, And8, and Or8. For #10958, #24543, but makes sense on its own. Change-Id: I478529fc643edc57efdeccaae413c99edd19b2eb Reviewed-on: https://go-review.googlesource.com/c/go/+/203283 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/internal/atomic/atomic_wasm.go')
-rw-r--r--src/runtime/internal/atomic/atomic_wasm.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/internal/atomic/atomic_wasm.go b/src/runtime/internal/atomic/atomic_wasm.go
index 0731763ac1..9037c2f7c8 100644
--- a/src/runtime/internal/atomic/atomic_wasm.go
+++ b/src/runtime/internal/atomic/atomic_wasm.go
@@ -143,6 +143,12 @@ func StoreRel(ptr *uint32, val uint32) {
//go:nosplit
//go:noinline
+func Store8(ptr *uint8, val uint8) {
+ *ptr = val
+}
+
+//go:nosplit
+//go:noinline
func Store64(ptr *uint64, val uint64) {
*ptr = val
}