+ 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},
+};
+
+/* List for all supported privileged spec versions. */
+const struct riscv_spec riscv_priv_specs[] =
+{
+ {"1.9.1", PRIV_SPEC_CLASS_1P9P1},
+ {"1.10", PRIV_SPEC_CLASS_1P10},
+ {"1.11", PRIV_SPEC_CLASS_1P11},
+ {"1.12", PRIV_SPEC_CLASS_1P12},
+};
+
+/* Get the corresponding CSR version class by giving privilege
+ version numbers. It is usually used to convert the priv
+ attribute numbers into the corresponding class. */
+
+void
+riscv_get_priv_spec_class_from_numbers (unsigned int major,
+ unsigned int minor,
+ unsigned int revision,
+ enum riscv_spec_class *class)
+{
+ enum riscv_spec_class class_t = *class;
+ char buf[36];
+
+ if (revision != 0)
+ snprintf (buf, sizeof (buf), "%u.%u.%u", major, minor, revision);
+ else
+ snprintf (buf, sizeof (buf), "%u.%u", major, minor);
+
+ RISCV_GET_PRIV_SPEC_CLASS (buf, class_t);
+ *class = class_t;
+}
+
+/* Define mapping symbols for riscv. */
+
+bool
+riscv_elf_is_mapping_symbols (const char *name)
+{
+ return (!strncmp (name, "$d", 2)
+ || !strncmp (name, "$x", 2));
+}