How to get data out of AVX registers?
<p>Using MSVC 2013 and AVX 1, I've got 8 floats in a register:</p>

<pre><code>__m256 foo = mm256_fmadd_ps(a,b,c);
</code></pre>

<p>Now I want to call <code>inline void print(float) {...}</code> for all 8 floats. It looks like the <em>Intel</em> AVX intrisics would make this rather complicated:</p>

<pre><code>print(_castu32_f32(_mm256_extract_epi32(foo, 0)));
print(_castu32_f32(_mm256_extract_epi32(foo, 1)));
print(_castu32_f32(_mm256_extract_epi32(foo, 2)));
// ...
</code></pre>

<p>but MSVC doesn't even have either of these two intrinsics. Sure, I could write back the values to memory and load from there, but I suspect that at assembly level there's no need to spill a register.</p>

<p>Bonus Q: I'd of course like to write</p>

<pre><code>for(int i = 0; i !=8; ++i) 
    print(_castu32_f32(_mm256_extract_epi32(foo, i)))
</code></pre>

<p>but MSVC doesn't understand that many intrinsics <em>require</em> loop unrolling. How do I write a loop over the 8x32 floats in <code>__m256 foo</code>?</p>