This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Small gas patch for reading alternate forms of MIPScoprocessor register names
- From: cgd at broadcom dot com
- To: hiller at redhat dot com
- Cc: binutils at sources dot redhat dot com
- Date: 23 Apr 2002 18:05:17 -0700
- Subject: Re: Small gas patch for reading alternate forms of MIPScoprocessor register names
- References: <Pine.LNX.4.21.0204231719180.22528-100000@breve.cygnus.com><mailpost.1019607785.14243@news-sj1-1>
At Wed, 24 Apr 2002 00:23:05 +0000 (UTC), "Matt Hiller" wrote:
> This patch is needed for work that I'm doing on gcc right now; there are
> tests in the gcc testsuite that test its functionality. Okay to apply?
Umm, a couple of comments here:
(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
flags.
(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.
While the GCC testsuite is nice, I don't really consider it adequate
for changes like these, and would like to see more simple tests for
basic correctness in binutils.
chris