Freescale Semiconductor SC140 Test for Greater Than Or Equal to Zero Dalu, Tstge d4, Tstge Dn

Models: SC140

1 760
Download 760 pages 48.94 Kb
Page 731
Image 731

TSTGE

TSTGE

Test for Greater Than

or Equal to Zero (DALU)

TSTGE

Operation

Assembler Syntax

If Dn >= 0, then 1 → T, else 0 → T

TSTGE Dn

Description

 

TSTGE Dn

 

Sets the T bit if the source data register (Dn) is greater than or equal to zero; otherwise, clears the T bit. The value in Dn is treated as a signed number

Status and Conditions that Affect Instruction

None.

Status and Conditions Changed by Instruction

Register Address

Bit Name

Description

SR[1]

T

Set if the source operand is greater than or equal to zero and cleared if

 

 

the source operand is not greater than or equal to zero.

Example

tstge d4

Register/Memory Address

D4

SR

Before

$00 5F3E 05C2

$00E4 0000

After

$00E4 0002

Instruction Formats and Opcodes

Instruction

Words

Cycles

Type

TSTGE Dn

1

1

1

Note: ** indicates serial grouping encoding.

Opcode

158 70

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

Instruction Fields

Dn

FFF

 

Single Source/Destination Data Register

 

 

 

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.

 

 

SC140 DSP Core Reference Manual

A-417

Page 731
Image 731
Freescale Semiconductor SC140 Test for Greater Than Or Equal to Zero Dalu, Tstge d4, If Dn = 0, then 1 → T, else 0 → T