POOL32A 000000 |
rt |
rs |
rd |
0 |
SLLV 00000010000 |
6 |
5 |
5 |
5 |
1 |
10 |
SLLV rd, rt, rs |
microMIPS |
Shift Word Left Logical Variable |
Shift Word Left Logical Variable
To left-shift a word by a variable number of bits.
GPR[rd] = GPR[rt] << GPR[rs]
The contents of the low-order 32-bit word of GPR rt are shifted left, inserting zeros into the emptied bits. The resulting word is sign-extended and placed in GPR rd. The bit-shift amount is specified by the low-order 5 bits of GPR rs.
None
s = GPR[rs]4..0 temp = GPR[rt](31-s)..0 || 0s GPR[rd] = sign_extend(temp)
None
The input operand does not have to be a properly sign-extended word value to produce a valid sign-extended 32-bit result. The result word is always sign-extended into a 64-bit destination register; this instruction with a zero shift amount truncates a 64-bit value to 32 bits and sign-extends it.