C.SRAI
Compressed Shift Right Arithmetic Immediate
C.SRAI rd', imm
Arithmetically shifts a register right by immediate.
Encoding
Binary Layout
?
31:16
100
15:13
c_nzuimm6hi
12
01
11:10
rd_rs1_p
9:7
c_nzuimm6lo
6:2
01
1:0
Operands
-
rd'
Dest/Source -
imm
Shift Amount
Example
C.SRAI x8, 2
// x8 = x8 >>s 2
Related
More in C
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
Arithmetic right shift of rd′ by a 5-bit immediate.
Operation
R[rd'] = R[rd'] >>s imm;