|
|
|
|
|
|
|
|
|
|
|
|
|
|
Bit shift operations:
logical |
|
|
|
|
000000 |
00000 |
01001 |
01010 |
00011 |
000000 |
|
R-type |
|
|
b31-26 |
b25-21 |
b20-16 |
b15-11 |
b10-6 |
b5-0 |
|
|
opcode |
$rs |
$rt |
$rd |
shamt |
function |
|
|
|
logical shift: 0's
shifted in |
|
|
|
# bits |
|
|
left |
|
|
|
|
|
sll $rd, $rt, shift_amt |
# R[d] <-- R[t]
<< shift_amt |
const |
|
|
sllv $rd, $rt, $rs |
|
# R[d] <-- R[t]
<< R[s] |
|
var |
|
|
|
|
|
|
|
|
|
|
|
1110 |
0000 |
0000 |
0000 |
0000 |
0000 |
0000 |
|
0 |
|
|
|
|
|
|
|
|
|
|
$rd |
1100 |
0000 |
0000 |
0000 |
0000 |
0000 |
0000 |
1010 |
|
|
|
|
|
|
|
|
bits of $rt are shifted
to the left by the number of bits given in shift_amt |
|
|
|
or by value in register
$rs |
|
|
0's are shifted into
least significant bit |
|
|
if shift_amt, $rs is unused |
|
|
What does this
instruction do? |
|
|
|
sll $0, $0, 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|