* cgen-asm.c (cgen_parse_keyword): If the keyword is too big to
authorRichard Sandiford <rdsandiford@googlemail.com>
Fri, 9 Nov 2001 18:05:30 +0000 (18:05 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Fri, 9 Nov 2001 18:05:30 +0000 (18:05 +0000)
fit in the buffer, try to match the empty keyword.

opcodes/ChangeLog
opcodes/cgen-asm.c

index a3191831e653a37100406adf1ce3204fbf205e70..b0641202a8904c410603a7da6b0bc866994b1bf7 100644 (file)
@@ -1,3 +1,8 @@
+2001-11-09  Richard Sandiford  <rsandifo@redhat.com>
+
+       * cgen-asm.c (cgen_parse_keyword): If the keyword is too big to
+       fit in the buffer, try to match the empty keyword.
+
 2001-11-09  Nick Clifton  <nickc@cambridge.redhat.com>
 
        * cgen-ibld.in (extract_1): Fix badly placed #if 0.
index b664d7bc8bf40c72cee275d6747170a6f169e59c..05b62bf49e1926830e1ccd0a399d82c176e68413 100644 (file)
@@ -229,10 +229,16 @@ cgen_parse_keyword (cd, strp, keyword_table, valuep)
     ++p;
 
   if (p - start >= (int) sizeof (buf))
-    return _("unrecognized keyword/register name");
-
-  memcpy (buf, start, p - start);
-  buf[p - start] = 0;
+    {
+      /* All non-empty CGEN keywords can fit into BUF.  The only thing
+        we can match here is the empty keyword.  */
+      buf[0] = 0;
+    }
+  else
+    {
+      memcpy (buf, start, p - start);
+      buf[p - start] = 0;
+    }
 
   ke = cgen_keyword_lookup_name (keyword_table, buf);
 
This page took 0.038113 seconds and 4 git commands to generate.