Community
cancel
Showing results for 
Search instead for 
Did you mean: 
inteleverywhere
Beginner
68 Views

Question on AVX Instruction set reference

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
Black Belt
68 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.
Reply