Patchwork tcg/i386: Workaround for clang not defining bit_CMOV

login
register
mail settings
Submitter Juergen Lock
Date April 26, 2013, 7:11 p.m.
Message ID <20130426191141.GA81647@triton8.kn-bremen.de>
Download mbox | patch
Permalink /patch/240019/
State New
Headers show

Comments

Juergen Lock - April 26, 2013, 7:11 p.m.
This fixes the build with clang on 32 bit x86.

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>

Patch

--- a/tcg/i386/tcg-target.c
+++ b/tcg/i386/tcg-target.c
@@ -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