Loopend between doen and loopend -30, Changing a loop type -30 – Freescale Semiconductor StarCore SC140 User Manual

Page 280

Advertising
background image

7-30

SC140 DSP Core Reference Manual

Static Programming Rules

Example 7-51. DOENn instruction following DOENSHn Instruction

doensh0 #3
doen0 #3 dosetup0 _loop_start

; not allowed (SLF isn't reset)

nop
nop

_loop_start

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

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

loopend0

Example 7-52. LOOPEND between DOEN and LOOPEND

doen2 #3
dosetup2 L_1
nop

L_1

loopstart2
nop
nop
doen3 #3

;not allowed: problem created here

dosetup3 L_2
nop
nop
nop
loopend2

;problem becomes apparent here

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

Advertising