This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Small gas patch for reading alternate forms of MIPScoprocessor register names


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]