rori

Rotate right by immediate

Rotates the second register right by an immediate amount and stores the result in the first.

RISC-V manual: rori

Forms

  • rori , ,

Operands

t1
Any integer register, x0 to x31, or its named alias, such as zero, t0 or t6.
t2
An integer register. It may be the same register as t1.
imm6
An unsigned shift count or bit number: 0 to 63 in RV64, or 0 to 31 in RV32.
.text
li t0, 13
# t0=13, immediate 2; rori writes 1073741827 to t2.
rori t2, t0, 2