Overview: Intrinsics for Managing Extended Processor States and Registers
The Intel® C++ Compiler provides twelve intrinsics for managing the extended processor states and extended registers. These intrinsics are available for the IA-32 and Intel® 64 architectures running on supported operating systems.
To use these intrinsics, include the
immintrin.hfile as follows:
The intrinsics map directly to the hardware system instructions described in "Intel® 64 and IA-32 Architectures Software Developer's Manual, volumes 1, 2a, and 2b" and " Intel® Advanced Vector Extensions Programming Reference ".
The intrinsics for managing the extended processor states and extended registers include:
- Two intrinsics to read from and write to the specified extended control register. These intrinsics map toXGETBVandXSETBVinstructions.
- Four intrinsics to save and restore the current state of thex87 FPU,MMX,XMM, andMXCSRregisters. These intrinsics map toFXSAVE,FXSAVE64,FXRSTOR, andFXRSTOR64instructions.
- Six intrinsics to save and restore the current state of thex87 FPU,MMX,XMM,YMM, andMXCSRregisters. These intrinsics map toXSAVE,XSAVE64,XSAVEOPT,XSAVEOPT64,XRSTOR, andXRSTOR64instructions.