From 7c908186ec5c09f72d92c468abda6562b3da82e0 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 14 Mar 2022 11:22:47 +0100 Subject: [PATCH] vkd3d: Only use __builtin_popcount in PE builds. It's not compatible with -mabi=ms. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52664 Signed-off-by: Alexandre Julliard --- libs/vkd3d/include/private/vkd3d_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d/include/private/vkd3d_common.h b/libs/vkd3d/include/private/vkd3d_common.h index 6e57e05c7e2..4ee8ccd4325 100644 --- a/libs/vkd3d/include/private/vkd3d_common.h +++ b/libs/vkd3d/include/private/vkd3d_common.h @@ -65,7 +65,7 @@ static inline unsigned int vkd3d_popcount(unsigned int v) { #ifdef _MSC_VER return __popcnt(v); -#elif defined(__GNUC__) && (__GNUC__ >= 4) +#elif defined(__MINGW32__) return __builtin_popcount(v); #else v -= (v >> 1) & 0x55555555;