diff options
Diffstat (limited to 'test/codegen')
| -rw-r--r-- | test/codegen/README | 7 | ||||
| -rw-r--r-- | test/codegen/issue74788.go | 17 |
2 files changed, 24 insertions, 0 deletions
diff --git a/test/codegen/README b/test/codegen/README index 19a73d031c..33b9fbc49c 100644 --- a/test/codegen/README +++ b/test/codegen/README @@ -98,6 +98,13 @@ For example: verifies that NO memmove call is present in the assembly generated for the copy() line. +The expected number of matches for the regexp can be specified using a +positive number: + + func fb(a [4]int) (r [4]int) { + // amd64:2`MOVUPS[^,]+, X0$`,2`MOVUPS\sX0,[^\n]+$` + return a + } - Architecture specifiers diff --git a/test/codegen/issue74788.go b/test/codegen/issue74788.go new file mode 100644 index 0000000000..d04a89b42e --- /dev/null +++ b/test/codegen/issue74788.go @@ -0,0 +1,17 @@ +// asmcheck + +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package codegen + +func fa(a [2]int) (r [2]int) { + // amd64:1`MOVUPS[^,]+, X0$`,1`MOVUPS\sX0,[^\n]+$` + return a +} + +func fb(a [4]int) (r [4]int) { + // amd64:2`MOVUPS[^,]+, X0$`,2`MOVUPS\sX0,[^\n]+$` + return a +} |
