12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- From 91df5cd432661a07b23f9a35d6c0741f0a2f7c96 Mon Sep 17 00:00:00 2001
- From: Nelson Chu <nelson.chu@sifive.com>
- Date: Thu, 9 Jul 2020 10:56:09 +0800
- Subject: [PATCH 22/48] RISC-V: Clarify the supported versions for the
- unratified extensions.
- Remove the V-ext v0.7 in the riscv_ext_version_table, and regard V-ext
- as a non-ISA spec extension temporarily. Since we only support the v1.0
- for now, and not yet upstreamed. Also, we define other unratified
- extensions to the non-ISA spec extension, too.
- ---
- gas/config/tc-riscv.c | 3 ++-
- gas/testsuite/gas/riscv/attribute-15-unratified.d | 6 ++++++
- opcodes/riscv-opc.c | 7 +++++++
- 3 files changed, 15 insertions(+), 1 deletion(-)
- create mode 100644 gas/testsuite/gas/riscv/attribute-15-unratified.d
- diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
- index 67353ab725..2dc55ca5aa 100644
- --- a/gas/config/tc-riscv.c
- +++ b/gas/config/tc-riscv.c
- @@ -298,7 +298,8 @@ riscv_get_default_ext_version (const char *name,
- && ext->name
- && strcmp (ext->name, name) == 0)
- {
- - if (ext->isa_spec_class == default_isa_spec)
- + if (ext->isa_spec_class == ISA_SPEC_CLASS_NONE
- + || ext->isa_spec_class == default_isa_spec)
- {
- *major_version = ext->major_version;
- *minor_version = ext->minor_version;
- diff --git a/gas/testsuite/gas/riscv/attribute-15-unratified.d b/gas/testsuite/gas/riscv/attribute-15-unratified.d
- new file mode 100644
- index 0000000000..09d64edbe6
- --- /dev/null
- +++ b/gas/testsuite/gas/riscv/attribute-15-unratified.d
- @@ -0,0 +1,6 @@
- +#as: -march-attr -march=rv32ifv_zvamo_zvediv_zvlsseg_zvqmac
- +#readelf: -A
- +#source: empty.s
- +Attribute Section: riscv
- +File Attributes
- + Tag_RISCV_arch: ".*_v1p0_zvamo1p0_zvediv1p0_zvlsseg1p0_zvqmac1p0"
- diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c
- index bc8c5b5d32..c7ecb7c965 100644
- --- a/opcodes/riscv-opc.c
- +++ b/opcodes/riscv-opc.c
- @@ -2205,12 +2205,19 @@ const struct riscv_ext_version riscv_ext_version_table[] =
- {"c", ISA_SPEC_CLASS_20190608, 2, 0},
- {"c", ISA_SPEC_CLASS_2P2, 2, 0},
-
- +{"v", ISA_SPEC_CLASS_NONE, 1, 0},
- +
- {"zicsr", ISA_SPEC_CLASS_20191213, 2, 0},
- {"zicsr", ISA_SPEC_CLASS_20190608, 2, 0},
-
- {"zifencei", ISA_SPEC_CLASS_20191213, 2, 0},
- {"zifencei", ISA_SPEC_CLASS_20190608, 2, 0},
-
- +{"zvamo", ISA_SPEC_CLASS_NONE, 1, 0},
- +{"zvediv", ISA_SPEC_CLASS_NONE, 1, 0},
- +{"zvlsseg", ISA_SPEC_CLASS_NONE, 1, 0},
- +{"zvqmac", ISA_SPEC_CLASS_NONE, 1, 0},
- +
- /* Terminate the list. */
- {NULL, 0, 0, 0}
- };
- --
- 2.33.0
|