* cgen-asm.c (cgen_parse_keyword): If the keyword is too big to
fit in the buffer, try to match the empty keyword.
This commit is contained in:
parent
f312f05740
commit
b165b83891
2 changed files with 15 additions and 4 deletions
|
@ -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.
|
||||
|
|
|
@ -229,10 +229,16 @@ cgen_parse_keyword (cd, strp, keyword_table, valuep)
|
|||
++p;
|
||||
|
||||
if (p - start >= (int) sizeof (buf))
|
||||
return _("unrecognized keyword/register name");
|
||||
|
||||
{
|
||||
/* 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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue