[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Assembler Language Reference

fcmpo (Floating Compare Ordered) Instruction

Purpose

Compares the contents of two floating-point registers.

Syntax

fcmpo BF,FRA,FRB

Description

The fcmpo instruction compares the 64-bit, double-precision floating-point operand in floating-point register (FPR) FRA to the 64-bit, double-precision floating-point operand in FPR FRB. The Floating-Point Condition Code Field (FPCC) of the Floating-Point Status and Control Register (FPSCR) is set to reflect the value of the operand FPR FRA with respect to operand FPR FRB. The value BF determines which field in the condition register receives the four FPCC bits.

Consider the following when using the fcmpo instruction:

The fcmpo instruction has one syntax form and always affects the FT, FG, FE, FU, VXSNAN, and VXVC bits in the Floating-Point Status and Control Register.

Parameters

BF Specifies field in the condition register that receives the four FPCC bits.
FRA Specifies source floating-point register.
FRB Specifies source floating-point register.

Examples

The following code compares the contents of FPR 4 and FPR 6 and sets Condition Register Field 1 and the Floating-Point Status and Control Register to reflect the result of the operation:

# Assume CR = 0 and FPSCR = 0.
# Assume FPR 5 contains 0xC053 4000 0000 0000. 
# Assume FPR 4 contains 0x400C 0000 0000 0000.
fcmpo 6,4,5
# CR now contains 0x0000 0040.
# FPSCR now contains 0x0000 4000.

Related Information

Floating-Point Processor .

Floating-Point Compare Instructions .


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]