Re: [PATCH 3/6] targetc/ppc: add vmulh{su}w instructions

2020-06-19 Thread Richard Henderson
On 6/18/20 10:37 PM, Lijun Pan wrote: > Do you mean writing two functions directly, > > void helper_vmulhsw(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) > { > int i; > > for (i = 0; i < 4; i++) { > r->s32[i] = (int32_t)((int64_t)a->s32[i] * (int64_t)b->s32[i]) >> 32); > } > } >

Re: [PATCH 3/6] targetc/ppc: add vmulh{su}w instructions

2020-06-18 Thread Lijun Pan
> On Jun 18, 2020, at 6:29 PM, Richard Henderson > wrote: > > On 6/12/20 9:20 PM, Lijun Pan wrote: >> +#define VMULH_DO(name, op, element, cast_orig, cast_temp) \ >> +void helper_vmulh##name(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) >> \ >> +{

Re: [PATCH 3/6] targetc/ppc: add vmulh{su}w instructions

2020-06-18 Thread Richard Henderson
On 6/12/20 9:20 PM, Lijun Pan wrote: > +#define VMULH_DO(name, op, element, cast_orig, cast_temp)\ > +void helper_vmulh##name(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) > \ > +{ > \ > + int i;

[PATCH 3/6] targetc/ppc: add vmulh{su}w instructions

2020-06-12 Thread Lijun Pan
vmulhsw: Vector Multiply High Signed Word vmulhuw: Vector Multiply High Unsigned Word Signed-off-by: Lijun Pan --- target/ppc/helper.h | 2 ++ target/ppc/int_helper.c | 14 ++ target/ppc/translate/vmx-impl.inc.c | 6 ++ target/ppc/translate/vmx-ops.i