SRAW
Shift Right Arithmetic Word
SRAW rd, rs1, rs2
Performs a 32-bit arithmetic right shift on rs1, sign-extending the result.
Details
SRAW performs an arithmetic right shift of the lower 32 bits of rs1 by the shift amount in the lower 5 bits of rs2, sign-extends the 32-bit result to 64 bits, and writes to rd.
Pseudocode Operation
R[rd] = sext((R[rs1][31:0] >>s (R[rs2] & 0x1F)));
Example
SRAW x5, x6, x7
Encoding
Binary Layout
0100000
31:25
rs2
24:20
rs1
19:15
101
14:12
rd
11:7
0111011
6:0
Operands
-
rd
Destination register (integer) -
rs1
Source -
rs2
Shift Amount