Would that even be true in the case where you specify a alignment ( keeping in mind that the alignment is for that specific variable)?<div><br></div><div><br><br><div class="gmail_quote">On Tue, Sep 20, 2011 at 7:25 PM, Peter Alexander <span dir="ltr"><<a href="mailto:peter.alexander.au@gmail.com">peter.alexander.au@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On 19/09/11 9:17 AM, Rory McGuire wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
surely you would have to use<br>
  movaps XMM0, v.v;<br>
<br>
  because the alignment would only happen inside the struct?<br>
<br>
<br></div><div><div></div><div class="h5">
On Sat, Sep 17, 2011 at 8:11 PM, Adam D. Ruppe<br>
<<a href="mailto:destructionator@gmail.com" target="_blank">destructionator@gmail.com</a> <mailto:<a href="mailto:destructionator@gmail.com" target="_blank">destructionator@gmail.<u></u>com</a>>> wrote:<br>
<br>
    Perhaps:<br>
<br>
    void foo() {<br>
            struct V { align(16) float[4] v = [1.0f, 2.0f, 3.0f, 4.0f]; }<br>
            V v;<br>
            asm {<br>
                    movaps XMM0, v;<br>
            }<br>
    }<br>
<br>
<br>
    It compiles, but I'm not sure if it's actually correct.<br>
<br>
<br>
</div></div></blockquote>
<br>
v has offset 0 in the struct, so &v.v == &v, which is all the inline asm cares about.<br>
<br>
</blockquote></div><br></div>