Freescale Semiconductor SC140 Status and Conditions Changed by Lpmark Execution, End-of-Loop Mark

Models: SC140

1 760
Download 760 pages 48.94 Kb
Page 537
Image 537

LPMARKx

Status and Conditions Changed by LPMARK Execution

The loop flag (LFn) and short loop flag (SLFn) are cleared as described in the operation field.

Example

Insertion of lpmarkb by assembler.

Instruction

Disassembled Instruction

Comments

dosetup0 _lab

dosetup0 *+e

Sets up loop 0 with a start address at _lab.

doen0 d6

doen0 d6

Initializes a long loop with the iteration count from d6.

move.w #1,d1

move.w #<$1,d1

Puts the number one into d1.

move.w #2,d2

move.w #<$2,d2

Puts the number two into d2.

move.w #3,d3

move.w #<$3,d3

Puts the number three into d3.

move.w #4,d4

move.w #<$4,d4

Puts the number four into d4.

loopstart0

 

An assembler directive that defines the start of the loop.

_lab inc d1

inc d1

Increments d1 each pass through the loop.

inc d2

lpmarkb inc d2

lpmarkb bit placed in the prefix by the assembler. Incre-

ments d2 each pass through the loop.

inc d3

inc d3

Increments d3 each pass through the loop.

inc d4

inc d4

Increments d4 each pass through the loop.

loopend0

 

An assembler directive that defines the end of the loop.

add d1,d2,d0

add d1,d2,d0

Places the sum of d1and d2 into d0. If two iterations were

selected in d6, d1=3, d2=4, and d0=7.

Prefix Formats and Opcodes

End-of-Loop Mark

Words

Cycles

Type

LPMARKx

1

1

4

LPMARKx

2

1

4

Opcode

15

 

 

 

 

 

 

8

7

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

1

0

0

1

a

a a

0

1 1 0

p

j

c

c

c

 

 

 

 

 

 

 

 

 

 

 

 

 

 

15

 

 

 

 

 

 

8

7

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0

1

1

a

a

a

0

H t h p

j

c

c

c

 

 

 

 

 

 

1

0

1

b B e

E T

b B e E b B e E

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Note: If LPMARKA is present, j = 1. If LPMARKB is present, p = 1. The other bits shown in the encoding table are independent of LPMARKx.

SC140 DSP Core Reference Manual

A-223

Page 537
Image 537
Freescale Semiconductor SC140 specifications Status and Conditions Changed by Lpmark Execution, Prefix Formats and Opcodes