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, 12 insertions, 8 deletions
diff --git a/test/codegen/mathbits.go b/test/codegen/mathbits.go
index 873354b838..e9dfbb1443 100644
--- a/test/codegen/mathbits.go
+++ b/test/codegen/mathbits.go
@@ -261,42 +261,46 @@ func Reverse8(n uint8) uint8 {
// ----------------------- //
func ReverseBytes(n uint) uint {
- // amd64:"BSWAPQ"
// 386:"BSWAPL"
- // s390x:"MOVDBR"
+ // amd64:"BSWAPQ"
// arm64:"REV"
// loong64:"REVBV"
+ // riscv64/rva22u64,riscv64/rva23u64:"REV8"
+ // s390x:"MOVDBR"
return bits.ReverseBytes(n)
}
func ReverseBytes64(n uint64) uint64 {
- // amd64:"BSWAPQ"
// 386:"BSWAPL"
- // s390x:"MOVDBR"
+ // amd64:"BSWAPQ"
// arm64:"REV"
- // ppc64x/power10: "BRD"
// loong64:"REVBV"
+ // ppc64x/power10: "BRD"
+ // riscv64/rva22u64,riscv64/rva23u64:"REV8"
+ // s390x:"MOVDBR"
return bits.ReverseBytes64(n)
}
func ReverseBytes32(n uint32) uint32 {
- // amd64:"BSWAPL"
// 386:"BSWAPL"
- // s390x:"MOVWBR"
+ // amd64:"BSWAPL"
// arm64:"REVW"
// loong64:"REVB2W"
// ppc64x/power10: "BRW"
+ // riscv64/rva22u64,riscv64/rva23u64:"REV8","SRLI\t\\$32"
+ // s390x:"MOVWBR"
return bits.ReverseBytes32(n)
}
func ReverseBytes16(n uint16) uint16 {
// amd64:"ROLW"
- // arm64:"REV16W",-"UBFX",-"ORR"
// arm/5:"SLL","SRL","ORR"
// arm/6:"REV16"
// arm/7:"REV16"
+ // arm64:"REV16W",-"UBFX",-"ORR"
// loong64:"REVB2H"
// ppc64x/power10: "BRH"
+ // riscv64/rva22u64,riscv64/rva23u64:"REV8","SRLI\t\\$48"
return bits.ReverseBytes16(n)
}