Re: [PATCH] target/riscv: fix vssub.vv saturation bug

2021-04-19 Thread Alistair Francis
On Mon, Apr 19, 2021 at 4:31 PM Frank Chang <0xc0de0...@gmail.com> wrote: > > Alistair Francis 於 2021年4月19日 週一 下午2:28寫道: >> >> On Mon, Apr 19, 2021 at 4:02 PM wrote: >> > >> > From: Frank Chang >> > >> > Doing a negate (0x0 – 0x8000) using vssub.vv produces >> > an incorrect result of

Re: [PATCH] target/riscv: fix vssub.vv saturation bug

2021-04-19 Thread Frank Chang
Alistair Francis 於 2021年4月19日 週一 下午2:28寫道: > On Mon, Apr 19, 2021 at 4:02 PM wrote: > > > > From: Frank Chang > > > > Doing a negate (0x0 – 0x8000) using vssub.vv produces > > an incorrect result of 0x8000 (should saturate to 0x7fff) > > > > Fix this bug by treating zero as a

Re: [PATCH] target/riscv: fix vssub.vv saturation bug

2021-04-19 Thread Alistair Francis
On Mon, Apr 19, 2021 at 4:02 PM wrote: > > From: Frank Chang > > Doing a negate (0x0 – 0x8000) using vssub.vv produces > an incorrect result of 0x8000 (should saturate to 0x7fff) > > Fix this bug by treating zero as a positive number. > > Signed-off-by: Frank Chang Thanks for the

[PATCH] target/riscv: fix vssub.vv saturation bug

2021-04-19 Thread frank . chang
From: Frank Chang Doing a negate (0x0 – 0x8000) using vssub.vv produces an incorrect result of 0x8000 (should saturate to 0x7fff) Fix this bug by treating zero as a positive number. Signed-off-by: Frank Chang --- target/riscv/vector_helper.c | 8 1 file changed, 4