mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
2ac1f9cbc3
commit
3f94f3d4b2
1 changed files with 3 additions and 3 deletions
|
|
@ -661,7 +661,7 @@ func rsh64to32(v int64) int32 {
|
||||||
x := int32(v)
|
x := int32(v)
|
||||||
// riscv64:"MOVW"
|
// riscv64:"MOVW"
|
||||||
if x > 8 {
|
if x > 8 {
|
||||||
// riscv64:"SRAIW" -"MOVW" -"SLLI"
|
// riscv64:"SRLIW" -"MOVW" -"SLLI"
|
||||||
x >>= 2
|
x >>= 2
|
||||||
}
|
}
|
||||||
return x
|
return x
|
||||||
|
|
@ -671,7 +671,7 @@ func rsh64to16(v int64) int16 {
|
||||||
x := int16(v)
|
x := int16(v)
|
||||||
// riscv64:"MOVH"
|
// riscv64:"MOVH"
|
||||||
if x > 8 {
|
if x > 8 {
|
||||||
// riscv64:"SLLI" "SRAI"
|
// riscv64:"SLLI" "SRLI"
|
||||||
x >>= 2
|
x >>= 2
|
||||||
}
|
}
|
||||||
return x
|
return x
|
||||||
|
|
@ -681,7 +681,7 @@ func rsh64to8(v int64) int8 {
|
||||||
x := int8(v)
|
x := int8(v)
|
||||||
// riscv64:"MOVB"
|
// riscv64:"MOVB"
|
||||||
if x > 8 {
|
if x > 8 {
|
||||||
// riscv64:"SLLI" "SRAI"
|
// riscv64:"SLLI" "SRLI"
|
||||||
x >>= 2
|
x >>= 2
|
||||||
}
|
}
|
||||||
return x
|
return x
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue