I think this is what you want. The __GNUC_PREREQ caused a Mac/clang problem. I've tested on Mac 10.9.2, RHEL5, and RHEL6. diff --git a/instrset_detect.cpp b/instrset_detect.cpp
--- a/instrset_detect.cpp
+++ b/instrset_detect.cpp
@@ -54,7 +54,11 @@
#elif defined(__GNUC__) // use inline assembly, Gnu/AT&T syntax uint32_t a, d;
+#if __GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4
__asm("xgetbv" : "=a"(a),"=d"(d) : "c"(ctr) : );
+#else
+ __asm(".byte 0x0f, 0x01, 0xd0" : "=a"(a),"=d"(d) : "c"(ctr) : );
+#endif
return a | (uint64_t(d) << 32); |