Skip to content

Commit 3f94f3d

Browse files
4a6f656cgopherbot
authored andcommitted
test/codegen: fix shift tests on riscv64
These were broken by CL 721206, which changes Rsh to RshU for positive inputs. Change-Id: I9e38c3c428fb8aeb70cf51e7e76f4711c864f027 Reviewed-on: https://go-review.googlesource.com/c/go/+/723340 Reviewed-by: Meng Zhuo <mengzhuo1203@gmail.com> Reviewed-by: Mark Ryan <markdryan@rivosinc.com> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Jorropo <jorropo.pgm@gmail.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Jorropo <jorropo.pgm@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
1 parent 2ac1f9c commit 3f94f3d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎test/codegen/shift.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ func rsh64to32(v int64) int32 {
661661
x := int32(v)
662662
// riscv64:"MOVW"
663663
if x > 8 {
664-
// riscv64:"SRAIW" -"MOVW" -"SLLI"
664+
// riscv64:"SRLIW" -"MOVW" -"SLLI"
665665
x >>= 2
666666
}
667667
return x
@@ -671,7 +671,7 @@ func rsh64to16(v int64) int16 {
671671
x := int16(v)
672672
// riscv64:"MOVH"
673673
if x > 8 {
674-
// riscv64:"SLLI" "SRAI"
674+
// riscv64:"SLLI" "SRLI"
675675
x >>= 2
676676
}
677677
return x
@@ -681,7 +681,7 @@ func rsh64to8(v int64) int8 {
681681
x := int8(v)
682682
// riscv64:"MOVB"
683683
if x > 8 {
684-
// riscv64:"SLLI" "SRAI"
684+
// riscv64:"SLLI" "SRLI"
685685
x >>= 2
686686
}
687687
return x

0 commit comments

Comments
 (0)