aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/memclr_riscv64.s
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2021-01-28 14:57:55 -0500
committerCherry Zhang <cherryyz@google.com>2021-01-29 19:11:07 +0000
commit68058edc39edae96e34225ca163002233b623c97 (patch)
tree91575d0d1ffbde63ed98642fc94c629a02d60a37 /src/runtime/memclr_riscv64.s
parentc8bd8010ff7c0115bf186443119216ba51f09d2b (diff)
downloadgo-68058edc39edae96e34225ca163002233b623c97.tar.gz
go-68058edc39edae96e34225ca163002233b623c97.zip
runtime: document pointer write atomicity for memclrNoHeapPointers
memclrNoHeapPointers is the underlying implementation of typedmemclr and memclrHasPointers, so it still needs to write pointer-aligned words atomically. Document this requirement. Updates #41428. Change-Id: Ice00dee5de7a96a50e51ff019fcef069e8a8406a Reviewed-on: https://go-review.googlesource.com/c/go/+/287692 Trust: Cherry Zhang <cherryyz@google.com> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/memclr_riscv64.s')
-rw-r--r--src/runtime/memclr_riscv64.s2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/runtime/memclr_riscv64.s b/src/runtime/memclr_riscv64.s
index ba7704e805..54ddaa4560 100644
--- a/src/runtime/memclr_riscv64.s
+++ b/src/runtime/memclr_riscv64.s
@@ -4,6 +4,8 @@
#include "textflag.h"
+// See memclrNoHeapPointers Go doc for important implementation constraints.
+
// void runtime·memclrNoHeapPointers(void*, uintptr)
TEXT runtime·memclrNoHeapPointers(SB),NOSPLIT,$0-16
MOV ptr+0(FP), T1