3.11.3. VCMP and VCMPE

Compares two floating-point registers, or one floating-point register and zero.

Syntax

VCMP{E}{cond}.F<32|64> <Sd|Dd>, <Sm|#0.0>
VCMP{E}{cond}.F<32|64> <Sd|Dd>, #0.0

Where:

cond

Is an optional condition code. See Conditional execution.

E

If present, any NaN operand causes an Invalid Operation exception. Otherwise, only a signaling NaN causes the exception.

<Sd|Dd>

Is the floating-point operand to compare.

<Sm|Dm>

Is the floating-point operand that is compared with.

Operation

This instruction:

  1. Compares either:

    • Two floating-point registers.

    • Or one floating-point register and zero.

  2. Writes the result to the FPSCR flags.

Restrictions

This instruction can optionally raise an Invalid Operation exception if either operand is any type of NaN. It always raises an Invalid Operation exception if either operand is a signaling NaN.

Condition flags

When this instruction writes the result to the FPSCR flags, the values are normally transferred to the Arm flags by a subsequent VMRS instruction, see VMRS.

Examples

VCMP.F32    S4, #0.0VCMP.F32    S4, S2
Copyright © 2015, 2018 Arm. All rights reserved.ARM DUI 0646C
Non-ConfidentialID121118