aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorNelson Chu <nelson.chu@sifive.com>2020-06-10 14:07:54 +0800
committerNelson Chu <nelson.chu@sifive.com>2020-06-12 09:41:20 +0800
commitd8af286fffa664a4399be2f4f157d2425c50acf1 (patch)
tree895d6ed7fa1f9b145e45e079bba4c5e234d2cf32 /opcodes
parente9576b7d682047cec216710d09ee30c0c99498f6 (diff)
downloadgdb-d8af286fffa664a4399be2f4f157d2425c50acf1.zip
gdb-d8af286fffa664a4399be2f4f157d2425c50acf1.tar.gz
gdb-d8af286fffa664a4399be2f4f157d2425c50acf1.tar.bz2
RISC-V: Drop the privileged spec v1.9 support.
There is a conflict between v1.9 and v1.9.1 - CSR MISA address. MISA is 0xf10 in v1.9, but change to 0x301 in v1.9.1. The change made MISA writable, but may also cause risk of compatibility. Binutils already support the -mpriv-spec options and ELF priv attributes, which can used to choose what privileged spec you want, and then give a correponding CSR name and address to use. But Gdb and other tools don't have the simialr mechanism for now. However, there are two things can be confirmed, 1. If we don't have a way to control the priv specs, then the changes, like MISA, will cause risk and hard to maintain. 2. We get the guarantee that the CSR address won't be reused in the future specs, even if it is dropped. I'm not sure if Gdb needs to care about the priv spec versions, it is still discussing. But drop the priv spec v1.9, and make sure that we won't reuse the CSR address is a useful solution for now. Also, we might drop the v1.9.1 in a year or two. After that, specs above v1.10 should be compatible anyway. gas/ * testsuite/gas/riscv/priv-reg-fail-version-1p9.d: Removed. * testsuite/gas/riscv/priv-reg-fail-version-1p9.l: Likewise. * testsuite/gas/riscv/priv-reg-version-1p9.d: Likewise. include/ * opcode/riscv-opc.h: Update the defined versions of CSR from PRIV_SPEC_CLASS_1P9 to PRIV_SPEC_CLASS_1P9P1. Also, drop the MISA DECLARE_CSR_ALIAS since it's aborted version is v1.9. * opcode/riscv.h (enum riscv_priv_spec_class): Remove PRIV_SPEC_CLASS_1P9. opcodes/ * riscv-opc.c (priv_specs): Remove v1.9 and PRIV_SPEC_CLASS_1P9.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog4
-rw-r--r--opcodes/riscv-opc.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index c4c0ab5..d8fd4f7 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,7 @@
+2020-06-12 Nelson Chu <nelson.chu@sifive.com>
+
+ * riscv-opc.c (priv_specs): Remove v1.9 and PRIV_SPEC_CLASS_1P9.
+
2020-06-11 Alex Coplan <alex.coplan@arm.com>
* aarch64-opc.c (SYSREG): New macro for describing system registers.
diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c
index 4481359..25b35ba 100644
--- a/opcodes/riscv-opc.c
+++ b/opcodes/riscv-opc.c
@@ -987,7 +987,6 @@ struct priv_spec_t
/* List for all supported privilege versions. */
static const struct priv_spec_t priv_specs[] =
{
- {"1.9", PRIV_SPEC_CLASS_1P9},
{"1.9.1", PRIV_SPEC_CLASS_1P9P1},
{"1.10", PRIV_SPEC_CLASS_1P10},
{"1.11", PRIV_SPEC_CLASS_1P11},