Jacek Caban (@jacek) commented about programs/wineboot/wineboot.c:
__cpuidex(regs, 0xd, 0); TRACE("XSAVE details %#x, %#x, %#x, %#x.\n", regs[0], regs[1], regs[2], regs[3]);
- if (!(regs[0] & XSTATE_AVX))
- supported_mask = ((ULONG64)regs[3] << 32) | regs[0];
- __asm__ volatile
- (
"xorl %%ecx,%%ecx\n\t"
"xgetbv\n\t"
"movl %%eax,%0\n\t"
"movl %%edx,%1\n\t"
: "=m"(regs[0]), "=m"(regs[1]) : : "eax", "ecx", "edx"
- );
Similar to ntdll, we could avoid inline assembly here. For PE parts, we'd ideally provide it by `intrin.h`, but a local implementation would do too, I think.