* cgen-asm.c (cgen_parse_keyword): Allow any first character.
authorGeoffrey Keating <geoffk@geoffk.org>
Fri, 29 Jun 2001 00:09:16 +0000 (00:09 +0000)
committerGeoffrey Keating <geoffk@geoffk.org>
Fri, 29 Jun 2001 00:09:16 +0000 (00:09 +0000)
* cgen-opc.c (cgen_keyword_add): Ignore special first
character when building nonalpha_chars field.

opcodes/ChangeLog
opcodes/cgen-asm.c
opcodes/cgen-opc.c

index e449b79d5060cad53a65682b44c61d9c05da4c93..d7dc563fa2316b07890055cc51369ca95c99207f 100644 (file)
@@ -1,3 +1,9 @@
+2001-06-28  Geoffrey Keating  <geoffk@redhat.com>
+
+       * 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  <bje@redhat.com>
 
        * m88k-dis.c: Format to conform to GNU coding standards.
index 315b802f71d87cc0ce98d25fd31083a700a1781d..7bb29ca9867c6c8ab525b107569db6172d48b641 100644 (file)
@@ -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
index f159943fa326944f211ba70783c84d9897c166b0..188a157f3a193bc1123525affce32d5ff2044144 100644 (file)
@@ -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]))
       {
This page took 0.072142 seconds and 4 git commands to generate.