Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
1094 Discussions

Question on AVX Instruction set reference

inteleverywhere
Beginner
312 Views

If suppose there is a legacy 128 bit SIMD instrcution and the data is held in a 256 bit register. And if the entire 256 bit data is to be processed but since only a 128 bit SIMD is availabale, how can one:

1. run the instruction on the lower 128 bits
2. run the instruction on the upper 128 bits
3. shift the upper 128 bits to the lower 128 bit position

Thanks

0 Kudos
1 Reply
TimP
Honored Contributor III
312 Views
Instructions prior to AVX don't touch the upper 128 bits. AVX instructions are available to copy the upper 128 bits to the lower 128, where an SSE instruction can operate. Following the SSE instruction, VZEROUPPER is required to clear the upper 128 bits to avoid ugly hardware timing dependencies in subsequent AVX instructions. Switching in and out of AVX normally occurs during function call/return; interprocedural optimizations aren't supported in this context, to my knowledge.
0 Kudos
Reply