Révision | e65a5f227d77a5dbae7a7123c3ee915ee4bd80cf (tree) |
---|---|
l'heure | 2018-07-20 01:07:31 |
Auteur | Alex Bennée <alex.bennee@lina...> |
Commiter | Richard Henderson |
tcg/aarch64: limit mul_vec size
In AdvSIMD we can only do 32x32 integer multiples although SVE is
capable of larger 64 bit multiples. As a result we can end up
generating invalid opcodes. Fix this by only reprting we can emit
mul vector ops if the size is small enough.
Fixes a crash on:
When running on AArch64 hardware.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20180719154248.29669-1-alex.bennee@linaro.org>
[rth: Removed the tcg_debug_assert -- there are plenty of other
cases that we do not diagnose within the insn encoding helpers.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
@@ -2219,7 +2219,6 @@ int tcg_can_emit_vec_op(TCGOpcode opc, TCGType type, unsigned vece) | ||
2219 | 2219 | switch (opc) { |
2220 | 2220 | case INDEX_op_add_vec: |
2221 | 2221 | case INDEX_op_sub_vec: |
2222 | - case INDEX_op_mul_vec: | |
2223 | 2222 | case INDEX_op_and_vec: |
2224 | 2223 | case INDEX_op_or_vec: |
2225 | 2224 | case INDEX_op_xor_vec: |
@@ -2232,6 +2231,8 @@ int tcg_can_emit_vec_op(TCGOpcode opc, TCGType type, unsigned vece) | ||
2232 | 2231 | case INDEX_op_shri_vec: |
2233 | 2232 | case INDEX_op_sari_vec: |
2234 | 2233 | return 1; |
2234 | + case INDEX_op_mul_vec: | |
2235 | + return vece < MO_64; | |
2235 | 2236 | |
2236 | 2237 | default: |
2237 | 2238 | return 0; |