User`s manual
Compact Opcode Use
Addressing Modes
MOTOROLA Optimizing DSP56300/DSP56600 Applications 7-5
By choosing the conditions more carefully, the code can be
optimized:
tst a
bne _case_4
add #2,a
bra _end_case
_case_4
cmp #4,a
bne _case_9
tfr b,a
bra _end_case
_case_9
cmp #9,a
bne _default
asl a
bra _end_case
_default
add x0,a
_end_case
7.2 ADDRESSING MODES
The cycle count of an instruction may depend upon the specific
addressing mode used with this instruction. It is essential that the
user will recognize these addressing modes in order to decrease the
cycle count of the entire application.
7.2.1 Single Cycle Addressing Modes
Many addressing modes, especially in the MOVE instructions, are
single cycle. Some addressing modes add an additional cycle to the
execution of the instruction, for example the instruction
move X:(R0+N),X0
executes in 2 clock cycles, while the instruction
move X:(R0)+N,X0
executes in a single clock cycle.