Re: [RFC PATCH v2 08/30] target/loongarch: Add LoongArch CSR/IOCSR instruction

2021-11-17 Thread yangxiaojuan
Hi, Richard: On 11/12/2021 01:43 AM, Richard Henderson wrote: > On 11/11/21 2:35 AM, Xiaojuan Yang wrote: >> This includes: >> - CSRRD >> - CSRWR >> - CSRXCHG >> - IOCSR{RD/WR}.{B/H/W/D} > > I think IOCSR should be in a separate patch. > It's completely unrelated to the other CSRs. > >> +target_

Re: [RFC PATCH v2 08/30] target/loongarch: Add LoongArch CSR/IOCSR instruction

2021-11-11 Thread Richard Henderson
On 11/11/21 2:35 AM, Xiaojuan Yang wrote: This includes: - CSRRD - CSRWR - CSRXCHG - IOCSR{RD/WR}.{B/H/W/D} I think IOCSR should be in a separate patch. It's completely unrelated to the other CSRs. +target_ulong helper_csr_rdq(CPULoongArchState *env, uint64_t csr) +{ +int64_t v; + +sw

[RFC PATCH v2 08/30] target/loongarch: Add LoongArch CSR/IOCSR instruction

2021-11-10 Thread Xiaojuan Yang
This includes: - CSRRD - CSRWR - CSRXCHG - IOCSR{RD/WR}.{B/H/W/D} Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/csr_helper.c| 322 ++ target/loongarch/helper.h| 11 + target/loongarch/insn_trans/trans_core.c.inc | 437