diff options
| author | Keith Randall <khr@golang.org> | 2024-11-23 17:35:02 -0800 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2025-02-13 14:08:14 -0800 |
| commit | 187fd2698d2f9fc2fc52aa7d4c0922552f848e98 (patch) | |
| tree | 5d0e7f24d705e201037a919179c2af61933aa77f /test/codegen | |
| parent | a0029e95e5d6f15cab70e533d447c75aa4211636 (diff) | |
| download | go-187fd2698d2f9fc2fc52aa7d4c0922552f848e98.tar.xz | |
cmd/compile: make write barrier code amenable to paired loads/stores
It currently isn't because it does load/store/load/store/...
Rework to do overwrite processing in pairs so it is instead
load/load/store/store/...
Change-Id: If7be629bc4048da5f2386dafb8f05759b79e9e2b
Reviewed-on: https://go-review.googlesource.com/c/go/+/631495
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'test/codegen')
| -rw-r--r-- | test/codegen/writebarrier.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/codegen/writebarrier.go b/test/codegen/writebarrier.go index e2b1399399..c3c39c58f7 100644 --- a/test/codegen/writebarrier.go +++ b/test/codegen/writebarrier.go @@ -88,3 +88,16 @@ func issue71228(dst *S, ptr *int) { //amd64:`.*runtime[.]wbMove` *dst = *sp } + +func writeDouble(p *[2]*int, x, y *int) { + // arm64: `LDP\s`, `STP\s\(R[0-9]+, R[0-9]+\), \(`, + p[0] = x + // arm64: `STP\s\(R[0-9]+, R[0-9]+\), 16\(`, + p[1] = y +} + +func writeDoubleNil(p *[2]*int) { + // arm64: `LDP\s`, `STP\s\(R[0-9]+, R[0-9]+\),`, `STP\s\(ZR, ZR\),` + p[0] = nil + p[1] = nil +} |
