Migrating to C28x Object Code
C27x Operations That Are Made Repeatable On C28x include the following:
MOV
loc16,AX
ADD
ACC,loc16 << 16
ADDU ACC,loc16
SUB
ACC,loc16 << 16
SUBU
ACC,loc16
ADDL
ACC,loc32
SFR
ACC,1..16
LSL
ACC,1..16
MOVH
loc16,P
MOV
loc16,P
MOVA
T,loc16
MOVS
T,loc16
MPYA
P,T,loc16
MPYS
P,T,loc16
F.3.3 Changes to the SUBCU Instruction
The SUBCU instruction changed slightly from the C27x to the C28x. Under
the prescribed usage of the SUBCU operation, the change will yield the same
result as the C27x.
The SUBCU instruction operates as follows on the C27x device:
temp(31:0) = ACC − [loc16] << 15
if( temp32 >= 0 )
ACC = temp(31:0) >> 1 + 1;
else
ACC = ACC << 1;
To simplify the implementation, the SUBCU operation changed as follows on
the C28x:
temp(32:0) = ACC << 1 − [loc16] << 16
if( temp(32:0) >= 0 )
ACC = temp(31:0) + 1;
else
ACC = ACC << 1;
-
The ”temp(32:0)” value is the result of an unsigned 33-bit compare. The
carry bit is used to select between
y
or < condition.
Содержание 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...