summaryrefslogtreecommitdiffstats
path: root/target/ppc
diff options
context:
space:
mode:
authorRichard Henderson2019-03-17 01:27:29 +0100
committerRichard Henderson2019-05-13 23:44:03 +0200
commit53229a7703eeb2bbe101a19a33ef22aaf960c65b (patch)
tree9537c1a62ddef09de2d814ee03ffeba3fd06ac13 /target/ppc
parenttcg: Allow add_vec, sub_vec, neg_vec, not_vec to be expanded (diff)
downloadqemu-53229a7703eeb2bbe101a19a33ef22aaf960c65b.tar.gz
qemu-53229a7703eeb2bbe101a19a33ef22aaf960c65b.tar.xz
qemu-53229a7703eeb2bbe101a19a33ef22aaf960c65b.zip
tcg: Specify optional vector requirements with a list
Replace the single opcode in .opc with a null-terminated array in .opt_opc. We still require that all opcodes be used with the same .vece. Validate the contents of this list with CONFIG_DEBUG_TCG. All tcg_gen_*_vec functions will check any list active during .fniv expansion. Swap the active list in and out as we expand other opcodes, or take control away from the front-end function. Convert all existing vector aware front ends. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/ppc')
-rw-r--r--target/ppc/translate/vmx-impl.inc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/target/ppc/translate/vmx-impl.inc.c b/target/ppc/translate/vmx-impl.inc.c
index bd3ff40e68..6861f4c5b9 100644
--- a/target/ppc/translate/vmx-impl.inc.c
+++ b/target/ppc/translate/vmx-impl.inc.c
@@ -566,10 +566,15 @@ static void glue(glue(gen_, NAME), _vec)(unsigned vece, TCGv_vec t, \
} \
static void glue(gen_, NAME)(DisasContext *ctx) \
{ \
+ static const TCGOpcode vecop_list[] = { \
+ glue(glue(INDEX_op_, NORM), _vec), \
+ glue(glue(INDEX_op_, SAT), _vec), \
+ INDEX_op_cmp_vec, 0 \
+ }; \
static const GVecGen4 g = { \
.fniv = glue(glue(gen_, NAME), _vec), \
.fno = glue(gen_helper_, NAME), \
- .opc = glue(glue(INDEX_op_, SAT), _vec), \
+ .opt_opc = vecop_list, \
.write_aofs = true, \
.vece = VECE, \
}; \