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.