Shift Operations
2-45
Central Processing Unit
Table 2
−
11. Shift Operations
Operation Type
Illustration
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
Shift left
0
16-bit value to 16 LSBs
0/Sign
32 bits to ALU
SXM
Store 16 LSBs of left-shifted ACC.
Syntax:
MOV
loc16
, ACC <<
1...8
Shift left
0
ACC
16 LSBs to ALU
Discard
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.
Shift right
ACC
16 LSBs to ALU
Discard
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.
Shift left
0
ACC
32 bits to ACC
C
Last
bit out
Discard
other bits
Summary of Contents for TMS320C28x
Page 30: ...1 12...
Page 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Page 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Page 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Page 509: ...SUBL ACC P PM 6 352 SUBL ACC P PM ACC S B 11 M X 4 MOVH Y ACC 5 Store Q15 result into Y...
Page 585: ...This page intentionally left blank 7 32 This page intentionally left blank...