Re: [Qemu-devel] [PATCH 2/2] target/mips: Optimize ILVEV. MSA instructions

2019-03-19 Thread Richard Henderson
On 3/19/19 10:05 AM, Aleksandar Markovic wrote: > May I ask you to redo this segment of code as Richard > describe (the exact invocations of TCG functions are in > a Richard's comment to some of the previous versions of > this patch). This means redo ILVEV.W handling. Then you > can compare the

Re: [Qemu-devel] [PATCH 2/2] target/mips: Optimize ILVEV. MSA instructions

2019-03-19 Thread Aleksandar Markovic
> From: Richard Henderson > Subject: Re: [Qemu-devel] [PATCH 2/2] target/mips: Optimize ILVEV. > MSA instructions > > On 3/19/19 4:28 AM, Mateja Marjanovic wrote: > > +tcg_gen_andi_i64(t1, msa_wr_d[wt * 2], mask); > > +tcg_gen_andi_i64

Re: [Qemu-devel] [PATCH 2/2] target/mips: Optimize ILVEV. MSA instructions

2019-03-19 Thread Richard Henderson
On 3/19/19 6:55 AM, Aleksandar Markovic wrote: >> From: Mateja Marjanovic >> Subject: [PATCH 2/2] target/mips: Optimize ILVEV. MSA instructions >> >> ... >> >> +static inline void gen_ilvev_d(CPUMIPSState *env, uint32_t wd, >> + uint32_t ws, uint32_t wt) >> +{ >> +

Re: [Qemu-devel] [PATCH 2/2] target/mips: Optimize ILVEV. MSA instructions

2019-03-19 Thread Richard Henderson
On 3/19/19 4:28 AM, Mateja Marjanovic wrote: > +tcg_gen_andi_i64(t1, msa_wr_d[wt * 2], mask); > +tcg_gen_andi_i64(t0, msa_wr_d[ws * 2], mask); > +tcg_gen_shli_i64(t0, t0, 32); > +tcg_gen_or_i64(msa_wr_d[wd * 2], t1, t0); Deposit, again. r~

Re: [Qemu-devel] [PATCH 2/2] target/mips: Optimize ILVEV. MSA instructions

2019-03-19 Thread Aleksandar Markovic
> From: Mateja Marjanovic > Subject: [PATCH 2/2] target/mips: Optimize ILVEV. MSA instructions > > ... > > +static inline void gen_ilvev_d(CPUMIPSState *env, uint32_t wd, > + uint32_t ws, uint32_t wt) > +{ > +tcg_gen_mov_i64(msa_wr_d[wd * 2], msa_wr_d[wt * 2]);

[Qemu-devel] [PATCH 2/2] target/mips: Optimize ILVEV. MSA instructions

2019-03-19 Thread Mateja Marjanovic
From: Mateja Marjanovic Optimize set of MSA instructions ILVEV, using directly tcg registers and performing logic on them instead of using helpers. instr|| before|| after == ilvev.b || 126.92 ms || 26.41 ms ilvev.h || 93.67 ms || 25.79

Re: [Qemu-devel] [PATCH 2/2] target/mips: Optimize ILVEV. MSA instructions

2019-03-15 Thread Richard Henderson
On 3/15/19 5:02 AM, Mateja Marjanovic wrote: > +static inline void gen_ilvev_b(CPUMIPSState *env, uint32_t wd, > + uint32_t ws, uint32_t wt) { > +TCGv_i64 t0 = tcg_temp_new_i64(); > +TCGv_i64 t1 = tcg_temp_new_i64(); > + > +uint64_t mask = (1ULL << 8) - 1;

[Qemu-devel] [PATCH 2/2] target/mips: Optimize ILVEV. MSA instructions

2019-03-15 Thread Mateja Marjanovic
From: Mateja Marjanovic Optimize set of MSA instructions ILVEV, using directly tcg registers and performing logic on them insted of using helpers. Performance measurement is done by executing the instructions large number of times on a computer with Intel Core i7-3770 CPU @ 3.40GHz×8.