Shift, Rotate And Extended Shift - Intel i960 Jx Developer's Manual

Microprocessor
Table of Contents

Advertisement

5.2.3.3

Shift, Rotate and Extended Shift

These shift instructions shift an operand a specified number of bits left or right:
shlo
shift left ordinal
shro
shift right ordinal
shli
shift left integer
shri
shift right integer
shrdi
shift right dividing integer
rotate
rotate left
eshro
extended shift right ordinal
Except for
rotate
, these instructions discard bits shifted beyond the register boundary.
shifts zeros in from the least significant bit;
shlo
These instructions are equivalent to
shifts zeros in from the least significant bit. When the shift operation results in an overflow, an
shli
integer-overflow fault is generated (when enabled). The destination register is written with the
source shifted as much as possible without overflow and an integer-overflow fault is signaled.
performs a conventional arithmetic shift right operation by extending the sign bit. However,
shri
when this instruction is used to divide a negative integer operand by the power of 2, it may produce
an incorrect quotient. (Discarding the bits shifted out has the effect of rounding the result toward
negative.)
is provided for dividing integers by the power of 2. With this instruction, 1 is added to the
shrdi
result when the bits shifted out are non-zero and the operand is negative, which produces the
correct result for negative operands.
2, respectively, except in cases where an overflow error occurs.
rotates operand bits to the left (toward higher significance) by a specified number of bits.
rotate
Bits shifted beyond the register's left boundary (bit 31) appear at the right boundary (bit 0).
The
instruction performs an ordinal right shift of a source register pair (64 bits) by as much
eshro
as 32 bits and stores the result in a single (32-bit) register. This instruction is equivalent to an
extended divide by a power of 2, which produces no remainder. The instruction is also the
equivalent of a 64-bit extract of 32 bits.
INSTRUCTION SET OVERVIEW
shifts zeros in from the most significant bit.
shro
mulo
and
divo
by the power of 2, respectively.
and
are equivalent to
shli
shrdi
and
by the power of
muli
divi
5-9
5

Advertisement

Table of Contents
loading

Table of Contents