]> Cypherpunks repositories - gostls13.git/commit
runtime: remove the restriction that write barrier ptrs come in pairs
authorKeith Randall <khr@golang.org>
Wed, 26 Oct 2022 00:58:07 +0000 (17:58 -0700)
committerKeith Randall <khr@golang.org>
Fri, 17 Feb 2023 22:19:26 +0000 (22:19 +0000)
commitd3daeb5267b626db36adf2f39c36f6caf94447e3
tree9260d979d13b9cd790a2f1167069a34dfbedeef2
parent209df389c215d9a1eee15ce1c1e4d82f43e026db
runtime: remove the restriction that write barrier ptrs come in pairs

Future CLs will remove the invariant that pointers are always put in
the write barrier in pairs.

The behavior of the assembly code changes a bit, where instead of writing
the pointers unconditionally and then checking for overflow, check for
overflow first and then write the pointers.

Also changed the write barrier flush function to not take the src/dst
as arguments.

Change-Id: I2ef708038367b7b82ea67cbaf505a1d5904c775c
Reviewed-on: https://go-review.googlesource.com/c/go/+/447779
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Bypass: Keith Randall <khr@golang.org>
15 files changed:
src/cmd/compile/internal/test/inl_test.go
src/runtime/asm_386.s
src/runtime/asm_amd64.s
src/runtime/asm_arm.s
src/runtime/asm_arm64.s
src/runtime/asm_loong64.s
src/runtime/asm_mips64x.s
src/runtime/asm_mipsx.s
src/runtime/asm_ppc64x.s
src/runtime/asm_riscv64.s
src/runtime/asm_s390x.s
src/runtime/asm_wasm.s
src/runtime/atomic_pointer.go
src/runtime/mbitmap.go
src/runtime/mwbbuf.go