Index: lib/Headers/Intrin.h =================================================================== --- lib/Headers/Intrin.h +++ lib/Headers/Intrin.h @@ -905,12 +905,6 @@ __asm__ ("cpuid" : "=a"(__info[0]), "=b" (__info[1]), "=c"(__info[2]), "=d"(__info[3]) : "a"(__level), "c"(__ecx)); } -static __inline__ unsigned __int64 __cdecl __DEFAULT_FN_ATTRS -_xgetbv(unsigned int __xcr_no) { - unsigned int __eax, __edx; - __asm__ ("xgetbv" : "=a" (__eax), "=d" (__edx) : "c" (__xcr_no)); - return ((unsigned __int64)__edx << 32) | __eax; -} static __inline__ void __DEFAULT_FN_ATTRS __halt(void) { __asm__ volatile ("hlt"); Index: lib/Headers/xsaveintrin.h =================================================================== --- lib/Headers/xsaveintrin.h +++ lib/Headers/xsaveintrin.h @@ -53,6 +53,15 @@ } #endif +#if defined(__i386__) || defined(__x86_64__) +static __inline__ unsigned __int64 __cdecl __DEFAULT_FN_ATTRS +_xgetbv(unsigned int __xcr_no) { + unsigned int __eax, __edx; + __asm__ ("xgetbv" : "=a" (__eax), "=d" (__edx) : "c" (__xcr_no)); + return ((unsigned __int64)__edx << 32) | __eax; +} +#endif + #undef __DEFAULT_FN_ATTRS #endif