This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Gas patch for reading alternate forms of MIPS coprocessor registernames, take 2
- From: Matt Hiller <hiller at redhat dot com>
- To: <cgd at broadcom dot com>
- Cc: Eric Christopher <echristo at redhat dot com>, <binutils at sources dot redhat dot com>
- Date: Thu, 20 Jun 2002 17:33:14 -0700 (PDT)
- Subject: Re: Gas patch for reading alternate forms of MIPS coprocessor registernames, take 2
On 20 Jun 2002 cgd@broadcom.com wrote:
> At Thu, 20 Jun 2002 20:10:54 +0000 (UTC), "Matt Hiller" wrote:
> > * A check that the proper coprocessor number is referenced in the regname.
>
> For this test, wouldn't it be better to check that the cop name (cN)
> is the last 2 chars of the insn name? There are no exceptions to that
> rule in the opcodes table that I can currently see (of operations
> which use these operand types).
That would be one way of doing things; something along the lines of:
if (strcmp (insn->name + strlen (insn->name) - 2), needle))
insn_error ...
but doing:
if (!strstr (insn->name, needle))
insn_error ...
should be close enough for our purposes. There are some non-coprocessor
instructions whose mnemonics include "c[0-3]", but none of them have
operands of type 'E' or 'G'.
> A bit of an aside, but do you know why the c3 ops seem to generate
> delay slot nops? (That seems a little ... non-intuitive to me.)
I don't really know. Haven't stepped through the execution path with
gdb to figure out exactly what's going on there, but I may check it
out if curiosity gets the better of me.
Matt
--
Matt Hiller
GCC Engineer, Red Hat, Inc., Sunnyvale office
hiller@redhat.com