LPMARK Rules

LPMARK Rule L.C.9

A loop COF instruction (BREAK, CONT, CONTD, or SKIPLS) cannot have a COF destination that is at LPB of a long loop if immediately followed by LPA.

Example 7-100. Loop COF at End of Nested Long Loops

doen0 #5

 

 

...

 

 

doen1 #10

 

 

...

 

 

doen2 d0

 

 

nop

 

;not allowed

skipls _dest

 

nop

 

 

ift break label

 

nop

{lpmarkb set}

 

nop

 

nop

 

 

nop

 

 

...

{lpmarkb set}

 

nop

 

_dest

{lpmarkb set}

 

nop

;last address of long loop 1

label nop

{lpmarka set}

nop

 

;last address of long loop 0

LPMARK Rule L.C.10

A BSR, BSRD, JSR, or JSRD instruction cannot have a COF destination that is at LPA or LPB of a loop.

Example 7-101. Subroutine Call to End of Loops

dosetup0 label1 doen0 d1

nop nop

label1 nop

 

 

nop

 

;not allowed

jsr label2

 

nop

 

 

nop

 

 

inca r1

{lpmarkb set};LA-2

label2 inca r7

add d1,d2,d3

 

;LA-1

move.w d3,(r0)

;LA

7-58

SC140 DSP Core Reference Manual

Page 308
Image 308
Freescale Semiconductor SC140 Lpmark Rule L.C.9, Lpmark Rule L.C.10, Example 7-100. Loop COF at End of Nested Long Loops