]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/elfxx-riscv.h
sim/testsuite/or1k: Add test for 64-bit fpu operations
[thirdparty/binutils-gdb.git] / bfd / elfxx-riscv.h
index 04da5b55f0a745becbe042173eb9cec3de3a8a3f..19f7bd2ecc901e24526f34da623deed65b16cfae 100644 (file)
@@ -1,5 +1,5 @@
 /* RISC-V ELF specific backend routines.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2019 Free Software Foundation, Inc.
 
    Contributed by Andrew Waterman (andrew@sifive.com).
    Based on MIPS target.
@@ -30,4 +30,59 @@ extern reloc_howto_type *
 riscv_reloc_type_lookup (bfd *, bfd_reloc_code_real_type);
 
 extern reloc_howto_type *
-riscv_elf_rtype_to_howto (unsigned int r_type);
+riscv_elf_rtype_to_howto (bfd *, unsigned int r_type);
+
+#define RISCV_DONT_CARE_VERSION -1
+
+/* The information of architecture attribute.  */
+struct riscv_subset_t
+{
+  const char *name;
+  int major_version;
+  int minor_version;
+  struct riscv_subset_t *next;
+};
+
+typedef struct riscv_subset_t riscv_subset_t;
+
+typedef struct {
+  riscv_subset_t *head;
+  riscv_subset_t *tail;
+} riscv_subset_list_t;
+
+extern void
+riscv_release_subset_list (riscv_subset_list_t *);
+
+extern void
+riscv_add_subset (riscv_subset_list_t *,
+                 const char *,
+                 int, int);
+
+extern riscv_subset_t *
+riscv_lookup_subset (const riscv_subset_list_t *,
+                    const char *);
+
+extern riscv_subset_t *
+riscv_lookup_subset_version (const riscv_subset_list_t *,
+                            const char *,
+                            int, int);
+
+typedef struct {
+  riscv_subset_list_t *subset_list;
+  void (*error_handler) (const char *,
+                        ...) ATTRIBUTE_PRINTF_1;
+  unsigned *xlen;
+} riscv_parse_subset_t;
+
+extern bfd_boolean
+riscv_parse_subset (riscv_parse_subset_t *,
+                   const char *);
+
+extern const char *
+riscv_supported_std_ext (void);
+
+extern void
+riscv_release_subset_list (riscv_subset_list_t *);
+
+extern char *
+riscv_arch_str (unsigned, const riscv_subset_list_t *);