Lpmarkx, End-of-loop mark (prefix), Description – Freescale Semiconductor StarCore SC140 User Manual

Page 535: Operation disassembler syntax only

Advertising
background image

LPMARKx

SC140 DSP Core Reference Manual

A-221

L-M

LPMARKx

End-of-Loop Mark (PREFIX)

LPMARKx

Description

The LPMARK prefix bits are used for hardware loops and perform the operations associated with ending a
loop iteration: a conditional jump to the start of the loop (based on the value of LCn) and a decrement of
LCn. In the case where LCn indicates the last iteration, these bits disable the active loop and do not jump.
The LPMARK bits use the SAn/LCn register of the active loop as specified by the LF bits in SR.

The LPMARK bits are encoded in the prefix words, and are not independent instructions. They are
generated automatically by the assembler at the correct positions based on the LOOPSTART and
LOOPEND assembly directives inserted by the programmer. The assembler does not allow the
programmer to use LPMARKx.

Operation

Disassembler Syntax Only

If LCn > 1,

then SAn

→ PC

LCn – 1

→ LCn

else next PC

→ PC

0

→ LCn

0

→ LFn

LPMARKB (long loop)

If LCn > 1,

then SAn

→ PC

LCn – 1

→ LCn

else next PC

→ PC

0

→ LCn

0

→ LFn

LPMARKA (external of nested loops)

If LCn > 1,

then SAn

→ PC

LCn – 1

→ LCn

else next PC

→ PC

0

→ LCn

0

→ LFn

0

→ SLF

LPMARKB (short loop of 2 sets)

If LCn > 1,

then SAn

→ PC

LCn – 1

→ LCn

else next PC

→ PC

0

→ LCn

0

→ LFn

0

→ SLF

LPMARKA (short loop of 1 set)

Advertising