summaryrefslogtreecommitdiffstats
path: root/tcg/i386/tcg-target.h
diff options
context:
space:
mode:
authorRichard Henderson2016-11-22 14:15:04 +0100
committerRichard Henderson2017-01-10 17:49:59 +0100
commit993508e43e6d180e9ba9b747a9657eac69aec5bb (patch)
tree804431c5dd9d15743e248ff84ff03cb854817027 /tcg/i386/tcg-target.h
parenttcg/ppc: Handle ctpop opcode (diff)
downloadqemu-993508e43e6d180e9ba9b747a9657eac69aec5bb.tar.gz
qemu-993508e43e6d180e9ba9b747a9657eac69aec5bb.tar.xz
qemu-993508e43e6d180e9ba9b747a9657eac69aec5bb.zip
tcg/i386: Handle ctpop opcode
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg/i386/tcg-target.h')
-rw-r--r--tcg/i386/tcg-target.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h
index b8f73f5382..21d96ec35c 100644
--- a/tcg/i386/tcg-target.h
+++ b/tcg/i386/tcg-target.h
@@ -76,6 +76,7 @@ typedef enum {
#endif
extern bool have_bmi1;
+extern bool have_popcnt;
/* optional instructions */
#define TCG_TARGET_HAS_div2_i32 1
@@ -95,7 +96,7 @@ extern bool have_bmi1;
#define TCG_TARGET_HAS_nor_i32 0
#define TCG_TARGET_HAS_clz_i32 1
#define TCG_TARGET_HAS_ctz_i32 1
-#define TCG_TARGET_HAS_ctpop_i32 0
+#define TCG_TARGET_HAS_ctpop_i32 have_popcnt
#define TCG_TARGET_HAS_deposit_i32 1
#define TCG_TARGET_HAS_extract_i32 1
#define TCG_TARGET_HAS_sextract_i32 1
@@ -130,7 +131,7 @@ extern bool have_bmi1;
#define TCG_TARGET_HAS_nor_i64 0
#define TCG_TARGET_HAS_clz_i64 1
#define TCG_TARGET_HAS_ctz_i64 1
-#define TCG_TARGET_HAS_ctpop_i64 0
+#define TCG_TARGET_HAS_ctpop_i64 have_popcnt
#define TCG_TARGET_HAS_deposit_i64 1
#define TCG_TARGET_HAS_extract_i64 1
#define TCG_TARGET_HAS_sextract_i64 0