[v5,0/3] RISC-V: Support more rigorous check for CSR

Message ID 1581502731-28327-1-git-send-email-nelson.chu@sifive.com
Headers show
Series
  • RISC-V: Support more rigorous check for CSR
Related show

Message

Nelson Chu Feb. 12, 2020, 10:18 a.m.
Hi binutils,

I get some feedbacks from Andrew Burgess of gdb side.  Therefroe I update the
series of patches.  There are some differences between v5 version and v3 version
that Jim reviewed, shown as follows:

1. Implement the draft of CSR spec is inadvisable, so I remove the first patch
of v3 version.

2. Reorder the patches.  Move the patch "RISC-V: Disable the CSR checking by
default" to the second patch.


The detailed of patches:

* [PATCH v5 1/3] RISC-V: Support the ISA-dependent CSR checking.
a. Add missing comments for each function.
b. Add -march=rv32if option to the csr-dw-regnum test case.
c. Report warning messages rather than error for the CSR cheking.
d. Keep the consistent usage in gas/config/tc-riscv.c (from Andrew's suggestion)
d-1. Change the 'typedef struct {...} riscv_csr_extra' to
'struct riscv_csr_extra {...}'.
d-2. Use 'if (hash_error != NULL)' in init_opcode_hash and riscv_init_csr_hash, since
hash_error is not a boolean.

* [PATCH v5 2/3] RISC-V: Disable the CSR checking by default.

* [PATCH v5 3/3] RISC-V: Support the read-only CSR checking.


Thanks
Nelson

Comments

Jim Wilson Feb. 21, 2020, 12:54 a.m. | #1
On Wed, Feb 12, 2020 at 2:18 AM Nelson Chu <nelson.chu@sifive.com> wrote:
> * [PATCH v5 1/3] RISC-V: Support the ISA-dependent CSR checking.

> a. Add missing comments for each function.

> b. Add -march=rv32if option to the csr-dw-regnum test case.

> c. Report warning messages rather than error for the CSR cheking.

> d. Keep the consistent usage in gas/config/tc-riscv.c (from Andrew's suggestion)

> d-1. Change the 'typedef struct {...} riscv_csr_extra' to

> 'struct riscv_csr_extra {...}'.

> d-2. Use 'if (hash_error != NULL)' in init_opcode_hash and riscv_init_csr_hash, since

> hash_error is not a boolean.

>

> * [PATCH v5 2/3] RISC-V: Disable the CSR checking by default.

>

> * [PATCH v5 3/3] RISC-V: Support the read-only CSR checking.


This looks good.  I fixed a comment typo in part 3, and rewrote the
ChangeLog entries a bit because you didn't mention all of the types,
variables, and functions modified by the patches.  Andrew Burgess had
already approved the gdb parts, so I committed both the binutils and
gdb patches.

Jim