test/codegen: fix some unbalanced quotes

Change-Id: I081da8c79f0264118e079af21ff58c511ae37e6c
Reviewed-on: https://go-review.googlesource.com/c/go/+/760682
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@google.com>
This commit is contained in:
Keith Randall
2026-03-27 17:14:43 -07:00
committed by Gopher Robot
parent d5b6d583c1
commit 1582ad4105
5 changed files with 7 additions and 5 deletions

View File

@@ -1683,6 +1683,8 @@ func (t test) wantedAsmOpcodes(fn string) asmChecks {
tail := comment[lastUsed:]
if possibleOpcodeRx.MatchString(tail) {
t.Errorf("%s:%d: possible unused assembly pattern: %v", t.goFileName(), i+1, tail)
} else if strings.Count(comment, "\"")%2 != 0 || strings.Count(comment, "`")%2 != 0 {
t.Errorf("%s:%d: unbalanced quotes: %v", t.goFileName(), i+1, comment)
}
}
comment = ""

View File

@@ -606,7 +606,7 @@ func LenDiv1(a []int) int {
// amd64:"SHRQ [$]10"
// arm64:"LSR [$]10" -"SDIV"
// arm:"SRL [$]10" -".*udiv"
// ppc64x:"SRD" [$]10"
// ppc64x:"SRD [$]10"
return len(a) / 1024
}

View File

@@ -429,7 +429,7 @@ func store_le64(b []byte, x uint64) {
// amd64:`MOVQ .*\(.*\)$` -`SHR.`
// arm64:`MOVD` -`MOV[WBH]`
// ppc64le:`MOVD ` -`MOV[BHW] `
// ppc64:`MOVDBR` -MOVB `
// ppc64:`MOVDBR` -`MOVB `
// s390x:`MOVDBR .*\(.*\)$`
binary.LittleEndian.PutUint64(b, x)
}

View File

@@ -33,7 +33,7 @@ func loadLargeOffset(sw *big1, sd *big2) (uint32, uint64) {
// ppc64x/power9:`ADD` `MOVD +\(R[0-9]+\), R[0-9]+`
// ppc64x/power8:`ADD` `MOVD +\(R[0-9]+\), R[0-9]+`
b4 := sd.d[1<<16]
// ppc64le/power10`:`MOVD +[0-9]+\(R[0-9]+\)` -`ADD`
// ppc64le/power10:`MOVD +[0-9]+\(R[0-9]+\)` -`ADD`
// ppc64x/power9:`ADD` `MOVD +\(R[0-9]+\), R[0-9]+`
// ppc64x/power8:`ADD` `MOVD +\(R[0-9]+\), R[0-9]+`
c4 := sd.d[1<<27]
@@ -62,7 +62,7 @@ func storeLargeOffset(sw *big1, sd *big2) {
// ppc64x/power9:`MOVD +R[0-9]+, \(R[0-9]+\)` `ADD`
// ppc64x/power8:`MOVD +R[0-9]+, \(R[0-9]+\)` `ADD`
sd.d[1<<16] = uint64(50)
// ppc64le/power10`:`MOVD +R[0-9]+, [0-9]+\(R[0-9]+\)` -`ADD`
// ppc64le/power10:`MOVD +R[0-9]+, [0-9]+\(R[0-9]+\)` -`ADD`
// ppc64x/power9:`MOVD +R[0-9]+, \(R[0-9]+\)` `ADD`
// ppc64x/power8:`MOVD +R[0-9]+, \(R[0-9]+\)` `ADD`
sd.d[1<<27] = uint64(60)

View File

@@ -173,7 +173,7 @@ func m27(x int64) int64 {
}
func m28(x int64) int64 {
// amd64: "IMUL3Q [$]28,"
// arm64: "LSL [$]5, "SUB R[0-9]+<<2,"
// arm64: "LSL [$]5," "SUB R[0-9]+<<2,"
// loong64: "ALSLV [$]1," "SLLV [$]2," "ALSLV [$]3,"
return x * 28
}