AVX2

From OSDev.wiki
Revision as of 23:03, 19 September 2022 by osdev>Devc1
Jump to navigation Jump to search

Devc1, unfinished.

Advanced Vector Extensions

AVX or (Advanced Vector Extensions) are extensions to the x86 architecture introduced by Intel with the [SandyBridge] micro-architecture. AVX adds 86 instructions to the CPU instruction set, it extends the XMM register to 256 Bit YMM registers, these registers operate as lower-upper halves meaning that XMMx contains the low 128 bits of YMMx, thus, the AVX instruction set increases the size of memory transfers and parallel floating point computations. Effective usage of these extensions may vastly increase the performance of your program.

AVX2

AVX2 expands the AVX instruction set, it includes an expansion of the SSE Vector integer instructions, Gather support, vector shifts and more.

[code] vmulps ymm0, ymm0, ymm1 ; Available in AVX vpaddb xmm0, xmm1, xmm2 ; Available in AVX (Multiply 16 Byte integers in XMM1 by integers in XMM2 and store result in XMM0) vpaddb ymm0, ymm1, ymm2 ; Requires AVX2 (Multiply 32 Byte integers in YMM1 by integers in YMM2 and store result in XMM0) [/code]