Motorola DSP56800 Manual page 305

16-bit digital signal processor
Table of Contents

Advertisement

DO
Restrictions:
The end-of-loop comparison previously described occurs at instruction fetch time. That is, LA is com-
pared with PC when the instruction at the LA-2 is being executed. Therefore, instructions that access
the program controller registers or change program flow cannot be used in locations LA-2, LA-1, or
LA.
Proper DO loop operation is not guaranteed if an instruction starting at the LA-2, LA-1, or LA specifies
one of the program controller registers SR, SP, LA, LC, or (implicitly) PC as a destination register.
Similarly, the HWS register may not be specified as a source or destination register in an instruction
starting at the LA-2, LA-1, or LA. Additionally, the HWS register cannot be specified as a source reg-
ister in the DO instruction itself, and LA cannot be used as a target for jumps to subroutine (that is, JSR
to LA). A DO instruction cannot be repeated using the REP instruction.
The following instructions cannot begin at the indicated position(s) near the end of a DO loop:
At the LA-2, LA-1, and LA:
At the LA-1:
At the LA:
Similarly, since the DO instruction accesses the program controller registers, the DO instruction must
not be immediately preceded by any of the following instructions:
Immediately Before DO:
Other Restrictions:
Start Hardware Do Loop
DO
MOVEC from HWS
MOVEC to LA, LC, SR, SP, or HWS
Any bit-field instruction on the Status Register (SR)
Two-word instructions that read LC, SP, or HWS
ENDDO
Single-word instructions that read LC, SP, or HWS
Any two-word instruction (this restriction applies to the situation in which the DSP
simulator's single-line assembler is used to change the last instruction in a DO loop from
a one-word instruction to a two-word instruction)
Bcc, Jcc
BRSET, BRCLR
BRA, JMP REP
JSR
RTI, RTS
WAIT, STOP
MOVEC to HWS
MOVEC from HWS
DO HWS,xxxx
JSR to (LA) whenever the LF is set
A DO instruction cannot be repeated using the REP instruction
Instruction Set Details
DO
A-75

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents