sllv

Shift left logical variable

Sets $t1 to $t2 shifted left by the amount in the low 5 bits of $t3, filling vacated bits with zeros.

Forms

  • sllv , ,

Operands

$t1
Any general-purpose register, $0 to $31, using its numeric or named spelling, such as $8 or $t0 ($zero is $0; $ra is $31).
$t2
A general-purpose register. It may be the same register as $t1.
$t3
A general-purpose register. It may be the same register as $t1.

Like 'sll' but the shift amount is taken from the lowest 5 bits of register $t3 rather than an immediate constant. The upper 27 bits of $t3 are ignored.

# Initialize both inputs, then execute sllv with initialized inputs. Inspect $t2: 56.
li $t0, 7
li $t1, 3
sllv $t2, $t0, $t1