]> Cypherpunks.ru repositories - gostls13.git/commitdiff
test/codegen: merge identical ppc64 and ppc64le tests
authorPaul E. Murphy <murp@ibm.com>
Tue, 24 Jan 2023 17:38:29 +0000 (11:38 -0600)
committerPaul Murphy <murp@ibm.com>
Fri, 27 Jan 2023 19:03:02 +0000 (19:03 +0000)
Manually consolidate the remaining ppc64/ppc64le test which
are not so trivial to automatically merge.

The remaining ppc64le tests are limited to cases where load/stores are
merged (this only happens on ppc64le) and the race detector (only
supported on ppc64le).

Change-Id: I1f9c0f3d3ddbb7fbbd8c81fbbd6537394fba63ce
Reviewed-on: https://go-review.googlesource.com/c/go/+/463217
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
test/codegen/arithmetic.go
test/codegen/bool.go
test/codegen/copy.go
test/codegen/mathbits.go
test/codegen/shift.go

index 00311e8b7f39245629d79c9a6bba0cd524f44503..2f06ac58d64ebe260e411d913acc0ffbadd1c0fc 100644 (file)
@@ -162,8 +162,8 @@ func MergeMuls1(n int) int {
 func MergeMuls2(n int) int {
        // amd64:"IMUL3Q\t[$]23","(ADDQ\t[$]29)|(LEAQ\t29)"
        // 386:"IMUL3L\t[$]23","ADDL\t[$]29"
-       // ppc64le/power9:"MADDLD",-"MULLD\t[$]23",-"ADD\t[$]29"
-       // ppc64le/power8:"MULLD\t[$]23","ADD\t[$]29"
+       // ppc64x/power9:"MADDLD",-"MULLD\t[$]23",-"ADD\t[$]29"
+       // ppc64x/power8:"MULLD\t[$]23","ADD\t[$]29"
        return 5*n + 7*(n+1) + 11*(n+2) // 23n + 29
 }
 
index ecc21fa90aac763919a2f6a3def8a1a80912504c..286440d704494a472b30ce3b14e8f0c1d958f071 100644 (file)
@@ -18,7 +18,6 @@ func convertNeq0B(x uint8, c bool) bool {
 func convertNeq0W(x uint16, c bool) bool {
        // amd64:"ANDL\t[$]1",-"SETNE"
        // ppc64x:"ANDCC",-"CMPW",-"ISEL"
-       // ppc64le/power9:"ANDCC",-CMPW",-"ISEL"
        b := x&1 != 0
        return c && b
 }
@@ -38,22 +37,21 @@ func convertNeq0Q(x uint64, c bool) bool {
 }
 
 func convertNeqBool32(x uint32) bool {
-        // ppc64x:"ANDCC",-"CMPW",-"ISEL"
-        return x&1 != 0
+       // ppc64x:"ANDCC",-"CMPW",-"ISEL"
+       return x&1 != 0
 }
 
 func convertEqBool32(x uint32) bool {
-        // ppc64x:"ANDCC",-"CMPW","XOR",-"ISEL"
-        // ppc64le/power9:"ANDCC","XOR",-"CMPW",-"ISEL"
-        return x&1 == 0
+       // ppc64x:"ANDCC",-"CMPW","XOR",-"ISEL"
+       return x&1 == 0
 }
 
 func convertNeqBool64(x uint64) bool {
-        // ppc64x:"ANDCC",-"CMP",-"ISEL"
-        return x&1 != 0
+       // ppc64x:"ANDCC",-"CMP",-"ISEL"
+       return x&1 != 0
 }
 
 func convertEqBool64(x uint64) bool {
-        // ppc64x:"ANDCC","XOR",-"CMP",-"ISEL"
-        return x&1 == 0
+       // ppc64x:"ANDCC","XOR",-"CMP",-"ISEL"
+       return x&1 == 0
 }
index a885a81fb29f02500d546406522e529db3d4c233..4c4c857460fa1d1c7028d2ed6db6a9c31f3e68b3 100644 (file)
@@ -43,8 +43,8 @@ var x [256]byte
 func moveDisjointStack32() {
        var s [32]byte
        // ppc64x:-".*memmove"
-       // ppc64le/power8:"LXVD2X",-"ADD",-"BC"
-       // ppc64le/power9:"LXV",-"LXVD2X",-"ADD",-"BC"
+       // ppc64x/power8:"LXVD2X",-"ADD",-"BC"
+       // ppc64x/power9:"LXV",-"LXVD2X",-"ADD",-"BC"
        copy(s[:], x[:32])
        runtime.KeepAlive(&s)
 }
@@ -52,8 +52,8 @@ func moveDisjointStack32() {
 func moveDisjointStack64() {
        var s [96]byte
        // ppc64x:-".*memmove"
-       // ppc64le/power8:"LXVD2X","ADD","BC"
-       // ppc64le/power9:"LXV",-"LXVD2X",-"ADD",-"BC"
+       // ppc64x/power8:"LXVD2X","ADD","BC"
+       // ppc64x/power9:"LXV",-"LXVD2X",-"ADD",-"BC"
        copy(s[:], x[:96])
        runtime.KeepAlive(&s)
 }
@@ -63,8 +63,8 @@ func moveDisjointStack() {
        // s390x:-".*memmove"
        // amd64:-".*memmove"
        // ppc64x:-".*memmove"
-       // ppc64le/power8:"LXVD2X"
-       // ppc64le/power9:"LXV",-"LXVD2X"
+       // ppc64x/power8:"LXVD2X"
+       // ppc64x/power9:"LXV",-"LXVD2X"
        copy(s[:], x[:])
        runtime.KeepAlive(&s)
 }
@@ -74,8 +74,8 @@ func moveDisjointArg(b *[256]byte) {
        // s390x:-".*memmove"
        // amd64:-".*memmove"
        // ppc64x:-".*memmove"
-       // ppc64le/power8:"LXVD2X"
-       // ppc64le/power9:"LXV",-"LXVD2X"
+       // ppc64x/power8:"LXVD2X"
+       // ppc64x/power9:"LXV",-"LXVD2X"
        copy(s[:], b[:])
        runtime.KeepAlive(&s)
 }
@@ -84,8 +84,8 @@ func moveDisjointNoOverlap(a *[256]byte) {
        // s390x:-".*memmove"
        // amd64:-".*memmove"
        // ppc64x:-".*memmove"
-       // ppc64le/power8:"LXVD2X"
-       // ppc64le/power9:"LXV",-"LXVD2X"
+       // ppc64x/power8:"LXVD2X"
+       // ppc64x/power9:"LXV",-"LXVD2X"
        copy(a[:], a[128:])
 }
 
index 788f739f1414f78175a212dbaba057cddd394ee0..09aa5a136eb9f2f1eef72a5801a623776f79619d 100644 (file)
@@ -308,8 +308,8 @@ func TrailingZeros64(n uint64) int {
 }
 
 func TrailingZeros64Subtract(n uint64) int {
-       // ppc64le/power8:"NEG","SUBC","ANDN","POPCNTD"
-       // ppc64le/power9:"SUBC","CNTTZD"
+       // ppc64x/power8:"NEG","SUBC","ANDN","POPCNTD"
+       // ppc64x/power9:"SUBC","CNTTZD"
        return bits.TrailingZeros64(1 - n)
 }
 
index 2b136361d58ba1df0dccaf5d1f91707e164f77fa..d34ff9b428dede617962f6be749b328f07bfa0d3 100644 (file)
@@ -86,8 +86,7 @@ func rshMask64Ux64(v uint64, s uint64) uint64 {
 
 func rshMask64x64(v int64, s uint64) int64 {
        // arm64:"ASR",-"AND",-"CSEL"
-       // ppc64:"ANDCC",-"ORN",-"ISEL"
-       // ppc64le:"ANDCC",-ORN",-"ISEL"
+       // ppc64x:"ANDCC",-"ORN",-"ISEL"
        // riscv64:"SRA",-"OR",-"SLTIU"
        // s390x:-"RISBGZ",-"AND",-"LOCGR"
        return v >> (s & 63)
@@ -353,23 +352,23 @@ func checkCombinedShifts(v8 uint8, v16 uint16, v32 uint32, x32 int32, v64 uint64
 
 func checkWidenAfterShift(v int64, u uint64) (int64, uint64) {
 
-       // ppc64le:-".*MOVW"
+       // ppc64x:-".*MOVW"
        f := int32(v >> 32)
-       // ppc64le:".*MOVW"
+       // ppc64x:".*MOVW"
        f += int32(v >> 31)
-       // ppc64le:-".*MOVH"
+       // ppc64x:-".*MOVH"
        g := int16(v >> 48)
-       // ppc64le:".*MOVH"
+       // ppc64x:".*MOVH"
        g += int16(v >> 30)
-       // ppc64le:-".*MOVH"
+       // ppc64x:-".*MOVH"
        g += int16(f >> 16)
-       // ppc64le:-".*MOVB"
+       // ppc64x:-".*MOVB"
        h := int8(v >> 56)
-       // ppc64le:".*MOVB"
+       // ppc64x:".*MOVB"
        h += int8(v >> 28)
-       // ppc64le:-".*MOVB"
+       // ppc64x:-".*MOVB"
        h += int8(f >> 24)
-       // ppc64le:".*MOVB"
+       // ppc64x:".*MOVB"
        h += int8(f >> 16)
        return int64(h), uint64(g)
 }