Static Programming Rules

Rule L.C.9

A loop COF instruction (BREAK, CONT, CONTD, or SKIPLS) cannot have a COF destination that is one VLES before two consecutive VLES that are both LA of long loops.

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

doen0 #5

...

loopstart0

...

doen1 #10

...

loopstart1

...

doen2 d0

...

skipls _dest ; not allowed

loopstart2

...

loopend2

...

_dest

nop

; last address of long loop

1

nop

loopend1

; last address of long loop

0

nop

loopend0

 

 

Rule L.C.10

A BSR, BSRD, JSR, or JSRD instruction cannot have a COF destination that is LA-2 of a long loop or SA of a short loop.

Example 7-71. Subroutine Call to End of Loops

dosetup0 label1

 

doen0 d1

 

nop

 

nop

 

loopstart0

 

label1 nop

 

nop

;not allowed

jsr label2

nop

 

nop

 

inca r1

;LA-2

label2 inca r7

add d1,d2,d3

;LA-1

move.w d3,(r0)

;LA

loopend0

 

SC140 DSP Core Reference Manual

7-39

Page 289
Image 289
Freescale Semiconductor SC140 specifications Rule L.C.9, Rule L.C.10, Example 7-70. Loop COF at End of Nested Long Loops