Created
December 8, 2015 15:47
-
-
Save crowell/160ee45a93b946c10039 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/crypto/cpu-intel.c b/crypto/cpu-intel.c | |
index 924bab0..cb48bb3 100644 | |
--- a/crypto/cpu-intel.c | |
+++ b/crypto/cpu-intel.c | |
@@ -116,7 +116,7 @@ static uint64_t OPENSSL_xgetbv(uint32_t xcr) { | |
return (uint64_t)_xgetbv(xcr); | |
#else | |
uint32_t eax, edx; | |
- __asm__ volatile ("xgetbv" : "=a"(eax), "=d"(edx) : "c"(xcr)); | |
+ __asm__ volatile (".byte 0x0f,0x01,0xd0" : "=a"(eax), "=d"(edx) : "c"(xcr)); | |
return (((uint64_t)edx) << 32) | eax; | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment