]> Cypherpunks repositories - gostls13.git/commitdiff
test/codegen: add Rotate test for riscv64
authorMeng Zhuo <mzh@golangcn.org>
Wed, 29 May 2024 09:47:00 +0000 (17:47 +0800)
committerMeng Zhuo <mengzhuo1203@gmail.com>
Wed, 11 Sep 2024 01:37:00 +0000 (01:37 +0000)
Change-Id: I7d996b8d46fbeef933943f806052a30f1f8d50c3
Reviewed-on: https://go-review.googlesource.com/c/go/+/588836
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
Reviewed-by: Tim King <taking@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
test/codegen/mathbits.go

index a743eaf3d3ae1f3f2ed6dac53638c1389544acff..af2c9e790cea8f38482e29d7be9a8d141bad05cc 100644 (file)
@@ -231,6 +231,7 @@ func RotateLeft64(n uint64) uint64 {
        // amd64:"ROLQ"
        // arm64:"ROR"
        // ppc64x:"ROTL"
+       // riscv64:"RORI"
        // s390x:"RISBGZ\t[$]0, [$]63, [$]37, "
        // wasm:"I64Rotl"
        return bits.RotateLeft64(n, 37)
@@ -241,6 +242,7 @@ func RotateLeft32(n uint32) uint32 {
        // arm:`MOVW\tR[0-9]+@>23`
        // arm64:"RORW"
        // ppc64x:"ROTLW"
+       // riscv64:"RORIW"
        // s390x:"RLL"
        // wasm:"I32Rotl"
        return bits.RotateLeft32(n, 9)
@@ -262,6 +264,7 @@ func RotateLeftVariable(n uint, m int) uint {
        // amd64:"ROLQ"
        // arm64:"ROR"
        // ppc64x:"ROTL"
+       // riscv64:"ROL"
        // s390x:"RLLG"
        // wasm:"I64Rotl"
        return bits.RotateLeft(n, m)
@@ -271,6 +274,7 @@ func RotateLeftVariable64(n uint64, m int) uint64 {
        // amd64:"ROLQ"
        // arm64:"ROR"
        // ppc64x:"ROTL"
+       // riscv64:"ROL"
        // s390x:"RLLG"
        // wasm:"I64Rotl"
        return bits.RotateLeft64(n, m)
@@ -281,6 +285,7 @@ func RotateLeftVariable32(n uint32, m int) uint32 {
        // amd64:"ROLL"
        // arm64:"RORW"
        // ppc64x:"ROTLW"
+       // riscv64:"ROLW"
        // s390x:"RLL"
        // wasm:"I32Rotl"
        return bits.RotateLeft32(n, m)