Alexandre Julliard : wined3d: Only use __builtin_popcount in PE builds.

Alexandre Julliard julliard at winehq.org
Mon Mar 14 17:47:35 CDT 2022


Module: wine
Branch: master
Commit: a3e9ed6fc8a84b4b1e9ed19af617b73fc3c3650e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=a3e9ed6fc8a84b4b1e9ed19af617b73fc3c3650e

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Mar 14 11:22:40 2022 +0100

wined3d: Only use __builtin_popcount in PE builds.

It's not compatible with -mabi=ms.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/wined3d_private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index bc3b9699fa6..577377f8dd4 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -405,7 +405,7 @@ static inline float float_24_to_32(DWORD in)
 
 static inline unsigned int wined3d_popcount(unsigned int x)
 {
-#if defined(__GNUC__) && (__GNUC__ >= 4)
+#if defined(__MINGW32__)
     return __builtin_popcount(x);
 #else
     x -= x >> 1 & 0x55555555;




More information about the wine-cvs mailing list