]> Cypherpunks repositories - gostls13.git/commit
test/codegen: simplify asmcheck pattern matching
authorRuss Cox <rsc@golang.org>
Mon, 27 Oct 2025 02:51:14 +0000 (22:51 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 29 Oct 2025 20:55:00 +0000 (13:55 -0700)
commit915c1839fe76aef4bea6191282be1e48ef1c64e2
treeb563df58f5cc2438206d7adf45bdfa58fa389837
parent32ee3f3f73dc09f1981d295963bd705b6b9941da
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>
48 files changed:
src/cmd/internal/testdir/testdir_test.go
test/codegen/addrcalc.go
test/codegen/alloc.go
test/codegen/arithmetic.go
test/codegen/atomics.go
test/codegen/bitfield.go
test/codegen/bits.go
test/codegen/bmi.go
test/codegen/bool.go
test/codegen/clobberdead.go
test/codegen/clobberdeadreg.go
test/codegen/compare_and_branch.go
test/codegen/comparisons.go
test/codegen/condmove.go
test/codegen/constants.go
test/codegen/copy.go
test/codegen/floats.go
test/codegen/fuse.go
test/codegen/ifaces.go
test/codegen/issue25378.go
test/codegen/issue52635.go
test/codegen/issue56440.go
test/codegen/issue60324.go
test/codegen/issue74485.go
test/codegen/load_type_from_itab.go
test/codegen/logic.go
test/codegen/maps.go
test/codegen/math.go
test/codegen/mathbits.go
test/codegen/memcombine.go
test/codegen/memops.go
test/codegen/multiply.go
test/codegen/noextend.go
test/codegen/reflect_type.go
test/codegen/regabi_regalloc.go
test/codegen/retpoline.go
test/codegen/rotate.go
test/codegen/schedule.go
test/codegen/select.go
test/codegen/shift.go
test/codegen/slices.go
test/codegen/smallintiface.go
test/codegen/stack.go
test/codegen/strings.go
test/codegen/structs.go
test/codegen/switch.go
test/codegen/typeswitch.go
test/codegen/zerosize.go