Loop cof at end of nested long loops -39, Subroutine call to end of loops -39, Rule l.c.9 – Freescale Semiconductor StarCore SC140 User Manual

Page 289: Rule l.c.10

Advertising
background image

Static Programming Rules

SC140 DSP Core Reference Manual

7-39

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
nop

; last address of long loop 1

loopend1
nop

; last address of long loop 0

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
jsr label2

;not allowed

nop
nop
inca r1

label2 inca r7

;LA-2

add d1,d2,d3

;LA-1

move.w d3,(r0)

;LA

loopend0

Advertising