Static Programming Rules

Example 7-51. DOENn instruction following DOENSHn Instruction

doensh0 #3

; not allowed (SLF isn't reset)

doen0 #3 dosetup0 _loop_start

nop

 

 

nop

 

 

_loop_start

 

 

loopstart0

 

 

move.l #0,d0

 

 

move.l #1,d0

;instruction should be in the loop, but isn't!

move.l #2,d0

loopend0

 

 

Example 7-52. LOOPEND between DOEN and LOOPEND

doen2 #3

 

dosetup2 L_1

 

nop

 

L_1

 

loopstart2

 

nop

 

nop

;not allowed: problem created here

doen3 #3

dosetup3 L_2

 

nop

 

nop

 

nop

;problem becomes apparent here

loopend2

nop

 

L_2

 

loopstart3

 

nop

 

nop

 

nop

 

loopend3

 

Example 7-53. Changing a loop type

doensh0 #3

doen0 #3; not allowed to change loop type dosetup0 _loop_start

nop nop

_loop_start loopstart0 move.l #0,d0 move.l #1,d0 move.l #2,d0 loopend0

7-30

SC140 DSP Core Reference Manual

Page 280
Image 280
Freescale Semiconductor SC140 Example 7-52. Loopend between Doen and Loopend, Example 7-53. Changing a loop type