aboutsummaryrefslogtreecommitdiff
path: root/tcg/i386/tcg-target.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2012-09-21 10:13:36 -0700
committerAurelien Jarno <aurelien@aurel32.net>2012-09-21 19:53:17 +0200
commitd0a16297c97ecf6be259a9a98af7a2dac9230939 (patch)
tree225b5405f8e802beca1a71495cc82de63baab9c2 /tcg/i386/tcg-target.h
parent57e289de7330a97ff4c9919a1dad54ca0650cfa7 (diff)
tcg-i386: Implement movcond
Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg/i386/tcg-target.h')
-rw-r--r--tcg/i386/tcg-target.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h
index 504f9534ce..b356d76312 100644
--- a/tcg/i386/tcg-target.h
+++ b/tcg/i386/tcg-target.h
@@ -86,7 +86,12 @@ typedef enum {
#define TCG_TARGET_HAS_nand_i32 0
#define TCG_TARGET_HAS_nor_i32 0
#define TCG_TARGET_HAS_deposit_i32 1
+#if defined(__x86_64__) || defined(__i686__)
+/* Use cmov only if the compiler is already doing so. */
+#define TCG_TARGET_HAS_movcond_i32 1
+#else
#define TCG_TARGET_HAS_movcond_i32 0
+#endif
#if TCG_TARGET_REG_BITS == 64
#define TCG_TARGET_HAS_div2_i64 1
@@ -108,7 +113,7 @@ typedef enum {
#define TCG_TARGET_HAS_nand_i64 0
#define TCG_TARGET_HAS_nor_i64 0
#define TCG_TARGET_HAS_deposit_i64 1
-#define TCG_TARGET_HAS_movcond_i64 0
+#define TCG_TARGET_HAS_movcond_i64 1
#endif
#define TCG_TARGET_deposit_i32_valid(ofs, len) \