Re: [PATCH v2 03/18] target/riscv: Use g_assert() for the predicate() NULL check

2023-03-01 Thread LIU Zhiwei
On 2023/2/28 18:40, Bin Meng wrote: At present riscv_csrrw_check() checks the CSR predicate() against NULL and throws RISCV_EXCP_ILLEGAL_INST if it is NULL. But this is a pure software check, and has nothing to do with the emulation of the hardware behavior, thus it is inappropriate to return i

Re: [PATCH v2 03/18] target/riscv: Use g_assert() for the predicate() NULL check

2023-02-28 Thread liweiwei
On 2023/2/28 18:40, Bin Meng wrote: At present riscv_csrrw_check() checks the CSR predicate() against NULL and throws RISCV_EXCP_ILLEGAL_INST if it is NULL. But this is a pure software check, and has nothing to do with the emulation of the hardware behavior, thus it is inappropriate to return i

[PATCH v2 03/18] target/riscv: Use g_assert() for the predicate() NULL check

2023-02-28 Thread Bin Meng
At present riscv_csrrw_check() checks the CSR predicate() against NULL and throws RISCV_EXCP_ILLEGAL_INST if it is NULL. But this is a pure software check, and has nothing to do with the emulation of the hardware behavior, thus it is inappropriate to return illegal instruction exception when softwa