F.3.3 Changes To The Subcu Instruction - Texas Instruments TMS320C28x Reference Manual

Dsp cpu and instruction set
Table of Contents

Advertisement

Migrating to C28x Object Code
F.3.3
Changes to the SUBCU Instruction
C27x Operations That Are Made Repeatable On C28x include the following:
MOV
ADD
ADDU
SUB
SUBU
ADDL
SFR
LSL
MOVH
MOV
MOVA
MOVS
MPYA
MPYS
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.
loc16,AX
ACC,loc16 << 16
ACC,loc16
ACC,loc16 << 16
ACC,loc16
ACC,loc32
ACC,1..16
ACC,1..16
loc16,P
loc16,P
T,loc16
T,loc16
P,T,loc16
P,T,loc16

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?

Table of Contents

Save PDF