* cgen opcodes/asm patch
@ 2000-12-28 11:51 Frank Ch. Eigler
0 siblings, 0 replies; only message in thread
From: Frank Ch. Eigler @ 2000-12-28 11:51 UTC (permalink / raw)
To: binutils, cgen
Hi -
I'm about to commit a small patch to opcodes/cgen-asm.in, intended to
improve the error message for an instruction that lacks required operands.
2000-12-28 Frank Ch. Eigler <fche@redhat.com>
* cgen-asm.in (parse_insn_normal): Print better error message for
instructions with missing operands.
Index: cgen-asm.in
===================================================================
RCS file: /cvs/src/src/opcodes/cgen-asm.in,v
retrieving revision 1.2
diff -c -p -r1.2 cgen-asm.in
*** cgen-asm.in 2000/12/13 18:55:02 1.2
--- cgen-asm.in 2000/12/28 19:49:49
*************** parse_insn_normal (cd, insn, strp, field
*** 127,139 ****
++ syn;
++ str;
}
! else
{
/* Syntax char didn't match. Can't be this insn. */
static char msg [80];
/* xgettext:c-format */
sprintf (msg, _("syntax error (expected char `%c', found `%c')"),
*syn, *str);
return msg;
}
continue;
--- 127,148 ----
++ syn;
++ str;
}
! else if (*str)
{
/* Syntax char didn't match. Can't be this insn. */
static char msg [80];
/* xgettext:c-format */
sprintf (msg, _("syntax error (expected char `%c', found `%c')"),
*syn, *str);
+ return msg;
+ }
+ else
+ {
+ /* Ran out of input. */
+ static char msg [80];
+ /* xgettext:c-format */
+ sprintf (msg, _("syntax error (expected char `%c', found end of instruction)"),
+ *syn);
return msg;
}
continue;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-12-28 11:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-28 11:51 cgen opcodes/asm patch Frank Ch. Eigler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).