5.7.3. FCMP

Floating-point compare.

FCMP is always scalar.

Syntax

FCMP{E}<precision>{cond} Fd, Fm
FCMP{E}Z<precision>{cond} Fd

where:

E

is an optional parameter. If E is present, an exception is raised if either operand is any kind of NaN. Otherwise, an exception is raised only if either operand is a signaling NaN.

Z

is a parameter specifying comparison with zero.

<precision>

must be either S for single-precision, or D for double-precision.

cond

is an optional condition code (see VFP and condition codes).

Fd

is the VFP register holding the first operand.

Fm

is the VFP register holding the second operand. Omit Fm for a compare with zero instruction.

The precision of Fd and Fm must match the precision specified in <precision>.

Usage

The FCMP instruction subtracts the value in Fm from the value in Fd and sets the VFP condition flags on the result (see VFP and condition codes).

Exceptions

FCMP instructions can produce Invalid Operation exceptions.

Examples

    FCMPS       s3, s0
    FCMPEDNE    d5, d13
    FCMPZSEQ    s2
Copyright © 2002-2005 ARM Limited. All rights reserved.ARM DUI 0204F
Non-Confidential