qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] target/mips: Optimize ILVEV.<B|H|W|D> MSA i


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 2/2] target/mips: Optimize ILVEV.<B|H|W|D> MSA instructions
Date: Tue, 19 Mar 2019 09:42:04 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 3/19/19 6:55 AM, Aleksandar Markovic wrote:
>> From: Mateja Marjanovic <address@hidden>
>> 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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]