From: Geoffrey Keating Date: Fri, 29 Jun 2001 00:09:16 +0000 (+0000) Subject: * cgen-asm.c (cgen_parse_keyword): Allow any first character. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5e91c3b4311049f4ef00ded805872c282810c5c4;p=binutils-gdb.git * cgen-asm.c (cgen_parse_keyword): Allow any first character. * cgen-opc.c (cgen_keyword_add): Ignore special first character when building nonalpha_chars field. --- diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index e449b79d506..d7dc563fa23 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,9 @@ +2001-06-28 Geoffrey Keating + + * cgen-asm.c (cgen_parse_keyword): Allow any first character. + * cgen-opc.c (cgen_keyword_add): Ignore special first + character when building nonalpha_chars field. + 2001-06-24 Ben Elliston * m88k-dis.c: Format to conform to GNU coding standards. diff --git a/opcodes/cgen-asm.c b/opcodes/cgen-asm.c index 315b802f71d..7bb29ca9867 100644 --- a/opcodes/cgen-asm.c +++ b/opcodes/cgen-asm.c @@ -212,6 +212,12 @@ cgen_parse_keyword (cd, strp, keyword_table, valuep) p = start = *strp; + /* Allow any first character. This is to make life easier for + the fairly common case of suffixes, eg. 'ld.b.w', where the first + character of the suffix ('.') is special. */ + if (*p) + ++p; + /* Allow letters, digits, and any special characters. */ while (((p - start) < (int) sizeof (buf)) && *p diff --git a/opcodes/cgen-opc.c b/opcodes/cgen-opc.c index f159943fa32..188a157f3a1 100644 --- a/opcodes/cgen-opc.c +++ b/opcodes/cgen-opc.c @@ -134,7 +134,7 @@ cgen_keyword_add (kt, ke) if (ke->name[0] == 0) kt->null_entry = ke; - for (i = 0; i < strlen (ke->name); i++) + for (i = 1; i < strlen (ke->name); i++) if (! isalnum ((unsigned char) ke->name[i]) && ! strchr (kt->nonalpha_chars, ke->name[i])) {