[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 15/21] target/riscv: Reorg csr instructions
From: |
Bin Meng |
Subject: |
Re: [PATCH v2 15/21] target/riscv: Reorg csr instructions |
Date: |
Thu, 19 Aug 2021 15:08:12 +0800 |
On Wed, Aug 18, 2021 at 5:27 AM Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Introduce csrr and csrw helpers, for read-only and write-only insns.
>
> Note that we do not properly implement this in riscv_csrrw, in that
> we cannot distinguish true read-only (rs1 == 0) from any other zero
> write_mask another source register -- this should still raise an
> exception for read-only registers.
>
> Only issue gen_io_start for CF_USE_ICOUNT.
> Use ctx->zero for csrrc.
> Use get_gpr and dest_gpr.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> target/riscv/helper.h | 6 +-
> target/riscv/op_helper.c | 18 +--
> target/riscv/insn_trans/trans_rvi.c.inc | 172 +++++++++++++++++-------
> 3 files changed, 131 insertions(+), 65 deletions(-)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
- [PATCH v2 10/21] target/riscv: Add DisasExtend to gen_unary, (continued)
- [PATCH v2 10/21] target/riscv: Add DisasExtend to gen_unary, Richard Henderson, 2021/08/17
- [PATCH v2 12/21] target/riscv: Add gen_greviw, Richard Henderson, 2021/08/17
- [PATCH v2 11/21] target/riscv: Use DisasExtend in shift operations, Richard Henderson, 2021/08/17
- [PATCH v2 13/21] target/riscv: Use get_gpr in branches, Richard Henderson, 2021/08/17
- [PATCH v2 14/21] target/riscv: Use {get, dest}_gpr for integer load/store, Richard Henderson, 2021/08/17
- [PATCH v2 17/21] target/riscv: Use gen_shift_imm_fn for slli_uw, Richard Henderson, 2021/08/17
- [PATCH v2 15/21] target/riscv: Reorg csr instructions, Richard Henderson, 2021/08/17
- Re: [PATCH v2 15/21] target/riscv: Reorg csr instructions,
Bin Meng <=
- [PATCH v2 16/21] target/riscv: Use {get,dest}_gpr for RVA, Richard Henderson, 2021/08/17
- [PATCH v2 18/21] target/riscv: Use {get,dest}_gpr for RVF, Richard Henderson, 2021/08/17
- [PATCH v2 19/21] target/riscv: Use {get,dest}_gpr for RVD, Richard Henderson, 2021/08/17
- [PATCH v2 20/21] target/riscv: Tidy trans_rvh.c.inc, Richard Henderson, 2021/08/17
- [PATCH v2 21/21] target/riscv: Use {get,dest}_gpr for RVV, Richard Henderson, 2021/08/17