AVX, AMX, SSE, and MMX Support

wRTOS supports and saves state information for AVX/AVX2 (YMM0~YMM15), AVX512 (ZMM0~ZMM31), AMX, SSE (SSE/SSE2/SSE3/SSE4), and MMX registers. This support provides many benefits, including the following:

For more information on AVX, SSE, and MMX-related technologies, see https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/e9b52ceh(v=vs.100)?redirectedfrom=MSDN.

IMPORTANT: Not all features supported by a processor may be enabled on the system. Using a feature that is not enabled may result in exceptions or undefined behavior. Use RtGetEnabledXStateFeature to determine processor capabilities before using AVX/AVX2 (YMM0~YMM15), AVX-512 (ZMM0~ZMM31), AMX, SSE (SSE/SSE2/SSE3/SSE4), and MMX registers.

Moving Threads Using AVX, AMX, SSE, and MMX

Threads using AVX/AVX2, AVX-512, AMX, SSE, or MMX registers can be moved from one processor to another until the first floating point, AVX/AVX2, AVX-512, AMX, SSE, or MMX instruction is made, after which they cannot be moved.

AVX and SSE Exceptions

wRTOS supports the following AVX and SSE exceptions:

These exceptions must be unmasked before they can be used. For more information, see https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/e9b52ceh(v=vs.100)?redirectedfrom=MSDN.

AVX and SSE exceptions are controlled by the SIMD status and control register. For information on macro functions that allow for reading/writing bits from this control register, see https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/34zdf63y(v=vs.100)?redirectedfrom=MSDN.

AVX/AVX2, AVX-512, and SSE Compiler Support

wRTOS supports both Intel assembly commands and compiler intrinsic AVX/AVX2 and AVX-512 routines and SSE, AVX/AVX2, and AVX-512 compiler flags through Visual Studio. For more information, see Chapter 5 in the Intel® Advanced Vector Extensions Programming Reference.

Related topics: