X-Git-Url: http://drtracing.org/?a=blobdiff_plain;ds=sidebyside;f=bfd%2Felfxx-riscv.h;h=7b8f09b82c4b11a2986ff958f4c839203369b561;hb=60db1b8565060f4bd2287b060ea9724c93289982;hp=64e41b80cc02002d123dc8104df09a00f621596e;hpb=1080bf78c05b220f5f4bbc5c50d6a0ef6490d738;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elfxx-riscv.h b/bfd/elfxx-riscv.h index 64e41b80cc..7b8f09b82c 100644 --- a/bfd/elfxx-riscv.h +++ b/bfd/elfxx-riscv.h @@ -1,5 +1,5 @@ /* RISC-V ELF specific backend routines. - Copyright (C) 2011-2018 Free Software Foundation, Inc. + Copyright (C) 2011-2020 Free Software Foundation, Inc. Contributed by Andrew Waterman (andrew@sifive.com). Based on MIPS target. @@ -72,6 +72,9 @@ typedef struct { 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 @@ -83,3 +86,26 @@ 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 *);