aboutsummaryrefslogtreecommitdiff
path: root/test/codegen/maps.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/maps.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/maps.go')
-rw-r--r--test/codegen/maps.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/codegen/maps.go b/test/codegen/maps.go
index 860b2c2cbd..fe38c99cb8 100644
--- a/test/codegen/maps.go
+++ b/test/codegen/maps.go
@@ -16,12 +16,12 @@ package codegen
// Direct use of constants in fast map access calls (Issue #19015).
func AccessInt1(m map[int]int) int {
- // amd64:"MOV[LQ]\t[$]5"
+ // amd64:"MOV[LQ] [$]5"
return m[5]
}
func AccessInt2(m map[int]int) bool {
- // amd64:"MOV[LQ]\t[$]5"
+ // amd64:"MOV[LQ] [$]5"
_, ok := m[5]
return ok
}
@@ -147,7 +147,7 @@ func MapClearSideEffect(m map[int]int) int {
func MapLiteralSizing(x int) (map[int]int, map[int]int) {
// This is tested for internal/abi/maps.go:MapBucketCountBits={3,4,5}
- // amd64:"MOVL\t[$]33,"
+ // amd64:"MOVL [$]33,"
m := map[int]int{
0: 0,
1: 1,
@@ -183,7 +183,7 @@ func MapLiteralSizing(x int) (map[int]int, map[int]int) {
31: 32,
32: 32,
}
- // amd64:"MOVL\t[$]33,"
+ // amd64:"MOVL [$]33,"
n := map[int]int{
0: 0,
1: 1,