> On Jun 18, 2020, at 6:27 PM, Richard Henderson <richard.hender...@linaro.org> 
> wrote:
> 
> On 6/12/20 9:20 PM, Lijun Pan wrote:
>> vmulld: Vector Multiply Low Doubleword.
>> 
>> Signed-off-by: Lijun Pan <l...@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.

I did a grep in git repo, and found out only arm use this tcg_gen_gvec_mul.
The original implementation is very straightforward, and being adopted at many 
places
all over target/ppc/int_helper.c. Why do we need to convert
to tcg_gen_gvec_mul, which seems to me very convoluted?

Thanks,
Lijun

Reply via email to