Re: [PATCH for-8.1 v2 25/26] target/riscv: rework write_misa()

2023-03-17 Thread Daniel Henrique Barboza
On 3/17/23 00:04, liweiwei wrote: On 2023/3/16 04:37, Daniel Henrique Barboza wrote: On 3/15/23 02:25, liweiwei wrote: On 2023/3/15 00:49, Daniel Henrique Barboza wrote: write_misa() must use as much common logic as possible. We want to open code just the bits that are exclusive to the

Re: [PATCH for-8.1 v2 25/26] target/riscv: rework write_misa()

2023-03-16 Thread liweiwei
On 2023/3/16 04:37, Daniel Henrique Barboza wrote: On 3/15/23 02:25, liweiwei wrote: On 2023/3/15 00:49, Daniel Henrique Barboza wrote: write_misa() must use as much common logic as possible. We want to open code just the bits that are exclusive to the CSR write operation and TCG

Re: [PATCH for-8.1 v2 25/26] target/riscv: rework write_misa()

2023-03-15 Thread Daniel Henrique Barboza
On 3/15/23 02:25, liweiwei wrote: On 2023/3/15 00:49, Daniel Henrique Barboza wrote: write_misa() must use as much common logic as possible. We want to open code just the bits that are exclusive to the CSR write operation and TCG internals. Rewrite write_misa() to work as follows: -

Re: [PATCH for-8.1 v2 25/26] target/riscv: rework write_misa()

2023-03-14 Thread liweiwei
On 2023/3/15 00:49, Daniel Henrique Barboza wrote: write_misa() must use as much common logic as possible. We want to open code just the bits that are exclusive to the CSR write operation and TCG internals. Rewrite write_misa() to work as follows: - supress RVC right after verifying that

[PATCH for-8.1 v2 25/26] target/riscv: rework write_misa()

2023-03-14 Thread Daniel Henrique Barboza
write_misa() must use as much common logic as possible. We want to open code just the bits that are exclusive to the CSR write operation and TCG internals. Rewrite write_misa() to work as follows: - supress RVC right after verifying that we're not updating RVG; - mask the write using