aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2017-11-17 14:35:11 +0100
committerRichard Henderson <richard.henderson@linaro.org>2018-02-08 15:54:05 +0000
commitd0ec97967f940bbc11dced83422b39c224127f1e (patch)
treec06220facb6dad9bf2b97c36f8a24dd15489096a /tcg/tcg.c
parentdb432672dc50ed86dda17ac821b7eb07411a90af (diff)
downloadqemu-d0ec97967f940bbc11dced83422b39c224127f1e.zip
qemu-d0ec97967f940bbc11dced83422b39c224127f1e.tar.gz
qemu-d0ec97967f940bbc11dced83422b39c224127f1e.tar.bz2
tcg: Add generic vector ops for constant shifts
Opcodes are added for scalar and vector shifts, but considering the varied semantics of these do not expose them to the front ends. Do go ahead and provide them in case they are needed for backend expansion. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/tcg.c')
-rw-r--r--tcg/tcg.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 0862cff..47fb73e 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1402,6 +1402,18 @@ bool tcg_op_supported(TCGOpcode op)
return have_vec && TCG_TARGET_HAS_andc_vec;
case INDEX_op_orc_vec:
return have_vec && TCG_TARGET_HAS_orc_vec;
+ case INDEX_op_shli_vec:
+ case INDEX_op_shri_vec:
+ case INDEX_op_sari_vec:
+ return have_vec && TCG_TARGET_HAS_shi_vec;
+ case INDEX_op_shls_vec:
+ case INDEX_op_shrs_vec:
+ case INDEX_op_sars_vec:
+ return have_vec && TCG_TARGET_HAS_shs_vec;
+ case INDEX_op_shlv_vec:
+ case INDEX_op_shrv_vec:
+ case INDEX_op_sarv_vec:
+ return have_vec && TCG_TARGET_HAS_shv_vec;
default:
tcg_debug_assert(op > INDEX_op_last_generic && op < NB_OPS);