cmd/internal/obj/riscv: check immediate for rotation instructions
Ensure that the immediate for a RORI or RORIW instruction are within range,
adding test coverage. Also use a consistent "immediate out of range" error
for both rotations and shifts.
Change-Id: Id687d7c6e028786f607e9519bbb64dab62b6cf3d
Reviewed-on: https://go-review.googlesource.com/c/go/+/572735 Reviewed-by: M Zhuo <mengzhuo1203@gmail.com>
Run-TryBot: Joel Sing <joel@sing.id.au> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>