[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 15/21] target/riscv: Reorg csr instructions

From: Richard Henderson
Subject: Re: [PATCH v4 15/21] target/riscv: Reorg csr instructions
Date: Mon, 23 Aug 2021 12:54:33 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 8/22/21 9:54 PM, Bin Meng wrote:
On Sat, Aug 21, 2021 at 1:43 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.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
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(-)

When testing Linux kernel boot, there was a segment fault in the
helper_csrw() path where ret_value pointer is now NULL, and some CSR
write op does not test ret_value.

Thanks.  It would be really nice to get an acceptance test in...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]