Giovanni Mascellani (@giomasce) commented about libs/vkd3d-common/memory.c:
return true;
}
+#ifdef __x86_64__ +static void do_cpuid(unsigned int ax, unsigned int cx, unsigned int *p)
I don't think you can do that: either you declare the function with attribute `naked` (see https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html) and use a basic ASM block, so that you're in charge to interpret calling conventions and ABI in general, or you don't declare the function `naked` and use an extended ASM block with the usual input, output and clobber register declarations.
Between the two, I think that in general using the extended ASM block is better, because it allows the compiler to inline the function call and allocate registers optimally. Not that it should matter that much, in this specific case.
Another minor thing: I would use `uint32_t` instead of `unsigned int`, given that we're talking very low level with a fixed bit width,