Skip to contentSkip to conversation

tcg/i386: Workaround for clang not defining bit_CMOV

Qemu-devel New Juergen Lock 1 participant 2 messages Apr 26, 2013

lore
Share & tools
lore
#0 lore raw

This fixes the build with clang on 32 bit x86.

tcg/i386/tcg-target.c +4 -0
@@ -104,6 +104,10 @@ static const int tcg_target_call_oarg_re
 # define have_cmov 1
 #elif defined(CONFIG_CPUID_H)
 #include <cpuid.h>
+#ifndef bit_CMOV
+/* clang's <cpuid.h> doesn't define bit_* */
+#define bit_CMOV	(1 << 15)
+#endif
 static bool have_cmov;
 #else
 # define have_cmov 0
#1 lore raw

PATCH 1/1 tcg/i386: Workaround for clang not defining bit_CMOV

I guess I should have put [PATCH] in the Subject, sorry.

On Fri, Apr 26, 2013 at 09:11:41PM +0200, Juergen Lock wrote:

This fixes the build with clang on 32 bit x86.

tcg/i386/tcg-target.c +4 -0
@@ -104,6 +104,10 @@ static const int tcg_target_call_oarg_re
 # define have_cmov 1
 #elif defined(CONFIG_CPUID_H)
 #include <cpuid.h>
+#ifndef bit_CMOV
+/* clang's <cpuid.h> doesn't define bit_* */
+#define bit_CMOV	(1 << 15)
+#endif
 static bool have_cmov;
 #else
 # define have_cmov 0