aboutsummaryrefslogtreecommitdiff
path: root/test/codegen/alloc.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2025-10-26 22:51:14 -0400
committerRuss Cox <rsc@golang.org>2025-10-29 13:55:00 -0700
commit915c1839fe76aef4bea6191282be1e48ef1c64e2 (patch)
treeb563df58f5cc2438206d7adf45bdfa58fa389837 /test/codegen/alloc.go
parent32ee3f3f73dc09f1981d295963bd705b6b9941da (diff)
downloadgo-915c1839fe76aef4bea6191282be1e48ef1c64e2.tar.xz
test/codegen: simplify asmcheck pattern matching
Separate patterns in asmcheck by spaces instead of commas. Many patterns end in comma (like "MOV [$]123,") so separating patterns by comma is not great; they're already quoted, so spaces are fine. Also replace all tabs in the assembly lines with spaces before matching. Finally, replace \$ or \\$ with [$] as the matching idiom. The effect of all these is to make the patterns look like: // amd64:"BSFQ" "ORQ [$]256" instead of the old: // amd64:"BSFQ","ORQ\t\\$256" Update all tests as well. Change-Id: Ia39febe5d7f67ba115846422789e11b185d5c807 Reviewed-on: https://go-review.googlesource.com/c/go/+/716060 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Diffstat (limited to 'test/codegen/alloc.go')
-rw-r--r--test/codegen/alloc.go30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/codegen/alloc.go b/test/codegen/alloc.go
index c6ff004eed..20ccc853c6 100644
--- a/test/codegen/alloc.go
+++ b/test/codegen/alloc.go
@@ -10,28 +10,28 @@
package codegen
func zeroAllocNew1() *struct{} {
- // 386:-`CALL\truntime\.newobject`, `LEAL\truntime.zerobase`
- // amd64:-`CALL\truntime\.newobject`, `LEAQ\truntime.zerobase`
- // arm:-`CALL\truntime\.newobject`, `MOVW\t[$]runtime.zerobase`
- // arm64:-`CALL\truntime\.newobject`, `MOVD\t[$]runtime.zerobase`
- // riscv64:-`CALL\truntime\.newobject`, `MOV\t[$]runtime.zerobase`
+ // 386:-`CALL runtime\.newobject`, `LEAL runtime.zerobase`
+ // amd64:-`CALL runtime\.newobject`, `LEAQ runtime.zerobase`
+ // arm:-`CALL runtime\.newobject`, `MOVW [$]runtime.zerobase`
+ // arm64:-`CALL runtime\.newobject`, `MOVD [$]runtime.zerobase`
+ // riscv64:-`CALL runtime\.newobject`, `MOV [$]runtime.zerobase`
return new(struct{})
}
func zeroAllocNew2() *[0]int {
- // 386:-`CALL\truntime\.newobject`, `LEAL\truntime.zerobase`
- // amd64:-`CALL\truntime\.newobject`, `LEAQ\truntime.zerobase`
- // arm:-`CALL\truntime\.newobject`, `MOVW\t[$]runtime.zerobase`
- // arm64:-`CALL\truntime\.newobject`, `MOVD\t[$]runtime.zerobase`
- // riscv64:-`CALL\truntime\.newobject`, `MOV\t[$]runtime.zerobase`
+ // 386:-`CALL runtime\.newobject`, `LEAL runtime.zerobase`
+ // amd64:-`CALL runtime\.newobject`, `LEAQ runtime.zerobase`
+ // arm:-`CALL runtime\.newobject`, `MOVW [$]runtime.zerobase`
+ // arm64:-`CALL runtime\.newobject`, `MOVD [$]runtime.zerobase`
+ // riscv64:-`CALL runtime\.newobject`, `MOV [$]runtime.zerobase`
return new([0]int)
}
func zeroAllocSliceLit() []int {
- // 386:-`CALL\truntime\.newobject`, `LEAL\truntime.zerobase`
- // amd64:-`CALL\truntime\.newobject`, `LEAQ\truntime.zerobase`
- // arm:-`CALL\truntime\.newobject`, `MOVW\t[$]runtime.zerobase`
- // arm64:-`CALL\truntime\.newobject`, `MOVD\t[$]runtime.zerobase`
- // riscv64:-`CALL\truntime\.newobject`, `MOV\t[$]runtime.zerobase`
+ // 386:-`CALL runtime\.newobject`, `LEAL runtime.zerobase`
+ // amd64:-`CALL runtime\.newobject`, `LEAQ runtime.zerobase`
+ // arm:-`CALL runtime\.newobject`, `MOVW [$]runtime.zerobase`
+ // arm64:-`CALL runtime\.newobject`, `MOVD [$]runtime.zerobase`
+ // riscv64:-`CALL runtime\.newobject`, `MOV [$]runtime.zerobase`
return []int{}
}