align(16) struct member throws an exception with movdqa

ixid nuaccount at gmail.com
Sun Jun 10 20:19:07 PDT 2012


     struct a
     {   align(16) int[4] test = [1,2,3,4];
     }
     a test;

     asm
     {
             movdqa XMM0, test   ;
             addps XMM0, XMM0    ;
             movdpa test, XMM0   ;
     }

This works fine with unaligned movdqu but throws an access 
violation exception with movdqa. Why isn't align letting me do an 
aligned read? How should I do an aligned read?


More information about the Digitalmars-d-learn mailing list