On 2/25/23 03:47, liweiwei wrote:
On 2023/2/25 01:45, Daniel Henrique Barboza wrote:
Hi,
These cleanups were suggested by LIU Zhiwei during the review of the
RISCV_FEATURE_* cleanups, currently on version 7 [1].
These are dependent on the patch "[PATCH v7 01/10] target/riscv: introduce
riscv_cpu_cfg()" from [1] because we use the riscv_cpu_cfg() API.
[1] https://lists.gnu.org/archive/html/qemu-devel/2023-02/msg06467.html
Daniel Henrique Barboza (4):
target/riscv/csr.c: use env_archcpu() in ctr()
target/riscv/csr.c: simplify mctr()
target/riscv/csr.c: use riscv_cpu_cfg() to avoid env_cpu() pointers
target/riscv/csr.c: avoid env_archcpu() usages when reading
RISCVCPUConfig
target/riscv/csr.c | 90 +++++++++++++---------------------------------
1 file changed, 24 insertions(+), 66 deletions(-)
As I suggested in another patch, cpu_get_cfg() can also be used in
vector_helper.c.
I decided to do it in a separated series together with the vector_helper.c
change
I did last week:
https://lists.gnu.org/archive/html/qemu-devel/2023-02/msg07566.html
The vector_change I did prior eliminated some of the env_archcpu() we want to
avoid so makes sense to one after the other.
Thanks,
Daniel
Regards,
Weiwei Li