shithub: dumb

Download patch

ref: 094cfcc27187a209a5b457b15276d618fea08658
parent: 2c9ca950a32cd2de05ed8ae384ad08248793fecd
author: Chris Moeller <kode54@gmail.com>
date: Sun Nov 10 17:35:24 EST 2013

Made the inline assembly cpuid function specific to GCC/Clang like it should have been in the first place.

--- a/dumb/src/it/itrender.c
+++ b/dumb/src/it/itrender.c
@@ -792,7 +792,7 @@
 
 #ifdef _MSC_VER
 #include <intrin.h>
-#else
+#elif defined(__clang__) || defined(__GNUC__)
 static inline void
 __cpuid(int *data, int selector)
 {
@@ -803,6 +803,8 @@
         "=d" (data[3])
         : "a"(selector));
 }
+#else
+#define __cpuid(a,b) memset((a), 0, sizeof(int) * 4)
 #endif
 
 static int query_cpu_feature_sse() {