RISC-V: Disable the CSR checking by default.
authorNelson Chu <nelson.chu@sifive.com>
Wed, 12 Feb 2020 10:18:50 +0000 (02:18 -0800)
committerJim Wilson <jimw@sifive.com>
Fri, 21 Feb 2020 00:49:09 +0000 (16:49 -0800)
commit2ca89224b1ce2cf170bb891b211bede4f6eda473
tree084816dc38df12ac10a6d561c81aa2e6cc9f80f3
parentbd0cf5a6bae180f65f3b9298619d1bd695abcdd8
RISC-V: Disable the CSR checking by default.

Add new .option `csr-check/no-csr-check` and GAS option `-mcsr-check
/-mno-csr-check` to enbale/disable the CSR checking.  Disable the CSR
checking by default.

gas/
* config/tc-riscv.c: Add new .option and GAS options to enbale/disable
the CSR checking.  We disable the CSR checking by default.
(reg_lookup_internal): Check the `riscv_opts.csr_check`
before we doing the CSR checking.

* doc/c-riscv.texi: Add description for the new .option and assembler
options.

* testsuite/gas/riscv/priv-reg-fail-fext.d: Add `-mcsr-check` to enable
the CSR checking.
* testsuite/gas/riscv/priv-reg-fail-rv32-only.d: Likewise.
gas/ChangeLog
gas/config/tc-riscv.c
gas/doc/c-riscv.texi
gas/testsuite/gas/riscv/priv-reg-fail-fext.d
gas/testsuite/gas/riscv/priv-reg-fail-rv32-only.d