user manual

98 MicroBlaze Processor Reference Guide
1-800-255-7778 UG081 (v6.0) June 1, 2006
Chapter 4: MicroBlaze Instruction Set Architecture
Barrel Shift Immediate
Shifts the contents of register rA by the amount specified by IMM and puts the result in
register rD.
The mnemonic bsll sets the S bit (Side bit). If the S bit is set, the barrel shift is done to the
left. The mnemonics bsrl and bsra clear the S bit and the shift is done to the right.
The mnemonic bsrawill set theT bit(Type bit). Ifthe Tbit isset, thebarrel shift performed
is Arithmetical. The mnemonics bsrl and bsll clear the T bit and the shift performed is
if S = 1 then
(rD) (rA) << IMM
if T = 1 then
if IMM 0 then
(rD)[0:IMM-1] (rA)[0]
(rD)[IMM:31] (rA) >> IMM
(rD) (rA)
(rD) (rA) >> IMM
Registers Altered
1 cycle
These are not Type B Instructions. There is no effect from a preceding imm instruction.
These instructions are optional. To usethem, MicroBlaze has tobe configuredto use barrel
shift instructions (C_USE_BARREL=1).
bsrli rD, rA, IMM Barrel Shift Right Logical Immediate
bsrai rD, rA, IMM Barrel Shift Right Arithmetical Immediate
bslli rD, rA, IMM Barrel Shift Left Logical Immediate
0 1 1 0 0 1 rD rA 0 0 0 0 0 S T 0 0 0 0 IMM
0 6 11 16 21 27 31