6 constexpr uint32_t fill
= 0x0F0F0F0F;
8 uint32_t eax
, ebx
, ecx
, edx
, esi
, edi
;
9 // need to use 64-bit types due to bug in clang
10 // https://bugs.llvm.org/show_bug.cgi?id=41748
15 "movd %%esp, %%mm0\n\t"
16 "movd %%ebp, %%mm1\n\t"
29 // copy new values of esp & ebp
32 // restore saved esp & ebp
33 "movd %%mm0, %%esp\n\t"
34 "movd %%mm1, %%ebp\n\t"
35 : "=a"(eax
), "=b"(ebx
), "=c"(ecx
), "=d"(edx
), "=y"(esp
), "=y"(ebp
),
41 printf("eax = 0x%08" PRIx32
"\n", eax
);
42 printf("ebx = 0x%08" PRIx32
"\n", ebx
);
43 printf("ecx = 0x%08" PRIx32
"\n", ecx
);
44 printf("edx = 0x%08" PRIx32
"\n", edx
);
45 printf("esp = 0x%08" PRIx32
"\n", static_cast<uint32_t>(esp
));
46 printf("ebp = 0x%08" PRIx32
"\n", static_cast<uint32_t>(ebp
));
47 printf("esi = 0x%08" PRIx32
"\n", esi
);
48 printf("edi = 0x%08" PRIx32
"\n", edi
);