summaryrefslogtreecommitdiff
path: root/test/codegen/shift.go
diff options
context:
space:
mode:
authorArchana R <aravind5@in.ibm.com>2022-06-14 09:24:32 -0500
committerLynn Boger <laboger@linux.vnet.ibm.com>2022-08-17 13:56:55 +0000
commitd09c6ac41769cc782ec982ffc8f20fbd796791f8 (patch)
tree68cf1c26ba66faca4c82dd8bc3ecdb98a2a371f3 /test/codegen/shift.go
parent2c46cc8b8997f4f5cdb7766e4e2bdf8e57f67c76 (diff)
downloadgo-git-d09c6ac41769cc782ec982ffc8f20fbd796791f8.tar.gz
test/codegen: updated multiple tests to verify on ppc64,ppc64le
Updated multiple tests in test/codegen: math.go, mathbits.go, shift.go and slices.go to verify on ppc64/ppc64le as well Change-Id: Id88dd41569b7097819fb4d451b615f69cf7f7a94 Reviewed-on: https://go-review.googlesource.com/c/go/+/412115 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Archana Ravindar <aravind5@in.ibm.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Paul Murphy <murp@ibm.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'test/codegen/shift.go')
-rw-r--r--test/codegen/shift.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/codegen/shift.go b/test/codegen/shift.go
index b3ed69d9e3..66a5c62391 100644
--- a/test/codegen/shift.go
+++ b/test/codegen/shift.go
@@ -12,46 +12,64 @@ package codegen
func lshConst64x64(v int64) int64 {
// riscv64:"SLLI",-"AND",-"SLTIU"
+ // ppc64le:"SLD"
+ // ppc64:"SLD"
return v << uint64(33)
}
func rshConst64Ux64(v uint64) uint64 {
// riscv64:"SRLI",-"AND",-"SLTIU"
+ // ppc64le:"SRD"
+ // ppc64:"SRD"
return v >> uint64(33)
}
func rshConst64x64(v int64) int64 {
// riscv64:"SRAI",-"OR",-"SLTIU"
+ // ppc64le:"SRAD"
+ // ppc64:"SRAD"
return v >> uint64(33)
}
func lshConst32x64(v int32) int32 {
// riscv64:"SLLI",-"AND",-"SLTIU"
+ // ppc64le:"SLW"
+ // ppc64:"SLW"
return v << uint64(29)
}
func rshConst32Ux64(v uint32) uint32 {
// riscv64:"SRLI",-"AND",-"SLTIU"
+ // ppc64le:"SRW"
+ // ppc64:"SRW"
return v >> uint64(29)
}
func rshConst32x64(v int32) int32 {
// riscv64:"SRAI",-"OR",-"SLTIU"
+ // ppc64le:"SRAW"
+ // ppc64:"SRAW"
return v >> uint64(29)
}
func lshConst64x32(v int64) int64 {
// riscv64:"SLLI",-"AND",-"SLTIU"
+ // ppc64le:"SLD"
+ // ppc64:"SLD"
return v << uint32(33)
}
func rshConst64Ux32(v uint64) uint64 {
// riscv64:"SRLI",-"AND",-"SLTIU"
+ // ppc64le:"SRD"
+ // ppc64:"SRD"
return v >> uint32(33)
}
func rshConst64x32(v int64) int64 {
// riscv64:"SRAI",-"OR",-"SLTIU"
+ // ppc64le:"SRAD"
+ // ppc64:"SRAD"
return v >> uint32(33)
}