mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
tcg: Add generic vector ops for multiplication
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
212be173f0
commit
3774030a3e
10 changed files with 111 additions and 0 deletions
|
@ -1280,6 +1280,35 @@ void tcg_gen_gvec_sub(unsigned vece, uint32_t dofs, uint32_t aofs,
|
|||
tcg_gen_gvec_3(dofs, aofs, bofs, oprsz, maxsz, &g[vece]);
|
||||
}
|
||||
|
||||
void tcg_gen_gvec_mul(unsigned vece, uint32_t dofs, uint32_t aofs,
|
||||
uint32_t bofs, uint32_t oprsz, uint32_t maxsz)
|
||||
{
|
||||
static const GVecGen3 g[4] = {
|
||||
{ .fniv = tcg_gen_mul_vec,
|
||||
.fno = gen_helper_gvec_mul8,
|
||||
.opc = INDEX_op_mul_vec,
|
||||
.vece = MO_8 },
|
||||
{ .fniv = tcg_gen_mul_vec,
|
||||
.fno = gen_helper_gvec_mul16,
|
||||
.opc = INDEX_op_mul_vec,
|
||||
.vece = MO_16 },
|
||||
{ .fni4 = tcg_gen_mul_i32,
|
||||
.fniv = tcg_gen_mul_vec,
|
||||
.fno = gen_helper_gvec_mul32,
|
||||
.opc = INDEX_op_mul_vec,
|
||||
.vece = MO_32 },
|
||||
{ .fni8 = tcg_gen_mul_i64,
|
||||
.fniv = tcg_gen_mul_vec,
|
||||
.fno = gen_helper_gvec_mul64,
|
||||
.opc = INDEX_op_mul_vec,
|
||||
.prefer_i64 = TCG_TARGET_REG_BITS == 64,
|
||||
.vece = MO_64 },
|
||||
};
|
||||
|
||||
tcg_debug_assert(vece <= MO_64);
|
||||
tcg_gen_gvec_3(dofs, aofs, bofs, oprsz, maxsz, &g[vece]);
|
||||
}
|
||||
|
||||
/* Perform a vector negation using normal negation and a mask.
|
||||
Compare gen_subv_mask above. */
|
||||
static void gen_negv_mask(TCGv_i64 d, TCGv_i64 b, TCGv_i64 m)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue