Shift Operations - Texas Instruments TMS320C28x Reference Manual

Dsp cpu and instruction set
Table of Contents

Advertisement

Table 2−11. Shift Operations
Operation Type
Left shift of 16-bit value for ACC
operation. Syntaxes:
ADD ACC, loc16 <<0...16
ADD ACC, #16Bit <<0...15
ADD ACC, loc16 <<T
SUB ACC, loc16 << 0...16
SUB ACC, #16Bit <<0 ...15
SUB ACC, loc16<<T
MOV ACC, loc16 << 0...16
MOV ACC, #16Bit << 0...15
MOV ACC, loc16, <<T
Store 16 LSBs of left-shifted ACC.
Syntax:
MOV loc16, ACC << 1...8
Store 16 MSBs of left-shifted ACC.
Syntax:
MOVH loc16, ACC <<1...8
Note: This instruction performs a single
right shift by (16−shift1), where shift1 is a
value from 0 to 8.
Logical left shift of ACC. The last bit to
be shifted out fills the carry bit (C).
Syntaxes:
LSL ACC, 1...16
LSL ACC, T (shift = T(3:0))
LSL ACC, T (shift = T(4:0))
Note: If T(3:0) = 0 or T(4:0) = 0, indicating
a shift of 0, C is cleared.
Illustration
SXM
0/Sign
Discard
Last
C
bit out
Discard
other bits

Shift Operations

16-bit value to 16 LSBs
Shift left
32 bits to ALU
ACC
Shift left
16 LSBs to ALU
ACC
Shift right
16 LSBs to ALU
ACC
Shift left
32 bits to ACC
Central Processing Unit
0
0
Discard
0
2-45

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C28x and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF