binutils-gdb/include/opcode
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
..
ChangeLog-0415
ChangeLog-9103
aarch64.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
alpha.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
arc-attrs.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
arc-func.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
arc.h [ARC] Add finer details for LLOCK and SCOND 2020-01-07 15:25:34 +02:00
arm.h [binutils][arm] arm support for ARMv8.m Custom Datapath Extension 2020-02-10 16:50:14 +00:00
avr.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
bfin.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
cgen.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
convex.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
cr16.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
cris.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
crx.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
csky.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
d10v.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
d30v.h ubsan: d30v: negation of -2147483648 2020-02-04 14:10:40 +10:30
dlx.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ft32.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
h8300.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
hppa.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
i386.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ia64.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
m68hc11.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
m68k.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
metag.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
mips.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
mmix.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
mn10200.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
mn10300.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
moxie.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
msp430-decode.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
msp430.h MSP430: Fix relocation overflow when using #lo(EXP) macro 2020-01-15 13:23:06 +00:00
nds32.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
nfp.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
nios2.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
nios2r1.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
nios2r2.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
np1.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ns32k.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
pdp11.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
pj.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
pn.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ppc.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
pru.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
pyr.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
riscv-opc.h RISC-V: Support the ISA-dependent CSR checking. 2020-02-20 16:49:09 -08:00
riscv.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
rl78.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
rx.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
s12z.h Enable building the s12z target on Solaris hosts where REG_Y is defined in system header files. 2020-01-02 12:04:40 +00:00
s390.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
score-datadep.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
score-inst.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
sparc.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
spu-insns.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
spu.h ubsan: spu: left shift of negative value 2020-01-10 17:32:33 +10:30
tic4x.h tic4x: sign extension using shifts 2020-01-13 12:12:05 +10:30
tic6x-control-registers.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
tic6x-insn-formats.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
tic6x-opcode-table.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
tic6x.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
tic30.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
tic54x.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
tilegx.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
tilepro.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
v850.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
vax.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
visium.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
wasm.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
xgate.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30