Inverting Condition In Conditional Jump Instructions - Motorola DSP56600 Manual

Application optimization for digital signal processors
Table of Contents

Advertisement

Example 7-1 First Example—Original Code with Conditional
_else
_endif
Example 7-2 First Example—Code with Conditional Branch
Replaced by Conditional Execution Opcodes (IFcc)
In the second example, the Tcc instruction is used in parallel with a
move instruction to replace a conditional branch, saving 6 cycles.
Example 7-3 Second Example—Original Code with Conditional
_next
Example 7-4 Second Example—Code with Conditional Branch
Replaced by Conditional Execution Opcodes (Tcc)
tgt
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.
MOTOROLA
Optimizing DSP56300/DSP56600 Applications
Branch
tst
a
bgt
_else
add
x0,b
bra
_endif
add
y0,b
tst
a
add
x0,b
add
y0,b
Branch
ble
_next
move
y0,b
move
r1,r2
y0,b
r1,r2
ifgt
ifle
Compact Opcode Use
Cycle Count of an Instruction
7-3

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dsp56300

Table of Contents