MicroBlaze Processor Reference Guide 223
UG984 (v2018.2) June 21, 2018 www.xilinx.com
Chapter 5: MicroBlaze Instruction Set Architecture
bsi
Barrel Shift Immediate
bsrli
rD, rA, IMM Barrel Shift Right Logical Immediate
bsrai
rD, rA, IMM Barrel Shift Right Arithmetic Immediate
bslli
rD, rA, IMM Barrel Shift Left Logical Immediate
bsefi
rD, rA, IMM
W
, IMM
S
Barrel Shift Extract Field Immediate
bsifi rD, rA, Width
1
, IMM
S
Barrel Shift Insert Field Immediate
1. Width = IMM
W
- IMM
S
+ 1
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
0 1 1 0 0 1 rD rA I E 0 0 0 IMM
W
0 IMM
S
0 6 11 16 21
25
27
31
Description
The first three instructions shift the contents of register rA by the amount specified by IMM and put
the result in register rD.
Barrel Shift Extract Field extracts a bit field from register rA and puts the result in register rD. The bit
field width is specified by IMM
W
and the shift amount is specified by IMM
S
. The bit field width must
be in the range 1 - 31, and the condition IMM
W
+ IMM
S
≤ 32 must apply.
Barrel Shift Insert Field inserts a bit field from register rA into register rD, modifying the existing value
in register rD. The bit field width is defined by IMM
W
- IMM
S
+ 1, and the shift amount is specified by
IMM
S
. The condition IMM
W
≥ IMM
S
must apply.
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 bsra sets the T bit (Type bit). If the T bit is set, the barrel shift performed is
Arithmetical. The mnemonics bsrl and bsll clear the T bit and the shift performed is Logical.
The mnemonic bsefi sets the E bit (Extract bit). In this case the S and T bits are not used.
The mnemonic bsifi sets the I bit (Insert bit). In this case the S and T bits are not used.