3 fcmp – ARM VERSION 1.2 User Manual

Page 257

Advertising
background image

Vector Floating-point Programming

ARM DUI 0068B

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

6-19

6.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 signalling 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 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

Advertising