Re: [PATCH v2] target/riscv: fix ctzw behavior

2023-02-05 Thread Alistair Francis
On Sat, Feb 4, 2023 at 6:25 PM Vladimir Isaev wrote: > > According to spec, ctzw should work with 32-bit register, not 64. > > For example, previous implementation returns 33 for (1<<33) input > when the new one returns 32. > > Signed-off-by: Vladimir Isaev > Suggested-by: Richard Henderson Tha

Re: [PATCH v2] target/riscv: fix ctzw behavior

2023-02-05 Thread Alistair Francis
On Sat, Feb 4, 2023 at 6:25 PM Vladimir Isaev wrote: > > According to spec, ctzw should work with 32-bit register, not 64. > > For example, previous implementation returns 33 for (1<<33) input > when the new one returns 32. > > Signed-off-by: Vladimir Isaev > Suggested-by: Richard Henderson Rev

[PATCH v2] target/riscv: fix ctzw behavior

2023-02-04 Thread Vladimir Isaev
According to spec, ctzw should work with 32-bit register, not 64. For example, previous implementation returns 33 for (1<<33) input when the new one returns 32. Signed-off-by: Vladimir Isaev Suggested-by: Richard Henderson --- v2: - Use simpler solution suggested by Richard Henderson --- ta