OEMSaveVFPCtrlRegs (Compact 2013)

10/16/2014

This function saves the state of the extra implementation-specific vector floating point (VFP) registers for the current thread.

Syntax

void OEMSaveVFPCtrlRegs(
  LPDWORD lpExtra,
  int nMaxRegs
);

Parameters

  • lpExtra
    [in] A pointer to a memory location to save the extra floating point registers. Use this parameter only for implementation-specific VFP registers.
  • nMaxRegs
    [in] The number of extra 32-bit implementation-defined VFP registers that can be saved for a thread's context. This number of registers is currently set to 8.

Return Value

None.

Remarks

This function is specific to ARM architecture with a CPU that supports VFP. The kernel calls OEMSaveVFPCtrlRegs to save the control registers. It is not intended for general purpose VFP registers.

The kernel saves and restores VFP registers only when necessary and only to a limited extent. If a thread never uses VFP, the kernel will not save or restore VFP registers for the thread.

By default the VFP is turned off until a VFP instruction is executed.

If an exception is generated because the VFP is turned off, the current thread becomes the owner of the VFP.

If another thread previously owned a VFP, the OEMSaveVFPCtrlRegs function saves the state of the previous owner, and OEMRestoreVFPCtrlRegs restores the state of the new owner.

To make OEMSaveVFPCtrlRegs accessible to the kernel, assign the OEMGLOBAL function pointer pfnOEMSaveVFPCtrlRegs in the call to the OEMInit function.

Requirements

Header

Developer Implemented

Library

OEMMain.lib or OEMMain_StaticKITL.lib

See Also

Reference

Optional OAL Functions
OEMRestoreVFPCtrlRegs
OEMInit