On 3/19/19 6:55 AM, Aleksandar Markovic wrote: >> From: Mateja Marjanovic <mateja.marjano...@rt-rk.com> >> Subject: [PATCH 2/2] target/mips: Optimize ILVEV.<B|H|W|D> 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]); >> + tcg_gen_mov_i64(msa_wr_d[wd * 2 + 1], msa_wr_d[ws * 2]); >> +} >> + > > This code segment introduces a bug when wd == ws.
Note that the fix is to swap the two lines, since x * 2 cannot equal y * 2 + 1. r~