Cmpeq.w, Compare for equal (dalu), Operation assembler syntax – Freescale Semiconductor StarCore SC140 User Manual

Page 433

Advertising
background image

CMPEQ.W

SC140 DSP Core Reference Manual

A-119

CMPEQ.W

Compare for Equal (DALU)

CMPEQ.W

Description

Status and Conditions that Affect Instruction

None.

Status and Conditions Changed by Instruction

Example

cmpeq.w #$5,d3

Operation

Assembler Syntax

If #u5 == Dn, then 1

→ T, else 0 → T

CMPEQ.W #u5,Dn {0

≤ u5 < 32}

If #s16 == Dn, then 1

→ T, else 0 → T

CMPEQ.W #s16,Dn {–2

15

≤ s16 < 2

15

}

CMPEQ.W #u5,Dn

Compares an immediate unsigned 5-bit value (range 0–31) with a data register (Dn) for equality. The
immediate value is right-aligned and zero-extended.

CMPEQ.W #s16,Dn

Compares an immediate signed 16-bit value that has been right-aligned and sign-extended to 40 bits with a
data register (Dn) for equality.

Register Address

Bit Name

Description

SR[1]

T

Sets T bit if equal, otherwise cleared.

Register/Memory Address

Before

After

immediate

$0000 0005

D3

$00 0000 0005

SR

$00E4 0000

$00E4 0002

Advertising