Vector Floating-point Programming

6.7.3FCMP

Floating-point compare.

FCMP is always scalar.

Syntax

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

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

where:

Eis 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 signalling NaN.

Zis 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 on page 6-8).

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 on page 6-8).

Exceptions

FCMP instructions can produce Invalid Operation exceptions.

Examples

FCMPS

s3, s0

FCMPEDNE

d5, d13

FCMPZSEQ

s2

ARM DUI 0068B

Copyright © 2000, 2001 ARM Limited. All rights reserved.

6-19

Page 257
Image 257
ARM VERSION 1.2 manual Floating-point compare Fcmp is always scalar, With zero instruction