This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 13/20] MIPS/GAS: Improve instruction's mnemonic processing
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: "Maciej W. Rozycki" <macro at codesourcery dot com>
- Cc: Catherine Moore <clm at codesourcery dot com>, binutils at sourceware dot org
- Date: Tue, 07 Dec 2010 11:04:57 +0000
- Subject: Re: [PATCH 13/20] MIPS/GAS: Improve instruction's mnemonic processing
- References: <alpine.DEB.1.10.1012020129260.14129@tp.orcam.me.uk>
Patches 11 and 12 OK.
>> You could use alloca to create an opcode without the "16" or "32",
>> which would make the error-reporting code simpler. It's best not
>> to change the user's source line if we can help it.
>
> I have made a complementing adjustment to original code currently present
> in mips_ip(), making the whole piece much simpler and less fragile.
>
> 2010-12-02 Maciej W. Rozycki <macro@codesourcery.com>
>
> gas/
> * config/tc-mips.c (mips_ip): Make a copy of the instruction's
> mnemonic and use it for further processing.
This patch doesn't preserve the current behaviour.
The current code treats the text after the "." as the first thing that
should be matched against the format string. I assume it dates back to
a time when certain types of operand suffix were handled using format
characters. (Maybe the floating-point condition codes and formats?)
This meant that things like:
addu.$4,$5,$6
were also acceptable, although of course:
c.eq.d.$f0,$f2
wasn't.
The patch instead ignores everything after the ".", which means that
we'd accept stuff like:
addu.foobar $4,$5,$7
(although again not "c.eq.d.foobar").
I think we can simply remove the dot check. I don't see any testsuite
regressions after doing that.
Richard