dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 172

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Data Arithmetic Logic Unit
At the completion of a 16-bit logical or arithmetic shift, the extension register is loaded with sign extension
and the LSP is cleared. The extension bits are never shifted into the MSP of an accumulator, nor are bits in
the MSP ever shifted into the extension.
Note that sign extension is always performed for 16-bit shifts. In the unusual case in which a negative
value is shifted by zero and its destination is an accumulator, the extension register of the destination is
loaded with $F instead of $0.
5.3.6.2
The shifter can also perform arithmetic or logical shifts of 0 to 31 bits on 32-bit data. If the number of bits
to be shifted is specified using a data ALU register and is positive, the shifting is performed in the direction
indicated by the mnemonic (for example, an ASRR.L instruction shifts right). If the number of bits to shift
is specified by a register and is a negative value, the shifting is performed in the opposite direction by the
absolute value of the number of bits to be shifted (for example, an ASRR.L instruction shifts left).
Figure 5-19 shows both right and left shifting of a 32-bit long word.
At the completion of a 32-bit logical shift, the extension register is always cleared. At the end of an
arithmetic shift, the extension register is sign extended. The extension bits are never shifted into the MSP
of an accumulator, nor are bits in the MSP ever shifted into the extension.
5-26
A
A
35 32 31
35 32 31
EXT
EXT
F
F
Shifting 32-Bit Long Words
Example: Right Shifting (ASRR.W)
Example: Right Shifting (ASRR.L)
$AAAACCCC
F
F
$AAAA
A
A
Barrel Shifting
MSP
MSP
16
32
Shifting
A
A
Unit
Unit
Figure 5-19. Arithmetic Shifts on 32-Bit Long Words
A
A
16 15
16 15
$4
Figure 5-18. Arithmetic Shifts on 16-Bit Words
$4
4
4
0
A
DSP56800E Core Reference Manual
0
C
LSP
LSP
0
C
0
C
0
0
A
A
35 32 31
35 32 31
EXT
EXT
0
0
Example: Left Shifting (ASLL.W)
$5555CCCC
Example: Left Shifting (ASLL.L)
5
5
$AAAA
5
5
Barrel Shifting
MSP
MSP
16
32
Shifting
4
5
Unit
Unit
0
C
16 15
16 15
$5
$4
4
4
0
C
Freescale Semiconductor
0
C
LSP
LSP
0
C
0
0
0
0

Related parts for dsp56800e