[PATCH] RISC-V: Deprecate -misa-spec and drop the ISA spec classes
Kito Cheng
kito.cheng@sifive.com
Mon Nov 23 14:28:01 GMT 2026
Only i, a, f, d and q have default versions that depend on the ISA
spec, and GCC passes -misa-spec=20191213 by default. The spec classes
do not fit newer ISA specs either, where each extension has its own
version, so it is time for this logic to become history. Remove the
ISA spec classes, so each extension has a single default version, the
20191213 one for the base extensions. The 1.12 and 1.13 entries of
`ss', which only -march=help showed, go away too.
Like -mpriv-spec, -misa-spec is kept but has no effect. The assembler
warns for 2.2 and 20190608, and configure warns if --with-isa-spec is
not 20191213.
Update the tests that used -misa-spec=2.2 or 20190608, and remove
march-fail-rv32iq-isa-2p2, a copy of march-fail-rv32iq2p0.
---
bfd/cpu-riscv.c | 8 -
bfd/cpu-riscv.h | 43 +-
bfd/elfxx-riscv.c | 530 ++++++++----------
bfd/elfxx-riscv.h | 3 +-
gas/NEWS | 6 +
gas/config.in | 3 -
gas/config/tc-riscv.c | 44 +-
gas/configure | 16 +-
gas/configure.ac | 10 +-
gas/doc/c-riscv.texi | 9 +-
gas/testsuite/gas/riscv/attribute-01.d | 4 +-
gas/testsuite/gas/riscv/attribute-02.d | 4 +-
gas/testsuite/gas/riscv/attribute-03.d | 4 +-
gas/testsuite/gas/riscv/attribute-04.d | 4 +-
gas/testsuite/gas/riscv/attribute-05.d | 4 +-
gas/testsuite/gas/riscv/attribute-06.d | 4 +-
gas/testsuite/gas/riscv/attribute-07.d | 4 +-
...spec-2p2.d => imply-zicsr-zifencei-i2p0.d} | 4 +-
.../gas/riscv/march-fail-rv32iq-isa-2p2.d | 3 -
gas/testsuite/gas/riscv/march-help.l | 12 +-
.../gas/riscv/march-ok-rv32iq-isa-20190608.d | 5 -
.../gas/riscv/misa-spec-deprecated.d | 3 +
.../gas/riscv/misa-spec-deprecated.l | 2 +
gas/testsuite/gas/riscv/option-arch-attr.d | 4 +-
gas/testsuite/gas/riscv/option-arch-dis.d | 8 +-
gas/testsuite/gas/riscv/option-norvc.d | 32 +-
opcodes/riscv-dis.c | 5 +-
27 files changed, 332 insertions(+), 446 deletions(-)
rename gas/testsuite/gas/riscv/{imply-zicsr-zifencei-i2p0-misa-spec-2p2.d => imply-zicsr-zifencei-i2p0.d} (52%)
delete mode 100644 gas/testsuite/gas/riscv/march-fail-rv32iq-isa-2p2.d
delete mode 100644 gas/testsuite/gas/riscv/march-ok-rv32iq-isa-20190608.d
create mode 100644 gas/testsuite/gas/riscv/misa-spec-deprecated.d
create mode 100644 gas/testsuite/gas/riscv/misa-spec-deprecated.l
diff --git a/bfd/cpu-riscv.c b/bfd/cpu-riscv.c
index 26ba1550e14..6c191a16474 100644
--- a/bfd/cpu-riscv.c
+++ b/bfd/cpu-riscv.c
@@ -103,14 +103,6 @@ static const bfd_arch_info_type arch_info_struct[] =
const bfd_arch_info_type bfd_riscv_arch =
N (64, 0, "riscv", true, &arch_info_struct[0]);
-/* List for all supported ISA spec versions. */
-const struct riscv_spec riscv_isa_specs[] =
-{
- {"2.2", ISA_SPEC_CLASS_2P2},
- {"20190608", ISA_SPEC_CLASS_20190608},
- {"20191213", ISA_SPEC_CLASS_20191213},
-};
-
/* Define mapping symbols for riscv. */
bool
diff --git a/bfd/cpu-riscv.h b/bfd/cpu-riscv.h
index ccec49d468e..dd8cfef51a2 100644
--- a/bfd/cpu-riscv.h
+++ b/bfd/cpu-riscv.h
@@ -1,4 +1,4 @@
-/* RISC-V spec version controlling support.
+/* RISC-V BFD support.
Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,46 +18,5 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
-enum riscv_spec_class
-{
- /* ISA spec. */
- ISA_SPEC_CLASS_NONE = 0,
- ISA_SPEC_CLASS_2P2,
- ISA_SPEC_CLASS_20190608,
- ISA_SPEC_CLASS_20191213,
- ISA_SPEC_CLASS_DRAFT,
-};
-
-struct riscv_spec
-{
- const char *name;
- enum riscv_spec_class spec_class;
-};
-
-extern const struct riscv_spec riscv_isa_specs[];
-
-#define RISCV_GET_SPEC_CLASS(UTYPE, LTYPE, NAME, CLASS) \
- do \
- { \
- if (NAME == NULL) \
- break; \
- \
- int i_spec = UTYPE##_SPEC_CLASS_NONE + 1; \
- for (; i_spec < UTYPE##_SPEC_CLASS_DRAFT; i_spec++) \
- { \
- int j_spec = i_spec - UTYPE##_SPEC_CLASS_NONE -1; \
- if (riscv_##LTYPE##_specs[j_spec].name \
- && strcmp (riscv_##LTYPE##_specs[j_spec].name, NAME) == 0)\
- { \
- CLASS = riscv_##LTYPE##_specs[j_spec].spec_class; \
- break; \
- } \
- } \
- } \
- while (0)
-
-#define RISCV_GET_ISA_SPEC_CLASS(NAME, CLASS) \
- RISCV_GET_SPEC_CLASS(ISA, isa, NAME, CLASS)
-
extern bool
riscv_elf_is_mapping_symbols (const char *);
diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
index dfd25936ae3..b14fc88b024 100644
--- a/bfd/elfxx-riscv.c
+++ b/bfd/elfxx-riscv.c
@@ -1514,7 +1514,6 @@ static const struct riscv_profiles riscv_profiles_table[] =
struct riscv_supported_ext
{
const char *name;
- enum riscv_spec_class isa_spec_class;
int major_version;
int minor_version;
unsigned long default_enable;
@@ -1524,271 +1523,251 @@ struct riscv_supported_ext
static const struct riscv_supported_ext riscv_supported_std_ext[] =
{
- {"e", ISA_SPEC_CLASS_20191213, 1, 9, 0 },
- {"e", ISA_SPEC_CLASS_20190608, 1, 9, 0 },
- {"e", ISA_SPEC_CLASS_2P2, 1, 9, 0 },
- {"i", ISA_SPEC_CLASS_20191213, 2, 1, 0 },
- {"i", ISA_SPEC_CLASS_20190608, 2, 1, 0 },
- {"i", ISA_SPEC_CLASS_2P2, 2, 0, 0 },
+ {"e", 1, 9, 0 },
+ {"i", 2, 1, 0 },
/* The g is a special case which we don't want to output it,
but still need it when adding implicit extensions. */
- {"g", ISA_SPEC_CLASS_NONE, RISCV_UNKNOWN_VERSION, RISCV_UNKNOWN_VERSION, EXT_DEFAULT },
- {"m", ISA_SPEC_CLASS_20191213, 2, 0, 0 },
- {"m", ISA_SPEC_CLASS_20190608, 2, 0, 0 },
- {"m", ISA_SPEC_CLASS_2P2, 2, 0, 0 },
- {"a", ISA_SPEC_CLASS_20191213, 2, 1, 0 },
- {"a", ISA_SPEC_CLASS_20190608, 2, 0, 0 },
- {"a", ISA_SPEC_CLASS_2P2, 2, 0, 0 },
- {"f", ISA_SPEC_CLASS_20191213, 2, 2, 0 },
- {"f", ISA_SPEC_CLASS_20190608, 2, 2, 0 },
- {"f", ISA_SPEC_CLASS_2P2, 2, 0, 0 },
- {"d", ISA_SPEC_CLASS_20191213, 2, 2, 0 },
- {"d", ISA_SPEC_CLASS_20190608, 2, 2, 0 },
- {"d", ISA_SPEC_CLASS_2P2, 2, 0, 0 },
- {"q", ISA_SPEC_CLASS_20191213, 2, 2, 0 },
- {"q", ISA_SPEC_CLASS_20190608, 2, 2, 0 },
- {"q", ISA_SPEC_CLASS_2P2, 2, 0, 0 },
- {"c", ISA_SPEC_CLASS_20191213, 2, 0, 0 },
- {"c", ISA_SPEC_CLASS_20190608, 2, 0, 0 },
- {"c", ISA_SPEC_CLASS_2P2, 2, 0, 0 },
- {"b", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"v", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"h", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {NULL, 0, 0, 0, 0}
+ {"g", RISCV_UNKNOWN_VERSION, RISCV_UNKNOWN_VERSION, EXT_DEFAULT },
+ {"m", 2, 0, 0 },
+ {"a", 2, 1, 0 },
+ {"f", 2, 2, 0 },
+ {"d", 2, 2, 0 },
+ {"q", 2, 2, 0 },
+ {"c", 2, 0, 0 },
+ {"b", 1, 0, 0 },
+ {"v", 1, 0, 0 },
+ {"h", 1, 0, 0 },
+ {NULL, 0, 0, 0}
};
static const struct riscv_supported_ext riscv_supported_std_z_ext[] =
{
- {"zic64b", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"ziccamoa", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"ziccamoc", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"ziccid", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"ziccif", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zicclsm", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"ziccrse", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zicbom", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zicbop", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zicboz", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zicond", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zicntr", ISA_SPEC_CLASS_DRAFT, 2, 0, 0 },
- {"zicsr", ISA_SPEC_CLASS_20191213, 2, 0, 0 },
- {"zicsr", ISA_SPEC_CLASS_20190608, 2, 0, 0 },
- {"zifencei", ISA_SPEC_CLASS_20191213, 2, 0, 0 },
- {"zifencei", ISA_SPEC_CLASS_20190608, 2, 0, 0 },
- {"zihintntl", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zihintpause", ISA_SPEC_CLASS_DRAFT, 2, 0, 0 },
- {"zihpm", ISA_SPEC_CLASS_DRAFT, 2, 0, 0 },
- {"zimop", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zicfiss", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zicfilp", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zilsd", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zibi", ISA_SPEC_CLASS_DRAFT, 0, 9, 0 },
- {"zmmul", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"za64rs", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"za128rs", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zaamo", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zabha", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zacas", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zalasr", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zalrsc", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zama16b", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zawrs", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zfbfmin", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zfa", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zfh", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zfhmin", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zfinx", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zdinx", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zqinx", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zhinx", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zhinxmin", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zbb", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zba", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zbc", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zbs", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zbkb", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zbkc", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zbkx", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zk", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zkn", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zknd", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zkne", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zknh", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zkr", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zks", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zksed", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zksh", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zkt", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zve32x", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zve32f", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zve64x", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zve64f", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zve64d", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvabd", ISA_SPEC_CLASS_DRAFT, 0, 9, 0 },
- {"zvbb", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvbc", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvfbdota32f", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvfbfmin", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvfbfwma", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvfh", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvfhmin", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvfqwbdota8f", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvfqwdota8f", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvfwbdota16bf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvfwdota16bf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvkb", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvkg", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvkn", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvkng", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvknc", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvkned", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvknha", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvknhb", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvksed", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvksh", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvks", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvksg", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvksc", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvkt", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvqwbdota8i", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvqwbdota16i", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvqwdota8i", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvqwdota16i", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvl32b", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvl64b", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvl128b", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvl256b", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvl512b", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvl1024b", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvl2048b", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvl4096b", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvl8192b", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvl16384b", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvl32768b", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zvl65536b", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"ztso", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zca", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zcb", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zce", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zcf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zcd", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zcmop", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zcmp", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zcmt", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"zclsd", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {NULL, 0, 0, 0, 0}
+ {"zic64b", 1, 0, 0 },
+ {"ziccamoa", 1, 0, 0 },
+ {"ziccamoc", 1, 0, 0 },
+ {"ziccid", 1, 0, 0 },
+ {"ziccif", 1, 0, 0 },
+ {"zicclsm", 1, 0, 0 },
+ {"ziccrse", 1, 0, 0 },
+ {"zicbom", 1, 0, 0 },
+ {"zicbop", 1, 0, 0 },
+ {"zicboz", 1, 0, 0 },
+ {"zicond", 1, 0, 0 },
+ {"zicntr", 2, 0, 0 },
+ {"zicsr", 2, 0, 0 },
+ {"zifencei", 2, 0, 0 },
+ {"zihintntl", 1, 0, 0 },
+ {"zihintpause", 2, 0, 0 },
+ {"zihpm", 2, 0, 0 },
+ {"zimop", 1, 0, 0 },
+ {"zicfiss", 1, 0, 0 },
+ {"zicfilp", 1, 0, 0 },
+ {"zilsd", 1, 0, 0 },
+ {"zibi", 0, 9, 0 },
+ {"zmmul", 1, 0, 0 },
+ {"za64rs", 1, 0, 0 },
+ {"za128rs", 1, 0, 0 },
+ {"zaamo", 1, 0, 0 },
+ {"zabha", 1, 0, 0 },
+ {"zacas", 1, 0, 0 },
+ {"zalasr", 1, 0, 0 },
+ {"zalrsc", 1, 0, 0 },
+ {"zama16b", 1, 0, 0 },
+ {"zawrs", 1, 0, 0 },
+ {"zfbfmin", 1, 0, 0 },
+ {"zfa", 1, 0, 0 },
+ {"zfh", 1, 0, 0 },
+ {"zfhmin", 1, 0, 0 },
+ {"zfinx", 1, 0, 0 },
+ {"zdinx", 1, 0, 0 },
+ {"zqinx", 1, 0, 0 },
+ {"zhinx", 1, 0, 0 },
+ {"zhinxmin", 1, 0, 0 },
+ {"zbb", 1, 0, 0 },
+ {"zba", 1, 0, 0 },
+ {"zbc", 1, 0, 0 },
+ {"zbs", 1, 0, 0 },
+ {"zbkb", 1, 0, 0 },
+ {"zbkc", 1, 0, 0 },
+ {"zbkx", 1, 0, 0 },
+ {"zk", 1, 0, 0 },
+ {"zkn", 1, 0, 0 },
+ {"zknd", 1, 0, 0 },
+ {"zkne", 1, 0, 0 },
+ {"zknh", 1, 0, 0 },
+ {"zkr", 1, 0, 0 },
+ {"zks", 1, 0, 0 },
+ {"zksed", 1, 0, 0 },
+ {"zksh", 1, 0, 0 },
+ {"zkt", 1, 0, 0 },
+ {"zve32x", 1, 0, 0 },
+ {"zve32f", 1, 0, 0 },
+ {"zve64x", 1, 0, 0 },
+ {"zve64f", 1, 0, 0 },
+ {"zve64d", 1, 0, 0 },
+ {"zvabd", 0, 9, 0 },
+ {"zvbb", 1, 0, 0 },
+ {"zvbc", 1, 0, 0 },
+ {"zvfbdota32f", 1, 0, 0 },
+ {"zvfbfmin", 1, 0, 0 },
+ {"zvfbfwma", 1, 0, 0 },
+ {"zvfh", 1, 0, 0 },
+ {"zvfhmin", 1, 0, 0 },
+ {"zvfqwbdota8f", 1, 0, 0 },
+ {"zvfqwdota8f", 1, 0, 0 },
+ {"zvfwbdota16bf", 1, 0, 0 },
+ {"zvfwdota16bf", 1, 0, 0 },
+ {"zvkb", 1, 0, 0 },
+ {"zvkg", 1, 0, 0 },
+ {"zvkn", 1, 0, 0 },
+ {"zvkng", 1, 0, 0 },
+ {"zvknc", 1, 0, 0 },
+ {"zvkned", 1, 0, 0 },
+ {"zvknha", 1, 0, 0 },
+ {"zvknhb", 1, 0, 0 },
+ {"zvksed", 1, 0, 0 },
+ {"zvksh", 1, 0, 0 },
+ {"zvks", 1, 0, 0 },
+ {"zvksg", 1, 0, 0 },
+ {"zvksc", 1, 0, 0 },
+ {"zvkt", 1, 0, 0 },
+ {"zvqwbdota8i", 1, 0, 0 },
+ {"zvqwbdota16i", 1, 0, 0 },
+ {"zvqwdota8i", 1, 0, 0 },
+ {"zvqwdota16i", 1, 0, 0 },
+ {"zvl32b", 1, 0, 0 },
+ {"zvl64b", 1, 0, 0 },
+ {"zvl128b", 1, 0, 0 },
+ {"zvl256b", 1, 0, 0 },
+ {"zvl512b", 1, 0, 0 },
+ {"zvl1024b", 1, 0, 0 },
+ {"zvl2048b", 1, 0, 0 },
+ {"zvl4096b", 1, 0, 0 },
+ {"zvl8192b", 1, 0, 0 },
+ {"zvl16384b", 1, 0, 0 },
+ {"zvl32768b", 1, 0, 0 },
+ {"zvl65536b", 1, 0, 0 },
+ {"ztso", 1, 0, 0 },
+ {"zca", 1, 0, 0 },
+ {"zcb", 1, 0, 0 },
+ {"zce", 1, 0, 0 },
+ {"zcf", 1, 0, 0 },
+ {"zcd", 1, 0, 0 },
+ {"zcmop", 1, 0, 0 },
+ {"zcmp", 1, 0, 0 },
+ {"zcmt", 1, 0, 0 },
+ {"zclsd", 1, 0, 0 },
+ {NULL, 0, 0, 0}
};
static const struct riscv_supported_ext riscv_supported_std_s_ext[] =
{
- {"sdext", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"sdtrig", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"sha", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"shcounterenw", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"shgatpa", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"shlcofideleg", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"shtvala", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"shvsatpa", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"shvstvala", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"shvstvecd", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"smaia", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"smcdeleg", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"smcsrind", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"smcntrpmf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"smctr", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"smepmp", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"smpmpdeleg", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"smpmpmt", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"smrnmi", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"smstateen", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"smdbltrp", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"ss", ISA_SPEC_CLASS_DRAFT, 1, 11, 0 },
- {"ss", ISA_SPEC_CLASS_DRAFT, 1, 12, 0 },
- {"ss", ISA_SPEC_CLASS_DRAFT, 1, 13, 0 },
- {"ssaia", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"ssccfg", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"ssccptr", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"sscsrind", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"sscofpmf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"sscounterenw", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"ssctr", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"ssstateen", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"ssstrict", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"sstc", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"sstvala", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"sstvecd", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"ssu64xl", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"ssdbltrp", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"svade", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"svadu", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"svbare", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"svinval", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"svnapot", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"svpbmt", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"svrsw60t59b", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"svukte", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"svvptc", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"ssqosid", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"sspmp", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"sspmpen", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"ssnpm", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"smnpm", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"smmpm", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"sspm", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"supm", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {NULL, 0, 0, 0, 0}
+ {"sdext", 1, 0, 0 },
+ {"sdtrig", 1, 0, 0 },
+ {"sha", 1, 0, 0 },
+ {"shcounterenw", 1, 0, 0 },
+ {"shgatpa", 1, 0, 0 },
+ {"shlcofideleg", 1, 0, 0 },
+ {"shtvala", 1, 0, 0 },
+ {"shvsatpa", 1, 0, 0 },
+ {"shvstvala", 1, 0, 0 },
+ {"shvstvecd", 1, 0, 0 },
+ {"smaia", 1, 0, 0 },
+ {"smcdeleg", 1, 0, 0 },
+ {"smcsrind", 1, 0, 0 },
+ {"smcntrpmf", 1, 0, 0 },
+ {"smctr", 1, 0, 0 },
+ {"smepmp", 1, 0, 0 },
+ {"smpmpdeleg", 1, 0, 0 },
+ {"smpmpmt", 1, 0, 0 },
+ {"smrnmi", 1, 0, 0 },
+ {"smstateen", 1, 0, 0 },
+ {"smdbltrp", 1, 0, 0 },
+ {"ss", 1, 11, 0 },
+ {"ssaia", 1, 0, 0 },
+ {"ssccfg", 1, 0, 0 },
+ {"ssccptr", 1, 0, 0 },
+ {"sscsrind", 1, 0, 0 },
+ {"sscofpmf", 1, 0, 0 },
+ {"sscounterenw", 1, 0, 0 },
+ {"ssctr", 1, 0, 0 },
+ {"ssstateen", 1, 0, 0 },
+ {"ssstrict", 1, 0, 0 },
+ {"sstc", 1, 0, 0 },
+ {"sstvala", 1, 0, 0 },
+ {"sstvecd", 1, 0, 0 },
+ {"ssu64xl", 1, 0, 0 },
+ {"ssdbltrp", 1, 0, 0 },
+ {"svade", 1, 0, 0 },
+ {"svadu", 1, 0, 0 },
+ {"svbare", 1, 0, 0 },
+ {"svinval", 1, 0, 0 },
+ {"svnapot", 1, 0, 0 },
+ {"svpbmt", 1, 0, 0 },
+ {"svrsw60t59b", 1, 0, 0 },
+ {"svukte", 1, 0, 0 },
+ {"svvptc", 1, 0, 0 },
+ {"ssqosid", 1, 0, 0 },
+ {"sspmp", 1, 0, 0 },
+ {"sspmpen", 1, 0, 0 },
+ {"ssnpm", 1, 0, 0 },
+ {"smnpm", 1, 0, 0 },
+ {"smmpm", 1, 0, 0 },
+ {"sspm", 1, 0, 0 },
+ {"supm", 1, 0, 0 },
+ {NULL, 0, 0, 0}
};
static const struct riscv_supported_ext riscv_supported_std_zxm_ext[] =
{
- {NULL, 0, 0, 0, 0}
+ {NULL, 0, 0, 0}
};
static const struct riscv_supported_ext riscv_supported_vendor_x_ext[] =
{
- {"xandesbfhcvt", ISA_SPEC_CLASS_DRAFT, 5, 0, 0 },
- {"xandesvbfhcvt", ISA_SPEC_CLASS_DRAFT, 5, 0, 0 },
- {"xandesvdot", ISA_SPEC_CLASS_DRAFT, 5, 0, 0 },
- {"xandesvpackfph", ISA_SPEC_CLASS_DRAFT, 5, 0, 0 },
- {"xandesvsinth", ISA_SPEC_CLASS_DRAFT, 5, 0, 0 },
- {"xandesvsintload", ISA_SPEC_CLASS_DRAFT, 5, 0, 0 },
- {"xcvalu", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xcvbi", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xcvbitmanip", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xcvelw", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xcvmac", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xcvmem", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xcvsimd", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xmipscbop", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xmipscmov", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xmipsexectl", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xmipslsp", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xsfcease", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xsfvcp", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xsfvfnrclipxfqf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xsfvqmaccdod", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xsfvqmaccqoq", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xsmtvdot", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xsmtvdotii", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xtheadba", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xtheadbb", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xtheadbs", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xtheadcmo", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xtheadcondmov", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xtheadfmemidx", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xtheadfmv", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xtheadint", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xtheadmac", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xtheadmemidx", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xtheadmempair", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xtheadsync", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xtheadvdot", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xtheadvector", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xtheadzvamo", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xventanacondops", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xxtvarith", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {"xxtvcoder", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
- {NULL, 0, 0, 0, 0}
+ {"xandesbfhcvt", 5, 0, 0 },
+ {"xandesvbfhcvt", 5, 0, 0 },
+ {"xandesvdot", 5, 0, 0 },
+ {"xandesvpackfph", 5, 0, 0 },
+ {"xandesvsinth", 5, 0, 0 },
+ {"xandesvsintload", 5, 0, 0 },
+ {"xcvalu", 1, 0, 0 },
+ {"xcvbi", 1, 0, 0 },
+ {"xcvbitmanip", 1, 0, 0 },
+ {"xcvelw", 1, 0, 0 },
+ {"xcvmac", 1, 0, 0 },
+ {"xcvmem", 1, 0, 0 },
+ {"xcvsimd", 1, 0, 0 },
+ {"xmipscbop", 1, 0, 0 },
+ {"xmipscmov", 1, 0, 0 },
+ {"xmipsexectl", 1, 0, 0 },
+ {"xmipslsp", 1, 0, 0 },
+ {"xsfcease", 1, 0, 0 },
+ {"xsfvcp", 1, 0, 0 },
+ {"xsfvfnrclipxfqf", 1, 0, 0 },
+ {"xsfvqmaccdod", 1, 0, 0 },
+ {"xsfvqmaccqoq", 1, 0, 0 },
+ {"xsmtvdot", 1, 0, 0 },
+ {"xsmtvdotii", 1, 0, 0 },
+ {"xtheadba", 1, 0, 0 },
+ {"xtheadbb", 1, 0, 0 },
+ {"xtheadbs", 1, 0, 0 },
+ {"xtheadcmo", 1, 0, 0 },
+ {"xtheadcondmov", 1, 0, 0 },
+ {"xtheadfmemidx", 1, 0, 0 },
+ {"xtheadfmv", 1, 0, 0 },
+ {"xtheadint", 1, 0, 0 },
+ {"xtheadmac", 1, 0, 0 },
+ {"xtheadmemidx", 1, 0, 0 },
+ {"xtheadmempair", 1, 0, 0 },
+ {"xtheadsync", 1, 0, 0 },
+ {"xtheadvdot", 1, 0, 0 },
+ {"xtheadvector", 1, 0, 0 },
+ {"xtheadzvamo", 1, 0, 0 },
+ {"xventanacondops", 1, 0, 0 },
+ {"xxtvarith", 1, 0, 0 },
+ {"xxtvcoder", 1, 0, 0 },
+ {NULL, 0, 0, 0}
};
static const struct riscv_supported_ext *riscv_all_supported_ext[] =
@@ -2036,13 +2015,11 @@ riscv_add_subset (riscv_subset_list_t *subset_list,
/* Get the default versions from the riscv_supported_*ext tables. */
static void
-riscv_get_default_ext_version (enum riscv_spec_class default_isa_spec,
- const char *name,
+riscv_get_default_ext_version (const char *name,
int *major_version,
int *minor_version)
{
- if (name == NULL
- || default_isa_spec == ISA_SPEC_CLASS_NONE)
+ if (name == NULL)
return;
const struct riscv_supported_ext *table = NULL;
@@ -2060,9 +2037,7 @@ riscv_get_default_ext_version (enum riscv_spec_class default_isa_spec,
int i = 0;
while (table != NULL && table[i].name != NULL)
{
- if (strcmp (table[i].name, name) == 0
- && (table[i].isa_spec_class == ISA_SPEC_CLASS_DRAFT
- || table[i].isa_spec_class == default_isa_spec))
+ if (strcmp (table[i].name, name) == 0)
{
*major_version = table[i].major_version;
*minor_version = table[i].minor_version;
@@ -2088,9 +2063,8 @@ riscv_parse_add_subset (riscv_parse_subset_t *rps,
if ((major_version == RISCV_UNKNOWN_VERSION
|| minor_version == RISCV_UNKNOWN_VERSION)
- && rps->isa_spec != NULL)
- riscv_get_default_ext_version (*rps->isa_spec, subset,
- &major_version, &minor_version);
+ && rps->use_default_version)
+ riscv_get_default_ext_version (subset, &major_version, &minor_version);
/* We don't care the versions of the implicit extensions. */
if (!implicit
@@ -2101,9 +2075,7 @@ riscv_parse_add_subset (riscv_parse_subset_t *rps,
rps->error_handler
(_("x ISA extension `%s' must be set with the versions"),
subset);
- /* Allow old ISA spec can recognize zicsr and zifencei. */
- else if (strcmp (subset, "zicsr") != 0
- && strcmp (subset, "zifencei") != 0)
+ else
rps->error_handler
(_("cannot find default versions of the ISA extension `%s'"),
subset);
@@ -2918,7 +2890,7 @@ riscv_update_subset (riscv_parse_subset_t *rps,
.subset_list = riscv_copy_subset_list (rps->subset_list),
.error_handler = rps->error_handler,
.xlen = &newxlen,
- .isa_spec = rps->isa_spec,
+ .use_default_version = rps->use_default_version,
.check_unknown_prefixed_ext = rps->check_unknown_prefixed_ext,
};
@@ -3659,9 +3631,6 @@ riscv_multi_subset_supports_ext (riscv_parse_subset_t *rps,
void
riscv_print_extensions (void)
{
- /* Record the previous printed extension.
- Print the current one if they are not the same. */
- const struct riscv_supported_ext *cur = NULL, *prev = NULL;
int i, j;
printf ("All available -march extensions for RISC-V:");
@@ -3669,32 +3638,15 @@ riscv_print_extensions (void)
for (i = 0; riscv_all_supported_ext[i] != NULL; i++)
{
const struct riscv_supported_ext *exts = riscv_all_supported_ext[i];
- prev = NULL;
for (j = 0; exts[j].name != NULL; j++)
{
- cur = &exts[j];
/* Unclear version information, skip. */
- if (cur->isa_spec_class == ISA_SPEC_CLASS_NONE
- || cur->major_version == RISCV_UNKNOWN_VERSION
- || cur->minor_version == RISCV_UNKNOWN_VERSION)
+ if (exts[j].major_version == RISCV_UNKNOWN_VERSION
+ || exts[j].minor_version == RISCV_UNKNOWN_VERSION)
continue;
- /* Same extension. */
- if (prev && strcmp (prev->name, cur->name) == 0)
- {
- /* Same version, skip. */
- if (prev->major_version == cur->major_version
- && prev->minor_version == cur->minor_version)
- continue;
- /* Different version, print version with comma. */
- else
- printf (", %d.%d", cur->major_version, cur->minor_version);
- }
- /* Different extension, print extension and version with newline. */
- else
- printf ("\n\t%-40s%d.%d", cur->name, cur->major_version,
- cur->minor_version);
- prev = &exts[j];
+ printf ("\n\t%-40s%d.%d", exts[j].name, exts[j].major_version,
+ exts[j].minor_version);
}
}
printf ("\n");
@@ -3931,9 +3883,9 @@ riscv_merge_arch_attr_info (bfd *ibfd, char *in_arch, char *out_arch,
unsigned xlen_in, xlen_out;
riscv_parse_subset_t riscv_rps_ld_in =
- {&in_subsets, _bfd_error_handler, &xlen_in, NULL, false};
+ {&in_subsets, _bfd_error_handler, &xlen_in, false, false};
riscv_parse_subset_t riscv_rps_ld_out =
- {&out_subsets, _bfd_error_handler, &xlen_out, NULL, false};
+ {&out_subsets, _bfd_error_handler, &xlen_out, false, false};
if (in_arch == NULL && out_arch == NULL)
return NULL;
@@ -3988,7 +3940,7 @@ riscv_merge_arch_attr_info (bfd *ibfd, char *in_arch, char *out_arch,
/* Add the implicit subsets implied by the merged subset list, then
check if the result is conflicting. */
riscv_parse_subset_t riscv_rps_ld_merged =
- {&merged_subsets, _bfd_error_handler, &xlen_in, NULL, false};
+ {&merged_subsets, _bfd_error_handler, &xlen_in, false, false};
riscv_parse_add_implicit_subsets (&riscv_rps_ld_merged);
if (!riscv_parse_check_conflicts (&riscv_rps_ld_merged))
goto cleanup;
diff --git a/bfd/elfxx-riscv.h b/bfd/elfxx-riscv.h
index 56c2567083c..def59e1fd2e 100644
--- a/bfd/elfxx-riscv.h
+++ b/bfd/elfxx-riscv.h
@@ -129,7 +129,8 @@ typedef struct
void (*error_handler) (const char *,
...) ATTRIBUTE_PRINTF_1;
unsigned *xlen;
- const enum riscv_spec_class *isa_spec;
+ /* Fill in the default version for an extension without one. */
+ bool use_default_version;
bool check_unknown_prefixed_ext;
} riscv_parse_subset_t;
diff --git a/gas/NEWS b/gas/NEWS
index 48381b3e7de..c6d3525511e 100644
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -29,6 +29,12 @@
attributes, which are deprecated by the RISC-V psABI. Use binutils 2.47
or earlier to select another privileged spec version.
+* The RISC-V option -misa-spec and the configure option --with-isa-spec are
+ deprecated and have no effect. The default versions of the RISC-V
+ extensions follow the ISA spec 20191213. The assembler warns if
+ -misa-spec=2.2 or -misa-spec=20190608 is used. Use binutils 2.47 or
+ earlier to select another ISA spec version.
+
Changes in 2.47:
* New command line option --reloc-section-sym=[all|internal|none]
diff --git a/gas/config.in b/gas/config.in
index 33482aa73dc..92a529e6130 100644
--- a/gas/config.in
+++ b/gas/config.in
@@ -51,9 +51,6 @@
/* Define to 1 if you want to generate RISC-V arch attribute by default. */
#undef DEFAULT_RISCV_ATTR
-/* Define default value for RISC-V -misa-spec. */
-#undef DEFAULT_RISCV_ISA_SPEC
-
/* Define to 1 if you want to emit R_XTENSA_32_ABS for 32-bit absolute data by
default. */
#undef DEFAULT_R_XTENSA_32_ABS
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index fbdd46fed33..2b1609efb31 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -149,15 +149,9 @@ struct riscv_ip_error
#define DEFAULT_RISCV_ARCH_WITH_EXT NULL
#endif
-/* Need to sync the version with RISC-V compiler. */
-#ifndef DEFAULT_RISCV_ISA_SPEC
-#define DEFAULT_RISCV_ISA_SPEC "20191213"
-#endif
-
static const char default_arch[] = DEFAULT_ARCH;
static const char *default_arch_with_ext = DEFAULT_RISCV_ARCH_WITH_EXT;
static const char *file_arch_str = NULL;
-static enum riscv_spec_class default_isa_spec = ISA_SPEC_CLASS_NONE;
static unsigned xlen = 0; /* The width of an x-register. */
static unsigned abi_xlen = 0; /* The width of a pointer in the ABI. */
@@ -182,23 +176,25 @@ static bool start_assemble = false;
static bool probing_insn_operands;
-/* Set the default_isa_spec. Return 0 if the spec isn't supported.
- Otherwise, return 1. */
+/* -misa-spec is deprecated, the default extension versions no longer
+ depend on it. GCC passes -misa-spec=20191213 by default, so only warn
+ for the older specs. Return 0 if the spec isn't known. Otherwise,
+ return 1. */
static int
-riscv_set_default_isa_spec (const char *s)
+riscv_check_deprecated_isa_spec (const char *s)
{
- enum riscv_spec_class class = ISA_SPEC_CLASS_NONE;
- RISCV_GET_ISA_SPEC_CLASS (s, class);
- if (class == ISA_SPEC_CLASS_NONE)
+ if (strcmp (s, "20191213") == 0)
+ return 1;
+ if (strcmp (s, "2.2") == 0 || strcmp (s, "20190608") == 0)
{
- as_bad ("unknown default ISA spec `%s' set by "
- "-misa-spec or --with-isa-spec", s);
- return 0;
+ as_warn (_("-misa-spec=%s is deprecated and has no effect, the "
+ "extension versions follow the 20191213 ISA spec; use "
+ "binutils 2.47 or earlier to select another version"), s);
+ return 1;
}
- else
- default_isa_spec = class;
- return 1;
+ as_bad (_("unknown default ISA spec `%s' set by -misa-spec"), s);
+ return 0;
}
/* This is the set of options which the .option pseudo-op may modify. */
@@ -262,7 +258,7 @@ static riscv_parse_subset_t riscv_rps_as =
riscv_opts_stack is created or updated. */
as_bad, /* error_handler. */
&xlen, /* xlen. */
- &default_isa_spec, /* isa_spec. */
+ true, /* use_default_version. */
true, /* check_unknown_prefixed_ext. */
};
@@ -296,7 +292,7 @@ riscv_set_arch (const char *s)
.subset_list = XCNEW (riscv_subset_list_t),
.error_handler = as_bad,
.xlen = &newxlen,
- .isa_spec = &default_isa_spec,
+ .use_default_version = true,
.check_unknown_prefixed_ext = true,
};
@@ -4727,7 +4723,7 @@ md_parse_option (int c, const char *arg)
break;
case OPTION_MISA_SPEC:
- return riscv_set_default_isa_spec (arg);
+ return riscv_check_deprecated_isa_spec (arg);
case OPTION_MPRIV_SPEC:
as_warn (_("-mpriv-spec is deprecated and has no effect, the "
@@ -4765,10 +4761,6 @@ riscv_after_parse_args (void)
as_bad ("unknown default architecture `%s'", default_arch);
}
- /* Set default specs. */
- if (default_isa_spec == ISA_SPEC_CLASS_NONE)
- riscv_set_default_isa_spec (DEFAULT_RISCV_ISA_SPEC);
-
riscv_set_arch (default_arch_with_ext);
/* If the CIE to be produced has not been overridden on the command line,
@@ -5690,7 +5682,7 @@ RISC-V options:\n\
-fpic or -fPIC generate position-independent code\n\
-fno-pic don't generate position-independent code (default)\n\
-march=ISA set the RISC-V architecture\n\
- -misa-spec=ISAspec set the RISC-V ISA spec (2.2, 20190608, 20191213)\n\
+ -misa-spec=ISAspec deprecated and ignored (always 20191213)\n\
-mpriv-spec=PRIVspec deprecated and ignored (always 1.13)\n\
-mabi=ABI set the RISC-V ABI\n\
-mrelax enable relax (default)\n\
diff --git a/gas/configure b/gas/configure
index bf3ccf3006d..a25a4522166 100755
--- a/gas/configure
+++ b/gas/configure
@@ -13008,18 +13008,12 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_arch" >&5
$as_echo "$with_arch" >&6; }
- # --with-isa-spec=[2.2|20190608|20191213].
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default configuration of --with-isa-spec" >&5
-$as_echo_n "checking for default configuration of --with-isa-spec... " >&6; }
- if test "x${with_isa_spec}" != x; then
-
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_RISCV_ISA_SPEC "$with_isa_spec"
-_ACEOF
-
+ # --with-isa-spec is deprecated and has no effect.
+ if test "x${with_isa_spec}" != x \
+ && test "x${with_isa_spec}" != x20191213; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-isa-spec is deprecated and has no effect, the extension versions follow the 20191213 ISA spec; use binutils 2.47 or earlier to select another version" >&5
+$as_echo "$as_me: WARNING: --with-isa-spec is deprecated and has no effect, the extension versions follow the 20191213 ISA spec; use binutils 2.47 or earlier to select another version" >&2;}
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_isa_spec" >&5
-$as_echo "$with_isa_spec" >&6; }
# --with-priv-spec is deprecated and has no effect.
if test "x${with_priv_spec}" != x; then
diff --git a/gas/configure.ac b/gas/configure.ac
index 09089b395c5..06d49a6b696 100644
--- a/gas/configure.ac
+++ b/gas/configure.ac
@@ -657,13 +657,11 @@ changequote([,])dnl
fi
AC_MSG_RESULT($with_arch)
- # --with-isa-spec=[2.2|20190608|20191213].
- AC_MSG_CHECKING(for default configuration of --with-isa-spec)
- if test "x${with_isa_spec}" != x; then
- AC_DEFINE_UNQUOTED(DEFAULT_RISCV_ISA_SPEC, "$with_isa_spec",
- [Define default value for RISC-V -misa-spec.])
+ # --with-isa-spec is deprecated and has no effect.
+ if test "x${with_isa_spec}" != x \
+ && test "x${with_isa_spec}" != x20191213; then
+ AC_MSG_WARN([--with-isa-spec is deprecated and has no effect, the extension versions follow the 20191213 ISA spec; use binutils 2.47 or earlier to select another version])
fi
- AC_MSG_RESULT($with_isa_spec)
# --with-priv-spec is deprecated and has no effect.
if test "x${with_priv_spec}" != x; then
diff --git a/gas/doc/c-riscv.texi b/gas/doc/c-riscv.texi
index 9a7a35e2dd0..391f83e3938 100644
--- a/gas/doc/c-riscv.texi
+++ b/gas/doc/c-riscv.texi
@@ -51,10 +51,11 @@ will check the default configure setting --with-arch=ISA.
@cindex @samp{-misa-spec=ISAspec} option, RISC-V
@item -misa-spec=ISAspec
-Select the default isa spec version. If the version of ISA isn't set
-by -march, then assembler helps to set the version according to
-the default chosen spec. If this option isn't set, then assembler will
-check the default configure setting --with-isa-spec=ISAspec.
+This option is deprecated and has no effect. The default versions of the
+extensions follow the ISA spec 20191213. The assembler warns if ISAspec is
+@samp{2.2} or @samp{20190608}.
+The configure setting --with-isa-spec=ISAspec is also deprecated and has
+no effect. Use binutils 2.47 or earlier to select another version.
@cindex @samp{-mpriv-spec=PRIVspec} option, RISC-V
@item -mpriv-spec=PRIVspec
diff --git a/gas/testsuite/gas/riscv/attribute-01.d b/gas/testsuite/gas/riscv/attribute-01.d
index 5615d590866..65d7279d089 100644
--- a/gas/testsuite/gas/riscv/attribute-01.d
+++ b/gas/testsuite/gas/riscv/attribute-01.d
@@ -1,6 +1,6 @@
-#as: -march=rv32g -march-attr -misa-spec=2.2
+#as: -march=rv32g -march-attr
#readelf: -A
#source: empty.s
Attribute Section: riscv
File Attributes
- Tag_RISCV_arch: "rv32i2p0_m2p0_a2p0_f2p0_d2p0_zmmul1p0_zaamo1p0_zalrsc1p0"
+ Tag_RISCV_arch: "rv32i2p1_m2p0_a2p1_f2p2_d2p2_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0"
diff --git a/gas/testsuite/gas/riscv/attribute-02.d b/gas/testsuite/gas/riscv/attribute-02.d
index 134cc41b825..e7e3220f6ee 100644
--- a/gas/testsuite/gas/riscv/attribute-02.d
+++ b/gas/testsuite/gas/riscv/attribute-02.d
@@ -1,6 +1,6 @@
-#as: -march=rv32gxargle2p0 -march-attr -misa-spec=2.2
+#as: -march=rv32gxargle2p0 -march-attr
#readelf: -A
#source: empty.s
Attribute Section: riscv
File Attributes
- Tag_RISCV_arch: "rv32i2p0_m2p0_a2p0_f2p0_d2p0_zmmul1p0_zaamo1p0_zalrsc1p0_xargle2p0"
+ Tag_RISCV_arch: "rv32i2p1_m2p0_a2p1_f2p2_d2p2_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_xargle2p0"
diff --git a/gas/testsuite/gas/riscv/attribute-03.d b/gas/testsuite/gas/riscv/attribute-03.d
index 70e07e3b55c..c7aed2e6cd8 100644
--- a/gas/testsuite/gas/riscv/attribute-03.d
+++ b/gas/testsuite/gas/riscv/attribute-03.d
@@ -1,6 +1,6 @@
-#as: -march=rv32gxargle2p0_xfoo3p0 -march-attr -misa-spec=2.2
+#as: -march=rv32gxargle2p0_xfoo3p0 -march-attr
#readelf: -A
#source: empty.s
Attribute Section: riscv
File Attributes
- Tag_RISCV_arch: "rv32i2p0_m2p0_a2p0_f2p0_d2p0_zmmul1p0_zaamo1p0_zalrsc1p0_xargle2p0_xfoo3p0"
+ Tag_RISCV_arch: "rv32i2p1_m2p0_a2p1_f2p2_d2p2_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_xargle2p0_xfoo3p0"
diff --git a/gas/testsuite/gas/riscv/attribute-04.d b/gas/testsuite/gas/riscv/attribute-04.d
index 21575b4a632..7dfdcc7696f 100644
--- a/gas/testsuite/gas/riscv/attribute-04.d
+++ b/gas/testsuite/gas/riscv/attribute-04.d
@@ -1,6 +1,6 @@
-#as: -march-attr -misa-spec=2.2
+#as: -march-attr
#readelf: -A
#source: attribute-04.s
Attribute Section: riscv
File Attributes
- Tag_RISCV_arch: "rv32i2p0_m2p0_a2p0_f2p0_d2p0_zmmul1p0_zaamo1p0_zalrsc1p0"
+ Tag_RISCV_arch: "rv32i2p1_m2p0_a2p1_f2p2_d2p2_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0"
diff --git a/gas/testsuite/gas/riscv/attribute-05.d b/gas/testsuite/gas/riscv/attribute-05.d
index f6dfe087cdd..ac61e2beec0 100644
--- a/gas/testsuite/gas/riscv/attribute-05.d
+++ b/gas/testsuite/gas/riscv/attribute-05.d
@@ -1,9 +1,9 @@
-#as: -march-attr -misa-spec=2.2
+#as: -march-attr
#readelf: -A
#source: attribute-05.s
#warning_output: attribute-05.l
Attribute Section: riscv
File Attributes
Tag_RISCV_stack_align: 16-bytes
- Tag_RISCV_arch: "rv32i2p0_m2p0_a2p0_f2p0_d2p0_zmmul1p0_zaamo1p0_zalrsc1p0"
+ Tag_RISCV_arch: "rv32i2p1_m2p0_a2p1_f2p2_d2p2_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0"
Tag_RISCV_unaligned_access: Unaligned access
diff --git a/gas/testsuite/gas/riscv/attribute-06.d b/gas/testsuite/gas/riscv/attribute-06.d
index a2dd9fbb97e..8218981ec36 100644
--- a/gas/testsuite/gas/riscv/attribute-06.d
+++ b/gas/testsuite/gas/riscv/attribute-06.d
@@ -1,6 +1,6 @@
-#as: -march=rv32g2p0 -march-attr -misa-spec=2.2
+#as: -march=rv32g2p0 -march-attr
#readelf: -A
#source: attribute-06.s
Attribute Section: riscv
File Attributes
- Tag_RISCV_arch: "rv32i2p0"
+ Tag_RISCV_arch: "rv32i2p1"
diff --git a/gas/testsuite/gas/riscv/attribute-07.d b/gas/testsuite/gas/riscv/attribute-07.d
index 342a53752ce..a30d1b6b4f1 100644
--- a/gas/testsuite/gas/riscv/attribute-07.d
+++ b/gas/testsuite/gas/riscv/attribute-07.d
@@ -1,6 +1,6 @@
-#as: -march=rv64g2p0 -march-attr -misa-spec=2.2
+#as: -march=rv64g2p0 -march-attr
#readelf: -A
#source: attribute-07.s
Attribute Section: riscv
File Attributes
- Tag_RISCV_arch: "rv64i2p0"
+ Tag_RISCV_arch: "rv64i2p1"
diff --git a/gas/testsuite/gas/riscv/imply-zicsr-zifencei-i2p0-misa-spec-2p2.d b/gas/testsuite/gas/riscv/imply-zicsr-zifencei-i2p0.d
similarity index 52%
rename from gas/testsuite/gas/riscv/imply-zicsr-zifencei-i2p0-misa-spec-2p2.d
rename to gas/testsuite/gas/riscv/imply-zicsr-zifencei-i2p0.d
index 2f5ed9937d8..e41d458cc39 100644
--- a/gas/testsuite/gas/riscv/imply-zicsr-zifencei-i2p0-misa-spec-2p2.d
+++ b/gas/testsuite/gas/riscv/imply-zicsr-zifencei-i2p0.d
@@ -1,7 +1,7 @@
-#as: -march=rv32i -march-attr -misa-spec=2.2
+#as: -march=rv32i2p0 -march-attr
#readelf: -A
#source: imply-zicsr-zifencei.s
Attribute Section: riscv
File Attributes
- Tag_RISCV_arch: "rv32i2p0"
+ Tag_RISCV_arch: "rv32i2p0_zicsr2p0_zifencei2p0"
#...
diff --git a/gas/testsuite/gas/riscv/march-fail-rv32iq-isa-2p2.d b/gas/testsuite/gas/riscv/march-fail-rv32iq-isa-2p2.d
deleted file mode 100644
index 16451b0f43f..00000000000
--- a/gas/testsuite/gas/riscv/march-fail-rv32iq-isa-2p2.d
+++ /dev/null
@@ -1,3 +0,0 @@
-#as: -misa-spec=2.2 -march=rv32iq
-#source: empty.s
-#error_output: march-fail-rv32iq2p0.l
diff --git a/gas/testsuite/gas/riscv/march-help.l b/gas/testsuite/gas/riscv/march-help.l
index c94c1ded1b2..9e549ebbf14 100644
--- a/gas/testsuite/gas/riscv/march-help.l
+++ b/gas/testsuite/gas/riscv/march-help.l
@@ -1,11 +1,11 @@
All available -march extensions for RISC-V:
e 1.9
- i 2.1, 2.0
+ i 2.1
m 2.0
- a 2.1, 2.0
- f 2.2, 2.0
- d 2.2, 2.0
- q 2.2, 2.0
+ a 2.1
+ f 2.2
+ d 2.2
+ q 2.2
c 2.0
b 1.0
v 1.0
@@ -146,7 +146,7 @@ All available -march extensions for RISC-V:
smrnmi 1.0
smstateen 1.0
smdbltrp 1.0
- ss 1.11, 1.12, 1.13
+ ss 1.11
ssaia 1.0
ssccfg 1.0
ssccptr 1.0
diff --git a/gas/testsuite/gas/riscv/march-ok-rv32iq-isa-20190608.d b/gas/testsuite/gas/riscv/march-ok-rv32iq-isa-20190608.d
deleted file mode 100644
index 8322957948d..00000000000
--- a/gas/testsuite/gas/riscv/march-ok-rv32iq-isa-20190608.d
+++ /dev/null
@@ -1,5 +0,0 @@
-#as: -misa-spec=20190608 -march=rv32iq
-#objdump: -dr
-#source: empty.s
-
-.*: file format elf32-(little|big)riscv
diff --git a/gas/testsuite/gas/riscv/misa-spec-deprecated.d b/gas/testsuite/gas/riscv/misa-spec-deprecated.d
new file mode 100644
index 00000000000..8562436f34c
--- /dev/null
+++ b/gas/testsuite/gas/riscv/misa-spec-deprecated.d
@@ -0,0 +1,3 @@
+#as: -misa-spec=20190608
+#source: empty.s
+#warning_output: misa-spec-deprecated.l
diff --git a/gas/testsuite/gas/riscv/misa-spec-deprecated.l b/gas/testsuite/gas/riscv/misa-spec-deprecated.l
new file mode 100644
index 00000000000..2facd5b4ff6
--- /dev/null
+++ b/gas/testsuite/gas/riscv/misa-spec-deprecated.l
@@ -0,0 +1,2 @@
+.*Assembler messages:
+.*Warning: -misa-spec=20190608 is deprecated and has no effect, the extension versions follow the 20191213 ISA spec; use binutils 2.47 or earlier to select another version
diff --git a/gas/testsuite/gas/riscv/option-arch-attr.d b/gas/testsuite/gas/riscv/option-arch-attr.d
index 27df69dc176..f13fd5ab9e4 100644
--- a/gas/testsuite/gas/riscv/option-arch-attr.d
+++ b/gas/testsuite/gas/riscv/option-arch-attr.d
@@ -1,7 +1,7 @@
-#as: -misa-spec=2.2
+#as:
#source: option-arch.s
#readelf: -A
Attribute Section: riscv
File Attributes
- Tag_RISCV_arch: "rv64i2p0_c2p0_zca1p0"
+ Tag_RISCV_arch: "rv64i2p1_c2p0_zca1p0"
diff --git a/gas/testsuite/gas/riscv/option-arch-dis.d b/gas/testsuite/gas/riscv/option-arch-dis.d
index bee01f1abd8..8978fc7fc32 100644
--- a/gas/testsuite/gas/riscv/option-arch-dis.d
+++ b/gas/testsuite/gas/riscv/option-arch-dis.d
@@ -1,4 +1,4 @@
-#as: -misa-spec=2.2
+#as:
#source: option-arch.s
#objdump: -d --syms --special-syms
@@ -8,9 +8,9 @@ SYMBOL TABLE:
0+00 l d .text 0+00 .text
0+00 l d .data 0+00 .data
0+00 l d .bss 0+00 .bss
-0+00 l .text 0+00 \$xrv64i2p0_c2p0_zca1p0
-0+02 l .text 0+00 \$xrv64i2p0_f2p0_d2p0_xvendor1p0
-0+0a l .text 0+00 \$xrv64i2p0_m3p0_f2p0_d3p0_c2p0_zmmul1p0_zca1p0_zcd1p0_xvendor32x3p0
+0+00 l .text 0+00 \$xrv64i2p1_c2p0_zca1p0
+0+02 l .text 0+00 \$xrv64i2p1_f2p2_d2p0_zicsr2p0_xvendor1p0
+0+0a l .text 0+00 \$xrv64i2p1_m3p0_f2p2_d3p0_c2p0_zicsr2p0_zmmul1p0_zca1p0_zcd1p0_xvendor32x3p0
0+0c l .text 0+00 \$xrv32i2p1_c2p0_zca1p0
0+00 l d .riscv.attributes 0+00 .riscv.attributes
diff --git a/gas/testsuite/gas/riscv/option-norvc.d b/gas/testsuite/gas/riscv/option-norvc.d
index 5a4b97688a7..7231ed03798 100644
--- a/gas/testsuite/gas/riscv/option-norvc.d
+++ b/gas/testsuite/gas/riscv/option-norvc.d
@@ -1,4 +1,4 @@
-#as: -misa-spec=2.2 -march=rv64i
+#as: -march=rv64i
#source: option-norvc.s
#objdump: -d --syms --special-syms -Mno-aliases
@@ -8,21 +8,21 @@ SYMBOL TABLE:
0+00 l d .text 0+00 .text
0+00 l d .data 0+00 .data
0+00 l d .bss 0+00 .bss
-0+00 l .text 0+00 \$xrv64i2p0_c2p0_zca1p0
-0+02 l .text 0+00 \$xrv64i2p0
-0+06 l .text 0+00 \$xrv32i2p0_f2p0_c2p0_zca1p0_zcf1p0
-0+08 l .text 0+00 \$xrv32i2p0_f2p0
-0+0c l .text 0+00 \$xrv64i2p0_f2p0_d2p0_c2p0_zca1p0_zcd1p0
-0+0e l .text 0+00 \$xrv64i2p0_f2p0_d2p0
-0+12 l .text 0+00 \$xrv64i2p0_f2p0_d2p0_zca1p0
-0+14 l .text 0+00 \$xrv64i2p0_f2p0_d2p0
-0+18 l .text 0+00 \$xrv32i2p0_f2p0_zca1p0_zcf1p0
-0+1a l .text 0+00 \$xrv32i2p0_f2p0
-0+1e l .text 0+00 \$xrv64i2p0_f2p0_d2p0_zca1p0_zcd1p0
-0+20 l .text 0+00 \$xrv64i2p0_f2p0_d2p0
-0+24 l .text 0+00 \$xrv32i2p0_zilsd1p0_zca1p0_zcb1p0_zclsd1p0
-0+28 l .text 0+00 \$xrv32i2p0_zilsd1p0
-0+30 l .text 0+00 \$xrv64i2p0
+0+00 l .text 0+00 \$xrv64i2p1_c2p0_zca1p0
+0+02 l .text 0+00 \$xrv64i2p1
+0+06 l .text 0+00 \$xrv32i2p1_f2p2_c2p0_zicsr2p0_zca1p0_zcf1p0
+0+08 l .text 0+00 \$xrv32i2p1_f2p2_zicsr2p0
+0+0c l .text 0+00 \$xrv64i2p1_f2p2_d2p2_c2p0_zicsr2p0_zca1p0_zcd1p0
+0+0e l .text 0+00 \$xrv64i2p1_f2p2_d2p2_zicsr2p0
+0+12 l .text 0+00 \$xrv64i2p1_f2p2_d2p2_zicsr2p0_zca1p0
+0+14 l .text 0+00 \$xrv64i2p1_f2p2_d2p2_zicsr2p0
+0+18 l .text 0+00 \$xrv32i2p1_f2p2_zicsr2p0_zca1p0_zcf1p0
+0+1a l .text 0+00 \$xrv32i2p1_f2p2_zicsr2p0
+0+1e l .text 0+00 \$xrv64i2p1_f2p2_d2p2_zicsr2p0_zca1p0_zcd1p0
+0+20 l .text 0+00 \$xrv64i2p1_f2p2_d2p2_zicsr2p0
+0+24 l .text 0+00 \$xrv32i2p1_zilsd1p0_zca1p0_zcb1p0_zclsd1p0
+0+28 l .text 0+00 \$xrv32i2p1_zilsd1p0
+0+30 l .text 0+00 \$xrv64i2p1_zicsr2p0
0+0 l d .riscv.attributes 0+00 .riscv.attributes
diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c
index 9da420afe63..758de83de33 100644
--- a/opcodes/riscv-dis.c
+++ b/opcodes/riscv-dis.c
@@ -50,8 +50,6 @@ struct riscv_private_data
bfd_size_type jvt_size;
/* Current XLEN for the disassembler. */
unsigned xlen;
- /* Default ISA specification version. */
- enum riscv_spec_class default_isa_spec;
/* Used for architecture parser. */
riscv_parse_subset_t riscv_rps_dis;
/* Default architecture string for the object file. It will be changed once
@@ -1732,12 +1730,11 @@ riscv_init_disasm_info (struct disassemble_info *info)
pd->xlen = 0;
riscv_set_xlen_from_elf (pd, info);
- pd->default_isa_spec = ISA_SPEC_CLASS_DRAFT - 1;
pd->riscv_rps_dis.subset_list = xcalloc (1, sizeof (riscv_parse_subset_t));
pd->riscv_rps_dis.error_handler = opcodes_error_handler;
pd->riscv_rps_dis.xlen = &pd->xlen;
- pd->riscv_rps_dis.isa_spec = &pd->default_isa_spec;
+ pd->riscv_rps_dis.use_default_version = true;
pd->riscv_rps_dis.check_unknown_prefixed_ext = false;
pd->default_arch = "rv64gc";
if (info->section != NULL)
--
2.54.0
More information about the Binutils
mailing list