Shift Operations
2-44
2.7 Shift Operations
The shifter holds 64 bits and accepts either a 16-bit, 32-bit, or 64-bit input
value. When the input value has 16 bits, the value is loaded into the 16 least
significant bits (LSBs) of the shifter. When the input value has 32 bits, the value
is loaded into the 32 LSBs of the shifter. Depending on the instruction that uses
the shifter, the output of the shifter may be all of its 64 bits or just its 16 LSBs.
When a value is shifted
right
by an amount N, the N LSBs of the value are lost
and the bits to the left of the value are filled with all 0s or all 1s. If sign extension
is specified, the bits to the left are filled with copies of the sign bit. If sign exten-
sion is not specified, the bits to the left are filled with 0s, or zero filled.
When a value is shifted
left
by an amount N, the bits to the right of the shifted
value are zero filled. If the value has 16 bits and sign extension is specified,
the bits to the left are filled with copies of the sign bit. If the value has 16 bits
and sign extension is not specified, the bits to the left are zero filled. If the value
has 32 bits, the N MSBs of the value are lost, and sign extension is irrelevant.
11 lists the instructions that use the shifter and provides an illustration
of the corresponding shifter operation. The table uses the following graphical
symbols:
Shift left
This symbol represents the 32-bit shifter. The text
inside the box indicates the direction of the shift.
0
This symbol indicates zero filling.
Sign
This symbol indicates sign extending.
0/Sign
SXM
This symbol indicates that the MSBs of the shifter
depend on the sign-extension mode bit (SXM). If
SXM = 0, the MSBs are zero filled after the shift. If
SXM = 1, the MSBs are filled with the sign of the
shifted value.
C
This symbol indicates the carry bit (C).
For explanations of the instruction syntaxes listed in Table 2
11, see
Chapter 6,
Assembly Language Instructions
.
Содержание TMS320C28x
Страница 30: ...1 12...
Страница 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Страница 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Страница 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Страница 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...
Страница 585: ...This page intentionally left blank 7 32 This page intentionally left blank...