4.12 __vfp_status intrinsic

This intrinsic reads or modifies the FPSCR.

To use this intrinsic, your source file must contain #include <arm_compat.h>. This is only available for targets in AArch32 state.

Syntax

unsigned int __vfp_status(unsigned int mask, unsigned int flags)

Usage

Use this intrinsic to read or modify the flags in FPSCR.

The intrinsic returns the value of FPSCR, unmodified, if mask and flags are 0.

You can clear, set, or toggle individual flags in FPSCR using the bits in mask and flags, as shown in the following table. The intrinsic returns the modified value of FPSCR if mask and flags are not both 0.

Table 4-1 Modifying the FPSCR flags

mask bit flags bit Effect on FPSCR flag
0 0 Does not modify the flag
0 1 Toggles the flag
1 1 Sets the flag
1 0 Clears the flag

Note:

If you want to read or modify only the exception flags in FPSCR, then Arm recommends that you use the standard C99 features in <fenv.h>.

Errors

The compiler generates an error if you attempt to use this intrinsic when compiling for a target that does not have VFP.

Non-ConfidentialPDF file icon PDF versionDUI0774J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.