aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2019-04-30 13:01:12 -0700
committerRichard Henderson <richard.henderson@linaro.org>2019-05-22 15:09:43 -0400
commitf75da2988eb2457fa23d006d573220c5c680ec4e (patch)
treeb6192d1d40e1627a67a6dfc6f205ea5dfb1edd81 /tcg/tcg.c
parent38dc12947ec9106237f9cdbd428792c985cd86ae (diff)
downloadqemu-f75da2988eb2457fa23d006d573220c5c680ec4e.zip
qemu-f75da2988eb2457fa23d006d573220c5c680ec4e.tar.gz
qemu-f75da2988eb2457fa23d006d573220c5c680ec4e.tar.bz2
tcg: Add support for vector compare select
Perform a per-element conditional move. This combination operation is easier to implement on some host vector units than plain cmp+bitsel. Omit the usual gvec interface, as this is intended to be used by target-specific gvec expansion call-backs. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/tcg.c')
-rw-r--r--tcg/tcg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 5d947db..02a2680 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1648,6 +1648,8 @@ bool tcg_op_supported(TCGOpcode op)
return have_vec && TCG_TARGET_HAS_minmax_vec;
case INDEX_op_bitsel_vec:
return have_vec && TCG_TARGET_HAS_bitsel_vec;
+ case INDEX_op_cmpsel_vec:
+ return have_vec && TCG_TARGET_HAS_cmpsel_vec;
default:
tcg_debug_assert(op > INDEX_op_last_generic && op < NB_OPS);
@@ -2028,6 +2030,7 @@ static void tcg_dump_ops(TCGContext *s, bool have_prefs)
case INDEX_op_setcond_i64:
case INDEX_op_movcond_i64:
case INDEX_op_cmp_vec:
+ case INDEX_op_cmpsel_vec:
if (op->args[k] < ARRAY_SIZE(cond_name)
&& cond_name[op->args[k]]) {
col += qemu_log(",%s", cond_name[op->args[k++]]);