
Compact Opcode Use
Cycle Count of an Instruction
MOTOROLA
Optimizing DSP56300/DSP56600 Applications
7-3
In the second example, the Tcc instruction is used in parallel with a
move instruction to replace a conditional branch, saving 6 cycles.
7.1.3
Inverting Condition in Conditional Jump
Instructions
The conditional JUMP and BRANCH instructions require
additional cycle when the condition is not true and the target is not
taken. It is advised to choose the exact condition of the JUMP such
that in most cases, the target will be taken.
Example 7-1
First Example—Original Code with Conditional
Branch
tst
a
bgt
_else
add
x0,b
bra
_endif
_else
add
y0,b
_endif
Example 7-2
First Example—Code with Conditional Branch
Replaced by Conditional Execution Opcodes (IFcc)
tst
a
add
x0,b
ifgt
add
y0,b
ifle
Example 7-3
Second Example—Original Code with Conditional
Branch
ble
_next
move
y0,b
move
r1,r2
_next
Example 7-4
Second Example—Code with Conditional Branch
Replaced by Conditional Execution Opcodes (Tcc)
tgt
y0,b
r1,r2