X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fx86_cpu_features.c;h=5e434f9f0b18cfcb36ca9559baed4d671d0ec1c7;hp=aab200ffe5f2bb9b682592f8c4dee461234c2dbd;hb=56c8b5eaacef8a5563261b9034a8a011480bba6e;hpb=719a063c87e3abab99b0fb53ebc80223fbf33123;ds=sidebyside diff --git a/src/x86_cpu_features.c b/src/x86_cpu_features.c index aab200ff..5e434f9f 100644 --- a/src/x86_cpu_features.c +++ b/src/x86_cpu_features.c @@ -47,7 +47,9 @@ read_xcr(u32 index) { u32 edx, eax; - __asm__ ("xgetbv" : "=d" (edx), "=a" (eax) : "c" (index)); + /* Execute the "xgetbv" instruction. Old versions of binutils do not + * recognize this instruction, so list the raw bytes instead. */ + __asm__ (".byte 0x0f, 0x01, 0xd0" : "=d" (edx), "=a" (eax) : "c" (index)); return ((u64)edx << 32) | eax; }