Cmpgt, Compare for greater than (dalu), Instruction formats and opcodes – Freescale Semiconductor StarCore SC140 User Manual

Page 437: Instruction fields, Operation assembler syntax

Advertising
background image

CMPGT

SC140 DSP Core Reference Manual

A-123

CMPGT

Compare for Greater Than (DALU)

CMPGT

Description

Status and Conditions that Affect Instruction

None.

Status and Conditions Changed by Instruction

Example

cmpgt d2,d3

Instruction Formats and Opcodes

Note:

** indicates serial grouping encoding.

Instruction Fields

Da JJJ

Single

Source Data Register

Operation

Assembler Syntax

Dn > Da

→ T

CMPGT Da,Dn

CMPGT Da,Dn

Compares two data registers (Da and Dn). The T bit is set if the signed value in the second data register
(Dn) is greater than the signed value in the first (Da); T is cleared otherwise.

Register Address

Bit Name

Description

SR[1]

T

Sets T bit if Dn > Da, otherwise cleared.

Register/Memory Address

Before

After

D2

$0000 35FA

D3

$0000 35FB

SR

$00E4 0000

$00E4 0002

Instruction

Words Cycles Type

Opcode

15

8

7

0

CMPGT Da,Dn

1

1

1

0

*

1

1

0

0

F

F

F

1

1

1

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