]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/riscv: check immediate for rotation instructions
authorJoel Sing <joel@sing.id.au>
Tue, 19 Mar 2024 10:07:46 +0000 (21:07 +1100)
committerJoel Sing <joel@sing.id.au>
Sun, 7 Apr 2024 03:32:27 +0000 (03:32 +0000)
commit20f052c83c380b8b3700b7aca93017178a692d78
tree0f5a0616e6716ca7ec61f1c8cc8242fc47a79993
parent58c5db3169c801737cb0e0ed4886554763c861eb
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>
src/cmd/asm/internal/asm/testdata/riscv64error.s
src/cmd/internal/obj/riscv/obj.go