5 union alignas(16) xmm_t
{
11 constexpr xmm_t xmm_fill
= {
28 "movaps %2, %%xmm0\n\t"
29 "movaps %2, %%xmm1\n\t"
30 "movaps %2, %%xmm2\n\t"
31 "movaps %2, %%xmm3\n\t"
32 "movaps %2, %%xmm4\n\t"
33 "movaps %2, %%xmm5\n\t"
34 "movaps %2, %%xmm6\n\t"
35 "movaps %2, %%xmm7\n\t"
39 "movq %%mm0, 0x00(%0)\n\t"
40 "movq %%mm1, 0x08(%0)\n\t"
41 "movq %%mm2, 0x10(%0)\n\t"
42 "movq %%mm3, 0x18(%0)\n\t"
43 "movq %%mm4, 0x20(%0)\n\t"
44 "movq %%mm5, 0x28(%0)\n\t"
45 "movq %%mm6, 0x30(%0)\n\t"
46 "movq %%mm7, 0x38(%0)\n\t"
48 "movaps %%xmm0, 0x00(%1)\n\t"
49 "movaps %%xmm1, 0x10(%1)\n\t"
50 "movaps %%xmm2, 0x20(%1)\n\t"
51 "movaps %%xmm3, 0x30(%1)\n\t"
52 "movaps %%xmm4, 0x40(%1)\n\t"
53 "movaps %%xmm5, 0x50(%1)\n\t"
54 "movaps %%xmm6, 0x60(%1)\n\t"
55 "movaps %%xmm7, 0x70(%1)\n\t"
57 : "a"(mm
), "b"(xmm
), "m"(xmm_fill
)
58 : "%mm0", "%mm1", "%mm2", "%mm3", "%mm4", "%mm5", "%mm6", "%mm7", "%xmm0",
59 "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7"
62 for (int i
= 0; i
< 8; ++i
)
63 printf("mm%d = 0x%016" PRIx64
"\n", i
, mm
[i
]);
64 for (int i
= 0; i
< 8; ++i
) {
65 printf("xmm%d = { ", i
);
66 for (int j
= 0; j
< sizeof(xmm
->as_uint8
); ++j
)
67 printf("0x%02x ", xmm
[i
].as_uint8
[j
]);