News for hackers. Stuff that matters.
Re:A bug story: data alignment on x86 by acqq on Monday November 07, 2016 @11:10AM (#12892126)
Have you actually tried and verified that? Reading the docs I've had an impression that it says that the "aligned" is for the alignment inside of the structures, and you here declare the simple type?
Re:A bug story: data alignment on x86 by qb45 on Monday November 07, 2016 @02:39PM (#12894233)
I wouldn't have posted this without checking. And as far as documentation goes, they say this attribute applies to "types" and the example they give is

            struct S { short f[3]; } __attribute__ ((aligned (8)));
where it actually is used outside of a struct so that this whole 6B thing is aligned to 8B instead of the default 2B.
Re:A bug story: data alignment on x86 by acqq on Monday November 07, 2016 @03:21PM (#12894670)
Thanks! Are you able to post how the generated asm of their innermost loop looks like with SSE2 turned on? I mean the equivalent of theirs

    .L13:
         movdqa   (%r8), %xmm2
         ...
Re:A bug story: data alignment on x86 by qb45 on Monday November 07, 2016 @03:32PM (#12894751)
movdqu, obviously. And the code is shorter now, I guess it drops this part responsible for processing the first 1~3 elements of the array to reach 16B alignment.