* Patch to report the illegal operand errors in gas/mips.
@ 2001-06-06 9:50 H . J . Lu
0 siblings, 0 replies; only message in thread
From: H . J . Lu @ 2001-06-06 9:50 UTC (permalink / raw)
To: binutils; +Cc: linux-mips
When you have an illegal operand, you will get a bogus error message
saying "opcode not supported on this processor: xxx". This patch fixes
it.
---
2001-06-06 H.J. Lu <hjl@gnu.org>
* gas/config/tc-mips.c (mips_ip): Properly report the illegal
operand errors.
--- gas/config/tc-mips.c.diag Tue Jun 5 20:28:20 2001
+++ gas/config/tc-mips.c Tue Jun 5 20:46:50 2001
@@ -7087,19 +7087,25 @@ mips_ip (str, ip)
}
else
{
- static char buf[100];
- sprintf (buf,
- _("opcode not supported on this processor: %s (%s)"),
- mips_cpu_to_str (mips_cpu),
- mips_isa_to_str (mips_opts.isa));
+ if (!insn_error)
+ {
+ static char buf[100];
+ sprintf (buf,
+ _("opcode not supported on this processor: %s (%s)"),
+ mips_cpu_to_str (mips_cpu),
+ mips_isa_to_str (mips_opts.isa));
- insn_error = buf;
+ insn_error = buf;
+ }
+ if (save_c)
+ *(--s) = save_c;
return;
}
}
ip->insn_mo = insn;
ip->insn_opcode = insn->match;
+ insn_error = NULL;
for (args = insn->args;; ++args)
{
if (*s == ' ')
@@ -7940,8 +7946,11 @@ mips_ip (str, ip)
{
++insn;
s = argsStart;
+ insn_error = _("illegal operands");
continue;
}
+ if (save_c)
+ *(--s) = save_c;
insn_error = _("illegal operands");
return;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-06-06 9:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-06 9:50 Patch to report the illegal operand errors in gas/mips H . J . Lu
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).