Cmpeq, Compare for equal (dalu), Instruction formats and opcodes – Freescale Semiconductor StarCore SC140 User Manual

Page 431: Instruction fields, Operation assembler syntax

Advertising
background image

CMPEQ

SC140 DSP Core Reference Manual

A-117

CMPEQ

Compare for Equal (DALU)

CMPEQ

Description

Status and Conditions that Affect Instruction

None.

Status and Conditions Changed by Instruction

Example

cmpeq d2,d3

Instruction Formats and Opcodes

Note:

** indicates serial grouping encoding.

Instruction Fields

Da

JJJ

Single Source Data Register

Operation

Assembler Syntax

If Da == Dn, then 1

→ T, else 0 → T

CMPEQ Da,Dn

CMPEQ Da,Dn

Compares the 40-bit contents of two data registers (Da and Dn), setting the T bit if they are equal, and
clearing the T bit if they are not.

Register Address

Bit Name

Description

SR[1]

T

Sets T bit if equal, otherwise cleared.

Register/Memory Address

Before

After

D2

$00 0000 0005

D3

$00 0000 0005

SR

$00E4 0000

$00E4 0002

Instruction

Words Cycles Type

Opcode

15

8

7

0

CMPEQ Da,Dn

1

1

1

0

*

1

1

0

0

F

F

F

1

1

0

0

J

J

J

000

D0

010

D2

100

D4

110

D6

001

D1

011

D3

101

D5

111

D7

Note:

This instruction can specify D8-D15 as operands by using a prefix.

Advertising