aboutsummaryrefslogtreecommitdiff
path: root/test/codegen/noextend.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2026-03-27 16:20:06 -0700
committerGopher Robot <gobot@golang.org>2026-03-31 11:01:13 -0700
commitd6492e284b61c8be4bfce5ee0ca907f4df5deb72 (patch)
tree2dd97ab6ef6c6ae41d93bcbf21e133ec500f79e8 /test/codegen/noextend.go
parent1673075d4bd324e69cb4e6e58760316e2c84e604 (diff)
downloadgo-d6492e284b61c8be4bfce5ee0ca907f4df5deb72.tar.xz
test/codegen: get rid of \s
Replace \s with a space in backtick-quoted strings Replace \\s with a space in double-quoted strings Change-Id: I0c8b249bb12c2c8ca69e683e4bc6f27544fd6094 Reviewed-on: https://go-review.googlesource.com/c/go/+/760680 Auto-Submit: Keith Randall <khr@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Paul Murphy <paumurph@redhat.com> Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'test/codegen/noextend.go')
-rw-r--r--test/codegen/noextend.go60
1 files changed, 30 insertions, 30 deletions
diff --git a/test/codegen/noextend.go b/test/codegen/noextend.go
index d9f1c77289..4aba1c5877 100644
--- a/test/codegen/noextend.go
+++ b/test/codegen/noextend.go
@@ -26,7 +26,7 @@ var val8 [8]uint8
func set16(x8 int8, u8 *uint8, y8 int8, z8 uint8) {
// Truncate not needed, load does sign/zero extend
- // ppc64x:-"MOVBZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVBZ R\\d+, R\\d+"
val16[0] = uint16(*u8)
// AND not needed due to size
@@ -39,20 +39,20 @@ func set16(x8 int8, u8 *uint8, y8 int8, z8 uint8) {
}
func shiftidx(u8 *uint8, x16 *int16, u16 *uint16) {
- // ppc64x:-"MOVBZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVBZ R\\d+, R\\d+"
val16[0] = uint16(sval16[*u8>>2])
- // ppc64x:-"MOVH R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVH R\\d+, R\\d+"
sval16[1] = int16(val16[*x16>>1])
- // ppc64x:-"MOVHZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVHZ R\\d+, R\\d+"
val16[1] = uint16(sval16[*u16>>2])
}
func setnox(x8 int8, u8 *uint8, y8 *int8, z8 *uint8, x16 *int16, u16 *uint16, x32 *int32, u32 *uint32) {
- // ppc64x:-"MOVBZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVBZ R\\d+, R\\d+"
val16[0] = uint16(*u8)
// AND not needed due to size
@@ -62,65 +62,65 @@ func setnox(x8 int8, u8 *uint8, y8 *int8, z8 *uint8, x16 *int16, u16 *uint16, x3
// ppc64x:-"ANDCC"
val16[1] = 255 & uint16(*u8+*z8)
- // ppc64x:-"MOVH R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVH R\\d+, R\\d+"
sval32[1] = int32(*x16)
- // ppc64x:-"MOVBZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVBZ R\\d+, R\\d+"
val32[0] = uint32(*u8)
- // ppc64x:-"MOVHZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVHZ R\\d+, R\\d+"
val32[1] = uint32(*u16)
- // ppc64x:-"MOVH R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVH R\\d+, R\\d+"
sval64[1] = int64(*x16)
- // ppc64x:-"MOVW R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVW R\\d+, R\\d+"
sval64[2] = int64(*x32)
- // ppc64x:-"MOVBZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVBZ R\\d+, R\\d+"
val64[0] = uint64(*u8)
- // ppc64x:-"MOVHZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVHZ R\\d+, R\\d+"
val64[1] = uint64(*u16)
- // ppc64x:-"MOVWZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVWZ R\\d+, R\\d+"
val64[2] = uint64(*u32)
}
func cmp16(u8 *uint8, x32 *int32, u32 *uint32, x64 *int64, u64 *uint64) bool {
- // ppc64x:-"MOVBZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVBZ R\\d+, R\\d+"
if uint16(*u8) == val16[0] {
return true
}
- // ppc64x:-"MOVHZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVHZ R\\d+, R\\d+"
if uint16(*u32>>16) == val16[0] {
return true
}
- // ppc64x:-"MOVHZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVHZ R\\d+, R\\d+"
if uint16(*u64>>48) == val16[0] {
return true
}
// Verify the truncates are using the correct sign.
- // ppc64x:-"MOVHZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVHZ R\\d+, R\\d+"
if int16(*x32) == sval16[0] {
return true
}
- // ppc64x:-"MOVH R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVH R\\d+, R\\d+"
if uint16(*u32) == val16[0] {
return true
}
- // ppc64x:-"MOVHZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVHZ R\\d+, R\\d+"
if int16(*x64) == sval16[0] {
return true
}
- // ppc64x:-"MOVH R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVH R\\d+, R\\d+"
if uint16(*u64) == val16[0] {
return true
}
@@ -130,28 +130,28 @@ func cmp16(u8 *uint8, x32 *int32, u32 *uint32, x64 *int64, u64 *uint64) bool {
func cmp32(u8 *uint8, x16 *int16, u16 *uint16, x64 *int64, u64 *uint64) bool {
- // ppc64x:-"MOVBZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVBZ R\\d+, R\\d+"
if uint32(*u8) == val32[0] {
return true
}
- // ppc64x:-"MOVH R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVH R\\d+, R\\d+"
if int32(*x16) == sval32[0] {
return true
}
- // ppc64x:-"MOVHZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVHZ R\\d+, R\\d+"
if uint32(*u16) == val32[0] {
return true
}
// Verify the truncates are using the correct sign.
- // ppc64x:-"MOVWZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVWZ R\\d+, R\\d+"
if int32(*x64) == sval32[0] {
return true
}
- // ppc64x:-"MOVW R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVW R\\d+, R\\d+"
if uint32(*u64) == val32[0] {
return true
}
@@ -161,27 +161,27 @@ func cmp32(u8 *uint8, x16 *int16, u16 *uint16, x64 *int64, u64 *uint64) bool {
func cmp64(u8 *uint8, x16 *int16, u16 *uint16, x32 *int32, u32 *uint32) bool {
- // ppc64x:-"MOVBZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVBZ R\\d+, R\\d+"
if uint64(*u8) == val64[0] {
return true
}
- // ppc64x:-"MOVH R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVH R\\d+, R\\d+"
if int64(*x16) == sval64[0] {
return true
}
- // ppc64x:-"MOVHZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVHZ R\\d+, R\\d+"
if uint64(*u16) == val64[0] {
return true
}
- // ppc64x:-"MOVW R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVW R\\d+, R\\d+"
if int64(*x32) == sval64[0] {
return true
}
- // ppc64x:-"MOVWZ R\\d+,\\sR\\d+"
+ // ppc64x:-"MOVWZ R\\d+, R\\d+"
if uint64(*u32) == val64[0] {
return true
}