summaryrefslogtreecommitdiff
path: root/opcodes/cgen-asm.c
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@geoffk.org>2001-06-14 20:38:42 +0000
committerGeoffrey Keating <geoffk@geoffk.org>2001-06-14 20:38:42 +0000
commitcf8810d4a96085b90248b4751fa2c92b3142f29b (patch)
tree9f19a21059de3b661bee5f66497c52c900004510 /opcodes/cgen-asm.c
parentded69fe21914009f90888c90f81641549dac5042 (diff)
downloadbinutils-redhat-cf8810d4a96085b90248b4751fa2c92b3142f29b.tar.gz
Index: opcodes/ChangeLog
2001-06-13 Geoffrey Keating <geoffk@redhat.com> * cgen-asm.c (cgen_parse_keyword): When looking for the boundaries of a keyword, allow any special characters that are actually in one of the allowed keyword. * cgen-opc.c (cgen_keyword_add): Add any special characters to the nonalpha_chars field. Index: cgen/ChangeLog 2001-06-13 Geoffrey Keating <geoffk@redhat.com> * desc.scm (<keyword> 'gen-defn): Add extra zero into CGEN_KEYWORD_ENTRY initializers. Index: include/opcode/ChangeLog 2001-06-13 Geoffrey Keating <geoffk@redhat.com> * cgen.h (cgen_keyword): Add nonalpha_chars field.
Diffstat (limited to 'opcodes/cgen-asm.c')
-rw-r--r--opcodes/cgen-asm.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/opcodes/cgen-asm.c b/opcodes/cgen-asm.c
index a8d6ff8471..315b802f71 100644
--- a/opcodes/cgen-asm.c
+++ b/opcodes/cgen-asm.c
@@ -207,17 +207,16 @@ cgen_parse_keyword (cd, strp, keyword_table, valuep)
char buf[256];
const char *p,*start;
- p = start = *strp;
+ if (keyword_table->name_hash_table == NULL)
+ (void) cgen_keyword_search_init (keyword_table, NULL);
- /* Allow any first character.
- Note that this allows recognizing ",a" for the annul flag in sparc
- even though "," is subsequently not a valid keyword char. */
- if (*p)
- ++p;
+ p = start = *strp;
- /* Now allow letters, digits, and _. */
+ /* Allow letters, digits, and any special characters. */
while (((p - start) < (int) sizeof (buf))
- && (isalnum ((unsigned char) *p) || *p == '_'))
+ && *p
+ && (isalnum ((unsigned char) *p)
+ || strchr (keyword_table->nonalpha_chars, *p)))
++p;
if (p - start >= (int) sizeof (buf))