commit c161ce3f7c424274269bda0bf054a04540bc26cf (tree)
parent 23f339f1b4686ee9c6d81e25d884bb407530dbcc
Author: Andrew Kelley <andrew@ziglang.org>
Date: Sun, 22 Sep 2019 19:05:17 -0400
mingw-w64 libc: fix incorrect detection of _xgetbv
It was using __GNUC__ < 8 to check if _xgetbv intrinsic is available.
Since we always use zig cc with this header, we know we have clang 9,
which does have this intrinsic.
Diffstat:
1 file changed, 0 insertions(+), 26 deletions(-)
diff --git a/lib/libc/include/any-windows-any/psdk_inc/intrin-impl.h b/lib/libc/include/any-windows-any/psdk_inc/intrin-impl.h
@@ -1938,32 +1938,6 @@ __buildmov(__movsd, unsigned __LONG32, "d")
#define __INTRINSIC_DEFINED___movsd
#endif /* __INTRINSIC_PROLOG */
-#if !defined(__GNUC__) || __GNUC__ < 8 /* GCC 8 has already defined _xgetbv */
-/* NOTE: This should be in immintrin.h */
-#if __INTRINSIC_PROLOG(_xgetbv)
-unsigned __int64 _xgetbv(unsigned int);
-#if !__has_builtin(_xgetbv)
-__INTRINSICS_USEINLINE
-unsigned __int64 _xgetbv(unsigned int index)
-{
-#if defined(__x86_64__) || defined(_AMD64_)
- unsigned __int64 val1, val2;
-#else
- unsigned __LONG32 val1, val2;
-#endif /* defined(__x86_64__) || defined(_AMD64_) */
-
- __asm__ __volatile__(
- "xgetbv"
- : "=a" (val1), "=d" (val2)
- : "c" (index));
-
- return (((unsigned __int64)val2) << 32) | val1;
-}
-#endif
-#define __INTRINSIC_DEFINED__xgetbv
-#endif /* __INTRINSIC_PROLOG */
-#endif /* __GNUC__ < 8 */
-
#endif /* defined(__x86_64__) || defined(_AMD64_) || defined(__i386__) || defined(_X86_) */
/* ***************************************************** */