aboutsummaryrefslogtreecommitdiff
path: root/test/codegen/mathbits.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/codegen/mathbits.go')
-rw-r--r--test/codegen/mathbits.go20
1 files changed, 18 insertions, 2 deletions
diff --git a/test/codegen/mathbits.go b/test/codegen/mathbits.go
index 89a77d96f9..c21de19707 100644
--- a/test/codegen/mathbits.go
+++ b/test/codegen/mathbits.go
@@ -105,6 +105,7 @@ func OnesCount(n uint) int {
// arm64:"VCNT","VUADDLV"
// s390x:"POPCNT"
// ppc64:"POPCNTD"
+ // ppc64le:"POPCNTD"
return bits.OnesCount(n)
}
@@ -113,6 +114,7 @@ func OnesCount64(n uint64) int {
// arm64:"VCNT","VUADDLV"
// s390x:"POPCNT"
// ppc64:"POPCNTD"
+ // ppc64le:"POPCNTD"
return bits.OnesCount64(n)
}
@@ -121,6 +123,7 @@ func OnesCount32(n uint32) int {
// arm64:"VCNT","VUADDLV"
// s390x:"POPCNT"
// ppc64:"POPCNTW"
+ // ppc64le:"POPCNTW"
return bits.OnesCount32(n)
}
@@ -129,12 +132,14 @@ func OnesCount16(n uint16) int {
// arm64:"VCNT","VUADDLV"
// s390x:"POPCNT"
// ppc64:"POPCNTW"
+ // ppc64le:"POPCNTW"
return bits.OnesCount16(n)
}
func OnesCount8(n uint8) int {
// s390x:"POPCNT"
// ppc64:"POPCNTB"
+ // ppc64le:"POPCNTB"
return bits.OnesCount8(n)
}
@@ -176,6 +181,7 @@ func RotateLeft64(n uint64) uint64 {
// amd64:"ROLQ"
// arm64:"ROR"
// ppc64:"ROTL"
+ // ppc64le:"ROTL"
// s390x:"RLLG"
return bits.RotateLeft64(n, 37)
}
@@ -184,6 +190,7 @@ func RotateLeft32(n uint32) uint32 {
// amd64:"ROLL" 386:"ROLL"
// arm64:"RORW"
// ppc64:"ROTLW"
+ // ppc64le:"ROTLW"
// s390x:"RLL"
return bits.RotateLeft32(n, 9)
}
@@ -202,6 +209,7 @@ func RotateLeftVariable(n uint, m int) uint {
// amd64:"ROLQ"
// arm64:"ROR"
// ppc64:"ROTL"
+ // ppc64le:"ROTL"
// s390x:"RLLG"
return bits.RotateLeft(n, m)
}
@@ -210,6 +218,7 @@ func RotateLeftVariable64(n uint64, m int) uint64 {
// amd64:"ROLQ"
// arm64:"ROR"
// ppc64:"ROTL"
+ // ppc64le:"ROTL"
// s390x:"RLLG"
return bits.RotateLeft64(n, m)
}
@@ -218,6 +227,7 @@ func RotateLeftVariable32(n uint32, m int) uint32 {
// amd64:"ROLL"
// arm64:"RORW"
// ppc64:"ROTLW"
+ // ppc64le:"ROTLW"
// s390x:"RLL"
return bits.RotateLeft32(n, m)
}
@@ -230,6 +240,7 @@ func TrailingZeros(n uint) int {
// amd64:"BSFQ","MOVL\t\\$64","CMOVQEQ"
// s390x:"FLOGR"
// ppc64:"ANDN","POPCNTD"
+ // ppc64le:"ANDN","POPCNTD"
return bits.TrailingZeros(n)
}
@@ -237,6 +248,7 @@ func TrailingZeros64(n uint64) int {
// amd64:"BSFQ","MOVL\t\\$64","CMOVQEQ"
// s390x:"FLOGR"
// ppc64:"ANDN","POPCNTD"
+ // ppc64le:"ANDN","POPCNTD"
return bits.TrailingZeros64(n)
}
@@ -244,6 +256,7 @@ func TrailingZeros32(n uint32) int {
// amd64:"BTSQ\\t\\$32","BSFQ"
// s390x:"FLOGR","MOVWZ"
// ppc64:"ANDN","POPCNTW"
+ // ppc64le:"ANDN","POPCNTW"
return bits.TrailingZeros32(n)
}
@@ -251,6 +264,7 @@ func TrailingZeros16(n uint16) int {
// amd64:"BSFL","BTSL\\t\\$16"
// s390x:"FLOGR","OR\t\\$65536"
// ppc64:"POPCNTD","OR\\t\\$65536"
+ // ppc64le:"POPCNTD","OR\\t\\$65536"
return bits.TrailingZeros16(n)
}
@@ -319,13 +333,15 @@ func IterateBits8(n uint8) int {
func Mul(x, y uint) (hi, lo uint) {
// amd64:"MULQ"
// arm64:"UMULH","MUL"
- // ppc64: "MULHDU", "MULLD"
+ // ppc64:"MULHDU","MULLD"
+ // ppc64le:"MULHDU","MULLD"
return bits.Mul(x, y)
}
func Mul64(x, y uint64) (hi, lo uint64) {
// amd64:"MULQ"
// arm64:"UMULH","MUL"
- // ppc64: "MULHDU", "MULLD"
+ // ppc64:"MULHDU","MULLD"
+ // ppc64le:"MULHDU","MULLD"
return bits.Mul64(x, y)
}