[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/6] target/ppc: add vmulld instruction
From: |
Richard Henderson |
Subject: |
Re: [PATCH 2/6] target/ppc: add vmulld instruction |
Date: |
Thu, 18 Jun 2020 16:27:06 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
On 6/12/20 9:20 PM, Lijun Pan wrote:
> vmulld: Vector Multiply Low Doubleword.
>
> Signed-off-by: Lijun Pan <ljp@linux.ibm.com>
> ---
> target/ppc/helper.h | 1 +
> target/ppc/int_helper.c | 1 +
> target/ppc/translate/vmx-impl.inc.c | 1 +
> target/ppc/translate/vmx-ops.inc.c | 1 +
> 4 files changed, 4 insertions(+)
>
> diff --git a/target/ppc/helper.h b/target/ppc/helper.h
> index 2dfa1c6942..c3f087ccb3 100644
> --- a/target/ppc/helper.h
> +++ b/target/ppc/helper.h
> @@ -185,6 +185,7 @@ DEF_HELPER_3(vmuloub, void, avr, avr, avr)
> DEF_HELPER_3(vmulouh, void, avr, avr, avr)
> DEF_HELPER_3(vmulouw, void, avr, avr, avr)
> DEF_HELPER_3(vmuluwm, void, avr, avr, avr)
> +DEF_HELPER_3(vmulld, void, avr, avr, avr)
> DEF_HELPER_3(vslo, void, avr, avr, avr)
> DEF_HELPER_3(vsro, void, avr, avr, avr)
> DEF_HELPER_3(vsrv, void, avr, avr, avr)
> diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c
> index be53cd6f68..afbcdd05b4 100644
> --- a/target/ppc/int_helper.c
> +++ b/target/ppc/int_helper.c
> @@ -533,6 +533,7 @@ void helper_vprtybq(ppc_avr_t *r, ppc_avr_t *b)
> } \
> }
> VARITH_DO(muluwm, *, u32)
> +VARITH_DO(mulld, *, s64)
>From this implementation, I would say that both vmuluwm and vmulld can be
implemented with tcg_gen_gvec_mul().
I guess vmuluwm was missed when many of the other vmx operations were converted
to gvec.
Please first convert vmuluwm to tcg_gen_gvec_mul, then implement vmulld in the
same manner.
r~