+2020-01-27 Jim Wilson <jimw@sifive.com>
+
+ * cpu-riscv.c (riscv_scan): New.
+ (N): Change bfd_default_scan to riscv_scan.
+
2020-01-27 Andreas Schwab <schwab@suse.de>
* Makefile.am (ALL_MACHINES): Remove cpu-plugin.lo.
return a;
}
+/* Return TRUE if STRING matches the architecture described by INFO. */
+
+static bfd_boolean
+riscv_scan (const struct bfd_arch_info *info, const char *string)
+{
+ if (bfd_default_scan (info, string))
+ return TRUE;
+
+ /* The string might have extra characters for supported subsets. So allow
+ a match that ignores trailing characters in string. */
+ if (strncasecmp (string, info->printable_name,
+ strlen (info->printable_name)) == 0)
+ return TRUE;
+
+ return FALSE;
+}
+
#define N(BITS, NUMBER, PRINT, DEFAULT, NEXT) \
{ \
BITS, /* Bits in a word. */ \
3, \
DEFAULT, \
riscv_compatible, \
- bfd_default_scan, \
+ riscv_scan, \
bfd_arch_default_fill, \
NEXT, \
0 /* Maximum offset of a reloc from the start of an insn. */\