2 Computational Units
2 – 28
2.4.2
Shifter Operations
The shifter performs the following functions (instruction mnemonics
shown in parentheses):
• Arithmetic Shift (ASHIFT)
• Logical Shift (LSHIFT)
• Normalize (NORM)
• Derive Exponent (EXP)
• Block Exponent Adjust (EXPADJ)
These basic shifter instructions can be used in a variety of ways,
depending on the underlying arithmetic requirements. The following
sections present single and multiple precision examples for these
functions:
• Derivation of a Block Exponent
• Immediate Shifts
• Denormalization
• Normalization
The shift functions (arithmetic shift, logical shift, and normalize) can be
optionally specified with [SR OR] and HI/LO modes to facilitate
multiprecision operations. [SR OR] logically ORs the shift result with the
current contents of SR. This option is used to join two 16-bit quantities into
a 32-bit value in SR. When [SR OR] is not used, the shift value is passed
through to SR directly. The HI and LO modifiers reference the shift to the
upper or lower half of the 32-bit SR register. These shift functions take
inputs from either the SI register or any other result register and load the
32-bit shifted result into the SR register.
2.4.2.1 Shifter Input/Output Registers
The sources of shifter input and output are:
Source for
Destination for
Shifter input
Shifter output
SI
SR (SR0, SR1)
AR
MR0, MR1, MR2
SR0, SR1