This is the mail archive of the
mailing list for the binutils project.
Re: Small gas patch for reading alternate forms of MIPS coprocessorregister names
- From: Matt Hiller <hiller at redhat dot com>
- To: cgd at broadcom dot com
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 29 Apr 2002 12:51:33 -0700 (PDT)
- Subject: Re: Small gas patch for reading alternate forms of MIPS coprocessorregister names
On 23 Apr 2002 email@example.com wrote:
> (1) you should only allow the coprocessor named in the reg name to be
> the coprocessor that's correct for the instruction in question.
> i.e., "mtc1 $1, $c0r7" should be right out. 8-)
> The opcodes in the instruction table which use copN regs are
> marked with appropriate flags. I believe you can check those
There are WR_C0, RD_C2, etc. flags that can be part of an instruction's
pinfo, but they all define to the same value, INSN_COP. And there don't
seem to be any spare pinfo bits to play with... phooey. Should I just
check INSN_COP at first, then peek at the insn directly to determine which
coprocessor its looking at?
> (2) personally, I'd strongly encourage you to provide at least a small
> test case for the binutils test suite, which covers the following:
> * for each operand type letter you use, all valid
> coprocessors. (i.e., at least one insn using a 'G' spec for
> each coprocessor, one instruction using an 'E' spec for each
> coprocessor which has such an instruction.)
> * if you're feeling nice, create a test using run_list_test
> which checks for a least a few errors of the form
> where the coprocessor used doesn't match the instruction.