riscv-isa-manual
riscv-isa-manual copied to clipboard
Inconsistency for Shift instructions in RV64I
Hello,
I've found an inconsisten description about the encoding of shift instructions in RV64I.
In page 36 (V20191213), specifically, it mentions that "The right shift type is encoded in bit 30."
However, in the figure for SLLI/SRLI/SRAI/SLLIW/SRLIW/SRAIW, it seems that bit 30 is used to encode "Local" or "Arithmetic"
shift.
If it is an actual issue and it needs to be fixed, I would like to contribute to fix it.
Logical vs. Arithmetic is what we mean by shift type. These are indeed the same bit.
Hi @aswaterman, I see. "right" does not means a direction (left or right).
Actually, "right" does mean a direction. In this case bit30 determines the type of right shift, which can be either logical (which shifts in zeroes) or arithmetic (which shifts in sign bits). There are no different types of left shifts (there are always logical), so bit30 is only used for right shifts.
On Tue, Apr 16, 2024 at 5:01 PM Sungkeun Kim @.***> wrote:
Hi @aswaterman https://github.com/aswaterman, I see. "right" does not means a direction (left or right).
— Reply to this email directly, view it on GitHub https://github.com/riscv/riscv-isa-manual/issues/1349#issuecomment-2060090515, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPXVJUHYXRN4HRTFS7ONHDY5W3T7AVCNFSM6AAAAABGKILITCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRQGA4TANJRGU . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Thanks @allenjbaum for the clarification :D