DECGE

DECGE

Decrement and Set T

DECGE

If Greater Than or Equal to Zero (DALU)

 

Operation

Assembler Syntax

 

Dn – 1 → Dn; Dn≥0 → T

DECGE Dn

 

Description

DECGE Dn

Decrements a data register (Dn) and sets the T bit if the result is greater than or equal to zero. In the case of an arithmetic overflow (DECGE on the value $80 0000 0000), the T bit will not be set.

Status and Conditions that Affect Instruction

None.

Status and Conditions Changed by Instruction

Register Address

Bit Name

Description

SR[0]

C

Calculates and updates the carry bit in the status register.

SR[1]

T

Set if result 0, cleared otherwise.

EMR[2]

DOVF

Set if the result cannot be represented in 40 bits.

Ln

L

Clears the Ln bit in the destination register.

Example decge

Instruction

SR

 

 

d3

move.w #$1,d3 ;$00E4

0000

 

$00 0000 0001

decge

d3

;$00E4

0002

T-bit set

$00 0000 0000

decge

d3

;$00E4

0001

T-bit cleared, carry bit set $FF FFFF FFFF

Instruction Formats and Opcodes

Instruction

Words

Cycles

Type

DECGE Dn

1

1

1

Note: ** indicates serial grouping encoding.

Opcode

158 70

0 * 1 0 0 1 F F F 1 1 0 1 1 0 0

A-144

SC140 DSP Core Reference Manual

Page 458
Image 458
Freescale Semiconductor SC140 specifications Example decge, Dn 1 → Dn Dn≥0 → T, Decge Dn