SSE: Difference between revisions

Jump to navigation Jump to search
371 bytes added ,  7 years ago
Added information on AVX-512
[unchecked revision][unchecked revision]
(Merging AVX page into SSE page, as it was already mentioned here)
(Added information on AVX-512)
Line 93:
The bit for CVT16 can be found on CPUID page 1, in ECX bit 29
======AVX======
The bit for AVX can be found on CPUID page 1, in ECX bit 28
======XSAVE======
The bit for XSAVE (needed to manage extended processor states) can be found on CPUID page 1, in ECX bit 26
=====AVX-512=====
The bits for AVX-512 are in CPUID page 0x0D, 0x0, EAX bits 5-7
 
===X86_64===
Line 103 ⟶ 107:
=== AVX ===
 
AVX needneeds to be enabled by the kernel before being used. Forgetting to do this will raise an #UD on the first AVX call.
Both SSE and OSXSAVE must be enabled before allowing. Failing to do so will also produce an #UD.
 
AVX is enabled by setting bit 2 of the XCR0 register. Bit 1 of XCR0 must also be set (indicating SSE support).
 
Here is an example of assembly code enabling AVX after SSE has been enabled (you should check AVX isand XSAVE are supported first, see above):
 
<source lang="asm">
Line 125 ⟶ 129:
</source>
 
To enable AVX-512, set the OPMASK (bit 5), ZMM_Hi256 (bit 6), Hi16_ZMM (bit 7) of XCR0. You must ensure that these bits are valid first (see above).
 
==See Also==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu