6 0111 - Shifter🔗
This is a more general version of bsl which allows
shifting register n to the left by i.
It uses bitwise/logical shift which shifts-in zeroes from
the left.
A more general version of bsr which shifts register
n to the right by i.
A generic version of sbsr which shifts register
n to the right by i keeping the most
significant (sign) bit intact.
Rotates register n to the left by i.
Rotation to the right can be achieved by rotating by 16-1i
to the left using this instruction.
(shrr n m)
|
| |
| n | | = | | bb68-gpr | | | | | | | | m | | = | | bb68-gpr |
|
| |
|
Like shri but it is shifted by the value in
register m. If m is greater than 15, the result is
always 0.
(shlr n m)
|
| |
| n | | = | | bb68-gpr | | | | | | | | m | | = | | bb68-gpr |
|
| |
|
Like shli but it is shifted by the value in
register m. If m is greater than 15, the result is
always 0.
(sarr n m)
|
| |
| n | | = | | bb68-gpr | | | | | | | | m | | = | | bb68-gpr |
|
| |
|
Like shri but it is shifted by the value in
register m. If m is greater than 15, the
result is always 0 for nonnegative values of m and
-1 for its negative values.
(rotr n m)
|
| |
| n | | = | | bb68-gpr | | | | | | | | m | | = | | bb68-gpr |
|
| |
|
Rotates register n to the left by the value in
register m modulo 16.
Shifts a pair of registers N to the right by
i. This is a bitwise/logical shift which shifts-in
zeroes from the left.
Shifts a pair of registers N to the left by
i.
Shifts a pair of registers N to the right by
i. As an arithmetic shift it keeps the most
significant bit (sign) intact.
Rotates register pair N to the left by i.
Rotation to the right can be achieved by rotating by 32-1i
to the left using this instruction.
(shr variant)
|
| |
| variant | | = | | r:bb68-gpr i:bb68-word | | | | | | | r:bb68-gpr q:bb68-gpr | | | | | | | p:bb68-gprp i:bb68-word |
|
Shifts to the right either the register r by
immediate value i, or the register r by
the value in register q, or the register pair
p by the immediate value i.
(shl variant)
|
| |
| variant | | = | | r:bb68-gpr i:bb68-word | | | | | | | r:bb68-gpr q:bb68-gpr | | | | | | | p:bb68-gprp i:bb68-word |
|
Shifts to the left either the register r by
immediate value i, or the register r by
the value in register q, or the register pair
p by the immediate value i.
(sar variant)
|
| |
| variant | | = | | r:bb68-gpr i:bb68-word | | | | | | | r:bb68-gpr q:bb68-gpr | | | | | | | p:bb68-gprp i:bb68-word |
|
Shifts to the right either the register r by
immediate value i, or the register r by
the value in register q, or the register pair
p by the immediate value i.
If the shift amount is greater than 15 for registers and 31
for pairs, the result is always 0 for nonnegative values of
m and -1 for its negative values.