By choosing the conditions more carefully, the code can be
optimized:
_case_4
_case_9
_default
_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
executes in 2 clock cycles, while the instruction
move
executes in a single clock cycle.
MOTOROLA
Optimizing DSP56300/DSP56600 Applications
tst
a
bne
_case_4
add
#2,a
bra
_end_case
cmp
#4,a
bne
_case_9
tfr
b,a
bra
_end_case
cmp
#9,a
bne
_default
asl
a
bra
_end_case
add
x0,a
X:(R0+N),X0
X:(R0)+N,X0
Compact Opcode Use
Addressing Modes
7-5