Jump if true using delay slot (agu), Description, Example – Freescale Semiconductor StarCore SC140 User Manual

Page 533: Operation assembler syntax

Advertising
background image

JTD

SC140 DSP Core Reference Manual

A-219

JTD

Jump If True Using Delay Slot (AGU)

JTD

Description

If the T bit is set, this instruction continues program execution at a specified 32-bit memory destination
address after executing the execution set in the delay slot. If the T bit is cleared, the PC is

updated to point to

the next execution set

. Program execution continues sequentially. The destination address cannot be in the

middle of an execution set.

Status and Conditions that Affect Instruction

Status and Conditions Changed by Instruction

None.

Example

jtd r0

Operation

Assembler Syntax

If T=1, then label

→ PC

JTD label {0

≤ label < 2

32

,W}

If T=1, then Rn

→ PC

JTD Rn

JTD label

Jumps to the memory location specified by the label. The assembler and linker calculate the 32-bit absolute
address from the label.

JTD Rn

Jumps to the memory location contained in an address register (Rn). The value in Rn must be
word-aligned.

Register Address

Bit Name

Description

SR[1]

T

True bit

Instruction

Comment

move.w #ADRES,r0

Load ADRESS into r0.

move.w #$5,d3

Load 5 into d3.

cmpeq.w#$5,d3

Set the true bit in the status register.

jtd r0 move.w #$45,d0

Jump to ADRESS stored in r0, execute the move.w.

inc d1

Increment executed in the delay slot.

- - - -

Skipped over.

- - - -

Skipped over.

- - - -

Skipped over.

ADRESS

Execution continues here at ADRESS.

move.w #$16,d4

Advertising