
6-30
SC140 DSP Core Reference Manual
Instruction Set Overview
6.4.9.8 Jump Sequence Restrictions
Sequences across change-of-flow boundaries may be restricted due to the fact that conflicts can occur
between instructions at or near the change-of-flow instruction and instructions at the destination. These
situations are usually rare since the change-of-flow operation itself typically takes enough cycles to
prevent a conflict between instructions at either end of the jump. However, restrictions might occur in
some situations when there is an instruction grouped with the change-of-flow instruction (or in its delay
slot) and a conflicting instruction at the destination address. The relevant restrictions are A.1, A.2, T.1,
SR.2, SR.2a, SR.3, SR.4, and CL.2. Note that the instructions BSR, BSRD, JSR, and JSRD have an
inherent one-cycle delay for a push that separates instructions grouped with them (or in the delay slot) from
instructions at the destination. Therefore, any cases requiring one cycle separation are not restricted.
The terms in the two restrictions cases below are defined as follows:
CHOF
is the change-of-flow instruction with
CHOFD
being the delayed version.
i1 and i2
are two instructions that are restricted, if separated by less than Rd cycles.
Ci1
is the cycle count for i1.
Cj
is the cycle count for CHOF and CHOFD with no instructions in the delay slot.
Cjn
is the longest cycle count for other instructions in an execution set that contains CHOF. The
minimum value is one, for no other instructions.
M
is a delay value equal to one if CHOF or CHOFD is BSR, BSRD, JSR, or JSRD.
Otherwise, M = 0.
Case 1
— Given a sequence between instructions grouped with CHOF and instructions at the destination
of CHOF such that:
CHOF _dest i1
. . . .
_dest i2
The condition is that if (Cj – Ci1 + M) < Rd, then a sequence between i1 and i2 is restricted.
An example of a restricted case is:
JMP _dest BMSET #$10,MCTL.L; Cj=3, Ci1=2, M=0, Cj – Ci1 + M = 1
. . .
_dest IFT MOVE.W (R0)+,D0
; Rd = 2, restriction A.1 violated
A non-restricted case is:
JSR _dest BMTSTC #$10,(SP+4) ;Cj=3, Ci1=3, M=1, Cj - Ci1 + M = 1
. . .
_dest IFT MOVE.W D0,(R1)+ ; Rd = 1;restriction T.1 not violated
Case 2
— Given a sequence between instructions in the delay slot of CHOFD and the destination of
CHOFD such that:
CHOFD _dest
i1
. . .
_dest i2
The condition is that if max(M, (Cj – Ci1 – Cjn + M)) < Rd, then a sequence between i1 and i2 is restricted.