xgetbv
Using MSVC8, I'm compiling some code that was originally written for Linux. It contains a conventional 'C' function called _xgetbv which looks like this:-
Code:
static uint64_t
_xgetbv (uint32_t xcr)
{
uint32_t eax, edx;
__asm__ volatile ("xgetbv" : "=a" (eax), "=d" (edx) : "c" (xcr));
return (static_cast<uint64_t>(edx) << 32) | eax;
}
I'm guessing that the intention is either to set (or return) the value from some CPU register. However, the above syntax isn't recognised by MSVC. Does anyone know how I could convert this to something which MSVC8 understands?
"A problem well stated is a problem half solved.” - Charles F. Kettering