gdb: defer commit resume until all available events are consumed
[deliverable/binutils-gdb.git] / bfd / elfxx-riscv.h
index 28600e8e60d5d4be7ac6c3fcea15c2e13c83a007..c91b169e99e26fa5ece5c9289e2302409bffd094 100644 (file)
@@ -1,5 +1,5 @@
 /* RISC-V ELF specific backend routines.
-   Copyright 2011-2016 Free Software Foundation, Inc.
+   Copyright (C) 2011-2020 Free Software Foundation, Inc.
 
    Contributed by Andrew Waterman (andrew@sifive.com).
    Based on MIPS target.
@@ -22,6 +22,7 @@
 
 #include "elf/common.h"
 #include "elf/internal.h"
+#include "opcode/riscv.h"
 
 extern reloc_howto_type *
 riscv_reloc_name_lookup (bfd *, const char *);
@@ -30,4 +31,94 @@ 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;
+  void (*get_default_version) (const char *,
+                              unsigned int *,
+                              unsigned int *);
+} 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 *);
+
+extern size_t
+riscv_estimate_digit (unsigned);
+
+/* ISA extension name class. E.g. "zbb" corresponds to RV_ISA_CLASS_Z,
+   "xargs" corresponds to RV_ISA_CLASS_X, etc.  Order is important
+   here.  */
+
+typedef enum riscv_isa_ext_class
+  {
+   RV_ISA_CLASS_S,
+   RV_ISA_CLASS_Z,
+   RV_ISA_CLASS_X,
+   RV_ISA_CLASS_UNKNOWN
+  } riscv_isa_ext_class_t;
+
+/* Classify the argument 'ext' into one of riscv_isa_ext_class_t.  */
+
+riscv_isa_ext_class_t
+riscv_get_prefix_class (const char *);
+
+extern int
+riscv_get_priv_spec_class (const char *, enum riscv_priv_spec_class *);
+
+extern int
+riscv_get_priv_spec_class_from_numbers (unsigned int,
+                                       unsigned int,
+                                       unsigned int,
+                                       enum riscv_priv_spec_class *);
+
+extern const char *
+riscv_get_priv_spec_name (enum riscv_priv_spec_class);
This page took 0.027405 seconds and 4 git commands to generate.