POOL32A 000000 |
rt |
rs |
sa |
0 |
SRA 0010000000 |
6 |
5 |
5 |
5 |
1 |
10 |
SRA rt, rs, sa |
microMIPS |
Shift Word Right Arithmetic |
Shift Word Right Arithmetic
To execute an arithmetic right-shift of a word by a fixed number of bits.
GPR[rt] = GPR[rs] >> sa (arithmetic)
The contents of the low-order 32-bit word of GPR rs are shifted right, duplicating the sign-bit (bit 31) in the emptied bits; the word result is sign-extended and placed in GPR rt. The bit-shift amount is specified by sa.
On 64-bit processors, if GPR rs does not contain a sign-extended 32-bit value (bits 63..31 equal), then the result of the operation is UNPREDICTABLE.
if NotWordValue(GPR[rs]) then UNPREDICTABLE endif s = sa temp = GPR[rs]31)s || GPR[rs]31..s GPR[rt] = sign_extend(temp)
None