diff options
author | Jerome Gaillard <jgaillard@google.com> | 2020-01-24 18:13:17 +0000 |
---|---|---|
committer | Jerome Gaillard <jgaillard@google.com> | 2020-01-24 18:15:50 +0000 |
commit | 2af72ff158fb741682fee62fa6402ac50e74dd91 (patch) | |
tree | 94c92bf1ab7740126000b79f588165e10d128315 | |
parent | e8e2fdeb555423ea3db60c756499405afd82de22 (diff) | |
download | mingw-2af72ff158fb741682fee62fa6402ac50e74dd91.tar.gz |
headers: Avoid builtin clash with _xgetbv in Clang 9
Clang 9 adds _xgetbv for non-msvc targets, by adding a builtin
named __builtin_ia32_xgetbv and a define in a header redirecting
_xgetbv to __builtin_ia32_xgetbv. The define redirection breaks
the intrin-impl.h code already on the prototype.
Signed-off-by: Martin Storsjö <martin@...>
Upstream URL:
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/8b2c7826b8d68e2ffc79c286b8792efe4168f666/
Change-Id: I6d16ba5f5bb9963ae1bb5b1f1eba87cedb372787
-rw-r--r-- | mingw-w64-v6.x/mingw-w64-headers/include/psdk_inc/intrin-impl.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mingw-w64-v6.x/mingw-w64-headers/include/psdk_inc/intrin-impl.h b/mingw-w64-v6.x/mingw-w64-headers/include/psdk_inc/intrin-impl.h index 4c6d8fd..072a98f 100644 --- a/mingw-w64-v6.x/mingw-w64-headers/include/psdk_inc/intrin-impl.h +++ b/mingw-w64-v6.x/mingw-w64-headers/include/psdk_inc/intrin-impl.h @@ -1938,7 +1938,9 @@ __buildmov(__movsd, unsigned __LONG32, "d") #define __INTRINSIC_DEFINED___movsd #endif /* __INTRINSIC_PROLOG */ -#if !defined(__GNUC__) || __GNUC__ < 8 /* GCC 8 has already defined _xgetbv */ +/* GCC 8 has already defined _xgetbv, Clang 9 has _xgetbv defined as a macro + * redirecting to the __builtin_ia32_xgetbv builtin. */ +#if (!defined(__GNUC__) || __GNUC__ < 8) && !defined(_xgetbv) /* NOTE: This should be in immintrin.h */ #if __INTRINSIC_PROLOG(_xgetbv) unsigned __int64 _xgetbv(unsigned int); |