diff options
| author | Paul E. Murphy <murp@ibm.com> | 2023-01-18 15:20:15 -0600 |
|---|---|---|
| committer | Paul Murphy <murp@ibm.com> | 2023-01-24 22:55:18 +0000 |
| commit | a37672bb7bef3d0163dd18f9f6914e2f829f1148 (patch) | |
| tree | 6dc62656dc61e4225077f6c5fc85d77d1182231d /test/codegen/condmove.go | |
| parent | 91c1c5922dcfc646fa9b1c2b3d506abe0956e97f (diff) | |
| download | go-a37672bb7bef3d0163dd18f9f6914e2f829f1148.tar.xz | |
test/codegen: accept ppc64x as alias for ppc64le and ppc64 arches
This helps simplify the noise when adding ppc codegen tests. ppc64x
is used in other places to indicate something which runs on either
endian.
This helps cleanup existing codegen tests which are mostly
identical between endian variants.
condmove tests are converted as an example.
Change-Id: I2b2d98a9a1859015f62db38d62d9d5d7593435b4
Reviewed-on: https://go-review.googlesource.com/c/go/+/462895
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Paul Murphy <murp@ibm.com>
Diffstat (limited to 'test/codegen/condmove.go')
| -rw-r--r-- | test/codegen/condmove.go | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/test/codegen/condmove.go b/test/codegen/condmove.go index 7b0f32e708..6c08116b2c 100644 --- a/test/codegen/condmove.go +++ b/test/codegen/condmove.go @@ -13,8 +13,7 @@ func cmovint(c int) int { } // amd64:"CMOVQLT" // arm64:"CSEL\tLT" - // ppc64:"ISEL\t[$]0" - // ppc64le:"ISEL\t[$]0" + // ppc64x:"ISEL\t[$]0" // wasm:"Select" return x } @@ -25,8 +24,7 @@ func cmovchan(x, y chan int) chan int { } // amd64:"CMOVQNE" // arm64:"CSEL\tNE" - // ppc64:"ISEL\t[$]2" - // ppc64le:"ISEL\t[$]2" + // ppc64x:"ISEL\t[$]2" // wasm:"Select" return x } @@ -37,8 +35,7 @@ func cmovuintptr(x, y uintptr) uintptr { } // amd64:"CMOVQ(HI|CS)" // arm64:"CSNEG\tLS" - // ppc64:"ISEL\t[$]1" - // ppc64le:"ISEL\t[$]1" + // ppc64x:"ISEL\t[$]1" // wasm:"Select" return x } @@ -49,8 +46,7 @@ func cmov32bit(x, y uint32) uint32 { } // amd64:"CMOVL(HI|CS)" // arm64:"CSNEG\t(LS|HS)" - // ppc64:"ISEL\t[$]1" - // ppc64le:"ISEL\t[$]1" + // ppc64x:"ISEL\t[$]1" // wasm:"Select" return x } @@ -61,8 +57,7 @@ func cmov16bit(x, y uint16) uint16 { } // amd64:"CMOVW(HI|CS)" // arm64:"CSNEG\t(LS|HS)" - // ppc64:"ISEL\t[$]0" - // ppc64le:"ISEL\t[$]0" + // ppc64x:"ISEL\t[$]0" // wasm:"Select" return x } @@ -76,8 +71,7 @@ func cmovfloateq(x, y float64) int { } // amd64:"CMOVQNE","CMOVQPC" // arm64:"CSEL\tEQ" - // ppc64:"ISEL\t[$]2" - // ppc64le:"ISEL\t[$]2" + // ppc64x:"ISEL\t[$]2" // wasm:"Select" return a } @@ -89,8 +83,7 @@ func cmovfloatne(x, y float64) int { } // amd64:"CMOVQNE","CMOVQPS" // arm64:"CSEL\tNE" - // ppc64:"ISEL\t[$]2" - // ppc64le:"ISEL\t[$]2" + // ppc64x:"ISEL\t[$]2" // wasm:"Select" return a } @@ -117,8 +110,7 @@ func cmovfloatint2(x, y float64) float64 { } // amd64:"CMOVQHI" // arm64:"CSEL\tMI" - // ppc64:"ISEL\t[$]0" - // ppc64le:"ISEL\t[$]0" + // ppc64x:"ISEL\t[$]0" // wasm:"Select" r = r - ldexp(y, rexp-yexp) } @@ -133,8 +125,7 @@ func cmovloaded(x [4]int, y int) int { } // amd64:"CMOVQNE" // arm64:"CSEL\tNE" - // ppc64:"ISEL\t[$]2" - // ppc64le:"ISEL\t[$]2" + // ppc64x:"ISEL\t[$]2" // wasm:"Select" return y } @@ -146,13 +137,12 @@ func cmovuintptr2(x, y uintptr) uintptr { } // amd64:"CMOVQEQ" // arm64:"CSEL\tEQ" - // ppc64:"ISEL\t[$]2" - // ppc64le:"ISEL\t[$]2" + // ppc64x:"ISEL\t[$]2" // wasm:"Select" return a } -// Floating point CMOVs are not supported by amd64/arm64/ppc64/ppc64le +// Floating point CMOVs are not supported by amd64/arm64/ppc64x func cmovfloatmove(x, y int) float64 { a := 1.0 if x <= y { @@ -160,8 +150,7 @@ func cmovfloatmove(x, y int) float64 { } // amd64:-"CMOV" // arm64:-"CSEL" - // ppc64:-"ISEL" - // ppc64le:-"ISEL" + // ppc64x:-"ISEL" // wasm:-"Select" return a } @@ -450,8 +439,7 @@ func cmovzeroreg0(a, b int) int { if a == b { x = a } - // ppc64:"ISEL\t[$]2, R[0-9]+, R0, R[0-9]+" - // ppc64le:"ISEL\t[$]2, R[0-9]+, R0, R[0-9]+" + // ppc64x:"ISEL\t[$]2, R[0-9]+, R0, R[0-9]+" return x } @@ -460,7 +448,6 @@ func cmovzeroreg1(a, b int) int { if a == b { x = 0 } - // ppc64:"ISEL\t[$]2, R0, R[0-9]+, R[0-9]+" - // ppc64le:"ISEL\t[$]2, R0, R[0-9]+, R[0-9]+" + // ppc64x:"ISEL\t[$]2, R0, R[0-9]+, R[0-9]+" return x } |
