Re: [PATCH] target/riscv: Fix orc.b implementation

2021-10-14 Thread Alistair Francis
On Thu, Oct 14, 2021 at 4:43 AM Philipp Tomsich wrote: > > The earlier implementation fell into a corner case for bytes that were > 0x01, giving a wrong result (but not affecting our application test > cases for strings, as an ASCII value 0x01 is rare in those...). > > This changes the algorithm t

Re: [PATCH] target/riscv: Fix orc.b implementation

2021-10-13 Thread Richard Henderson
On 10/13/21 11:41 AM, Philipp Tomsich wrote: The earlier implementation fell into a corner case for bytes that were 0x01, giving a wrong result (but not affecting our application test cases for strings, as an ASCII value 0x01 is rare in those...). This changes the algorithm to: 1. Mask out the

Re: [PATCH] target/riscv: Fix orc.b implementation

2021-10-13 Thread Vincent Palatin
On Wed, Oct 13, 2021 at 8:41 PM Philipp Tomsich wrote: > > The earlier implementation fell into a corner case for bytes that were > 0x01, giving a wrong result (but not affecting our application test > cases for strings, as an ASCII value 0x01 is rare in those...). > > This changes the algorithm t

[PATCH] target/riscv: Fix orc.b implementation

2021-10-13 Thread Philipp Tomsich
The earlier implementation fell into a corner case for bytes that were 0x01, giving a wrong result (but not affecting our application test cases for strings, as an ASCII value 0x01 is rare in those...). This changes the algorithm to: 1. Mask out the high-bit of each bytes (so that each byte is <=