Stephen R. van den Berg wrote:
Martin Nilsson (Coppermist) @ Pike (-) developers forum wrote:
What is B16_T defined to?
On both gcc-6 and gcc-7 B16_T expands to __int128. Case in point:
case 16: { __int128 *from=(__int128 *) memory; __int128 *to=(__int128 *) tmp; for(e=0;e<nitems;e++) to[e]=from[order[e]]; break; }
The plot thickens. If I disable __int128, and let it go for struct b16_t_s { B8_T x,y; }; instead, everything stays the same, except the following code changes in reorder():
--- pike_memory7int128.s 2018-02-01 16:29:58.093322706 +0100 +++ pike_memory7struct.s 2018-02-01 16:30:15.302896717 +0100 @@ -64,8 +64,8 @@ addq $16, %rax addq $4, %r15 salq $4, %rdx - movdqa 0(%r13,%rdx), %xmm0 - movaps %xmm0, -16(%rax) + movdqu 0(%r13,%rdx), %xmm0 + movups %xmm0, -16(%rax) .LVL175: cmpq %rcx, %rax jne .L172
But this time, everything works (gcc-7 -O2, both cases).