Re: [PATCH 5/5] target/loongarch: div if x/0 set dividend to 0

2022-09-19 Thread Qi Hu
On 2022/9/19 19:45, gaosong wrote: 在 2022/9/17 下午6:12, Richard Henderson 写道: On 9/17/22 11:12, gaosong wrote: 在 2022/9/17 下午4:59, Qi Hu 写道: On 2022/9/17 15:59, Song Gao wrote: div.d, div.du, div,w, div.wu, the LoongArch host if x/0  the result is 0. The message has a typo: "div,w" => "

Re: [PATCH 5/5] target/loongarch: div if x/0 set dividend to 0

2022-09-19 Thread gaosong
在 2022/9/17 下午6:12, Richard Henderson 写道: On 9/17/22 11:12, gaosong wrote: 在 2022/9/17 下午4:59, Qi Hu 写道: On 2022/9/17 15:59, Song Gao wrote: div.d, div.du, div,w, div.wu, the LoongArch host if x/0  the result is 0. The message has a typo: "div,w" => "div.w" Also I don't know why we need

Re: [PATCH 5/5] target/loongarch: div if x/0 set dividend to 0

2022-09-17 Thread Richard Henderson
On 9/17/22 11:12, gaosong wrote: 在 2022/9/17 下午4:59, Qi Hu 写道: On 2022/9/17 15:59, Song Gao wrote: div.d, div.du, div,w, div.wu, the LoongArch host if x/0  the result is 0. The message has a typo: "div,w" => "div.w" Also I don't know why we need to do this, since the manual say: "When the

Re: [PATCH 5/5] target/loongarch: div if x/0 set dividend to 0

2022-09-17 Thread gaosong
在 2022/9/17 下午4:59, Qi Hu 写道: On 2022/9/17 15:59, Song Gao wrote: div.d, div.du, div,w, div.wu, the LoongArch host if x/0  the result is 0. The message has a typo: "div,w" => "div.w" Also I don't know why we need to do this, since the manual say: "When the divisor is 0, the result can be

Re: [PATCH 5/5] target/loongarch: div if x/0 set dividend to 0

2022-09-17 Thread Qi Hu
On 2022/9/17 15:59, Song Gao wrote: div.d, div.du, div,w, div.wu, the LoongArch host if x/0 the result is 0. The message has a typo: "div,w" => "div.w" Also I don't know why we need to do this, since the manual say: "When the divisor is 0, the result can be any value". So we set the div

[PATCH 5/5] target/loongarch: div if x/0 set dividend to 0

2022-09-17 Thread Song Gao
div.d, div.du, div,w, div.wu, the LoongArch host if x/0 the result is 0. So we set the divisor to 1 and the dividend to 0. Signed-off-by: Song Gao --- target/loongarch/insn_trans/trans_arith.c.inc | 34 +++ 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/target/lo