User`s manual

3-12 Optimizing DSP56300/DSP56600 Applications MOTOROLA
Program Control
Conditional DALU Instructions
specify that the instruction will update the CCR (according to the
result and only if it is executed), by writing “.U” at the end of the
condition attribute. For example:
add x0,a IFne.U
The full set of condition mnemonics may be used, thus helping
program clarity and flexibility. The condition table could be found
on Appendix A of the
DSP56300
and
DSP56600 Family Manuals
.
The full list of the arithmetic instructions that conditional execution
attributes could be added to them is given in Table 2-1 on page 2-2.
In general, these are all Data ALU operations that allow parallel
moves. The condition attributes use the same opcode fields that are
used to specify the parallel moves, so conditional execution and
parallel moves exclude each other. The options the user has to
modify these instructions are summarized in Table 3-4.
Another data-changing instruction that could be executed
conditionally is Tcc (transfer on condition). This instruction could
also be used to transfer AGU registers conditionally. On the other
hand, it does not have a parallel move option—see Appendix A in
the
DSP56300
and
DSP56600 Family Manuals
.
Conditional arithmetic instructions enable the user to replace short
jumps with fewer instructions, thus making the code more clear and
compact. For example, consider the following high-level code line:
if
(A==Y0)
then
B=B+X0
else
B=B+X1
Without conditional arithmetic instructions, the code may look like
this:
cmp y0,a
beq _TRUE
Table 3-4 Options for Parallel Moves and Conditional Execution
Attribute Syntax Example
none add a,b
conditional execution
without status update
IFcc add a,b IFge
conditional execution
with status update
IFcc.U add a,b IFlt.U
parallel move
x:<ea>
or y:<ea>
or both
or l:<ea>
add a,b x:(r0)+,a y:(r4)-,b