CMPHIA

 

 

 

CMPHIA

Unsigned Compare for Higher (AGU) CMPHIA

Operation

Assembler Syntax

Rx > rx → T

CMPHIA rx,Rx

Description

 

CMPHIA rx,Rx

 

Compares the unsigned value in two AGU registers (rx and Rx) to determine which is greater. It sets the T bit if the unsigned value of Rx is greater than the unsigned value of rx. It clears the T bit if the unsigned value of Rx is not greater than the unsigned value of rx. Note that a register cannot be compared to itself using this instruction.

Status and Conditions that Affect Instruction

Register Address

Bit Name

Description

SR[18]

EXP

Determines which stack pointer is used when the stack pointer is an

 

 

operand. Otherwise, the instruction is not affected by SR.

Status and Conditions Changed By Instruction

Register Address

Bit Name

Description

SR[1]

T

Sets the T bit if unsigned Rx > rx, otherwise cleared.

Example

cmphia r0,r1

Register/Memory Address

R0

R1

SR

Before

$FFFF 8002

$FFFF FFFF

$00E4 0000

After

$00E4 0002

SC140 DSP Core Reference Manual

A-131

Page 445
Image 445
Freescale Semiconductor SC140 specifications Unsigned Compare for Higher AGU Cmphia, Cmphia r0,r1, Cmphia rx,Rx