binutils-gdb/gdb/features
Nelson Chu bd0cf5a6ba RISC-V: Support the ISA-dependent CSR checking.
According to the riscv privilege spec, some CSR are only valid when rv32 or
the specific extension is set.  We extend the DECLARE_CSR and DECLARE_CSR_ALIAS
to record more informaton we need, and then check whether the CSR is valid
according to these information.  We report warning message when the CSR is
invalid, so we have a choice between error and warning by --fatal-warnings
option.  Also, a --no-warn/-W option is used to turn the warnings off, if
people don't want the warnings.

	gas/
	* config/tc-riscv.c (enum riscv_csr_class): New enum.  Used to decide
	whether or not this CSR is legal in the current ISA string.
	(struct riscv_csr_extra): New structure to hold all extra information
	of CSR.
	(riscv_init_csr_hash): New function.  According to the DECLARE_CSR and
	DECLARE_CSR_ALIAS, insert CSR extra information into csr_extra_hash.
	Call hash_reg_name to insert CSR address into reg_names_hash.
	(md_begin): Call riscv_init_csr_hashes for each DECLARE_CSR.
	(reg_csr_lookup_internal, riscv_csr_class_check): New functions.
	Decide whether the CSR is valid according to the csr_extra_hash.
	(init_opcode_hash): Update 'if (hash_error != NULL)' as hash_error is
	not a boolean.  This is same as riscv_init_csr_hash, so keep the
	consistent usage.

	* testsuite/gas/riscv/csr-dw-regnums.d: Add -march=rv32if option.
	* testsuite/gas/riscv/priv-reg.d: Add f-ext by -march option.
	* testsuite/gas/riscv/priv-reg-fail-fext.d: New testcase.  The source
	file is `priv-reg.s`, and the ISA is rv32i without f-ext, so the
	f-ext CSR are not allowed.
	* testsuite/gas/riscv/priv-reg-fail-fext.l: Likewise.
	* testsuite/gas/riscv/priv-reg-fail-rv32-only.d: New testcase.  The
	source file is `priv-reg.s`, and the ISA is rv64if, so the
	rv32-only CSR are not allowed.
	* testsuite/gas/riscv/priv-reg-fail-rv32-only.l: Likewise.

	include/
	* opcode/riscv-opc.h: Extend DECLARE_CSR and DECLARE_CSR_ALIAS to
	record riscv_csr_class.

	opcodes/
	* riscv-dis.c (print_insn_args): Updated since the DECLARE_CSR is changed.

	gdb/
	* riscv-tdep.c: Updated since the DECLARE_CSR is changed.
	* riscv-tdep.h: Likewise.
	* features/riscv/rebuild-csr-xml.sh: Generate the 64bit-csr.xml without
	rv32-only CSR.
	* features/riscv/64bit-csr.xml: Regernated.

	binutils/
	* dwarf.c: Updated since the DECLARE_CSR is changed.
2020-02-20 16:49:09 -08:00
..
arm Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
i386 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
riscv RISC-V: Support the ISA-dependent CSR checking. 2020-02-20 16:49:09 -08:00
rs6000 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
sparc Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
Makefile Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
aarch64-core.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
aarch64-core.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
aarch64-fpu.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
aarch64-fpu.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
aarch64-pauth.c Regenerate aarch64-pauth.c 2019-07-10 11:47:13 +01:00
aarch64-pauth.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
aarch64-sve.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
arc-arcompact.c Do not emit "field_type" var if not needed on "maint print c-tdesc" 2017-12-21 18:21:45 -05:00
arc-arcompact.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
arc-v2.c Do not emit "field_type" var if not needed on "maint print c-tdesc" 2017-12-21 18:21:45 -05:00
arc-v2.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
btrace-conf.dtd Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
btrace.dtd Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
feature_to_c.sh Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
gdb-target.dtd Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
gdbserver-regs.xsl
library-list-aix.dtd Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
library-list-svr4.dtd Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
library-list.dtd Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
m68k-core.xml
microblaze-core.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
microblaze-stack-protect.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
microblaze-with-stack-protect.c
microblaze-with-stack-protect.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
microblaze.c
microblaze.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
mips-cp0.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
mips-cpu.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
mips-dsp-linux.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
mips-dsp-linux.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
mips-dsp.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
mips-fpu.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
mips-linux.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
mips-linux.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
mips64-cp0.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
mips64-cpu.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
mips64-dsp-linux.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
mips64-dsp-linux.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
mips64-dsp.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
mips64-fpu.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
mips64-linux.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
mips64-linux.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
nds32-core.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
nds32-fpu.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
nds32-system.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
nds32.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
nds32.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
nios2-cpu.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
nios2-linux.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
nios2.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
nios2.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
number-regs.xsl
or1k-core.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
or1k.c Do not emit "field_type" var if not needed on "maint print c-tdesc" 2017-12-21 18:21:45 -05:00
or1k.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
osdata.dtd Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
rx.c Convert the RX target to make use of target descriptions. 2019-08-25 17:00:08 +09:00
rx.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-acr.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-core32.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-core64.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-fpr.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-gs-linux64.c Do not emit "field_type" var if not needed on "maint print c-tdesc" 2017-12-21 18:21:45 -05:00
s390-gs-linux64.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-gs.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-gsbc.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-linux32.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390-linux32.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-linux32v1.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390-linux32v1.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-linux32v2.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390-linux32v2.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-linux64.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390-linux64.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-linux64v1.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390-linux64v1.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-linux64v2.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390-linux64v2.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-tdb.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-te-linux64.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390-te-linux64.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-tevx-linux64.c Do not emit "field_type" var if not needed on "maint print c-tdesc" 2017-12-21 18:21:45 -05:00
s390-tevx-linux64.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-vx-linux64.c Do not emit "field_type" var if not needed on "maint print c-tdesc" 2017-12-21 18:21:45 -05:00
s390-vx-linux64.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390-vx.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390x-core64.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390x-gs-linux64.c Do not emit "field_type" var if not needed on "maint print c-tdesc" 2017-12-21 18:21:45 -05:00
s390x-gs-linux64.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390x-linux64.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390x-linux64.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390x-linux64v1.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390x-linux64v1.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390x-linux64v2.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390x-linux64v2.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390x-te-linux64.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390x-te-linux64.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390x-tevx-linux64.c Do not emit "field_type" var if not needed on "maint print c-tdesc" 2017-12-21 18:21:45 -05:00
s390x-tevx-linux64.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
s390x-vx-linux64.c Do not emit "field_type" var if not needed on "maint print c-tdesc" 2017-12-21 18:21:45 -05:00
s390x-vx-linux64.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
sort-regs.xsl
threads.dtd Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
tic6x-c6xp.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
tic6x-c6xp.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
tic6x-c62x-linux.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
tic6x-c64x-linux.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
tic6x-c64xp-linux.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
tic6x-core.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
tic6x-core.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
tic6x-gp.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
tic6x-gp.xml Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
traceframe-info.dtd Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
xinclude.dtd Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00