* [PATCH 20/20] MIPS/GAS: Remove dead format specifier code
@ 2010-12-02 19:25 Maciej W. Rozycki
2010-12-07 11:43 ` Richard Sandiford
0 siblings, 1 reply; 3+ messages in thread
From: Maciej W. Rozycki @ 2010-12-02 19:25 UTC (permalink / raw)
To: Richard Sandiford; +Cc: Catherine Moore, binutils
Hi,
This change removes unreachable code -- at this point c may only be one
of: 'b', 'd', 's', 't', 'r', 'v', 'w', 'E', 'K', 'x', 'z', 'U' or 'g' as
selected by the switch case this piece of code is contained within. This
observation also invalidates the comment included -- given the limited set
of choices as quoted above c cannot contain "other operands like 'i'."
2010-12-02 Maciej W. Rozycki <macro@codesourcery.com>
gas/
* config/tc-mips.c (mips_ip): Remove dead format specifier code.
OK to apply?
Maciej
binutils-gas-mips-ip-reg-dead.diff
Index: binutils-fsf-trunk-quilt/gas/config/tc-mips.c
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/config/tc-mips.c 2010-12-01 21:05:59.000000000 +0000
+++ binutils-fsf-trunk-quilt/gas/config/tc-mips.c 2010-12-01 21:05:59.000000000 +0000
@@ -9506,7 +9506,6 @@ mips_ip (char *str, struct mips_cl_insn
INSERT_OPERAND (RS, *ip, regno);
break;
case 'd':
- case 'G':
case 'K':
case 'g':
INSERT_OPERAND (RD, *ip, regno);
@@ -9535,11 +9534,6 @@ mips_ip (char *str, struct mips_cl_insn
is $0. This only matches $0, and is checked
outside the switch. */
break;
- case 'D':
- /* Itbl operand; not yet implemented. FIXME ?? */
- break;
- /* What about all other operands like 'i', which
- can be specified in the opcode table? */
}
lastregno = regno;
continue;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 20/20] MIPS/GAS: Remove dead format specifier code
2010-12-02 19:25 [PATCH 20/20] MIPS/GAS: Remove dead format specifier code Maciej W. Rozycki
@ 2010-12-07 11:43 ` Richard Sandiford
2010-12-10 0:38 ` Maciej W. Rozycki
0 siblings, 1 reply; 3+ messages in thread
From: Richard Sandiford @ 2010-12-07 11:43 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: Catherine Moore, binutils
"Maciej W. Rozycki" <macro@codesourcery.com> writes:
> gas/
> * config/tc-mips.c (mips_ip): Remove dead format specifier code.
OK, thanks. I wonder if the 'G' confusion came from someone misinterpreting:
if (ok)
{
lastregno = regno;
continue;
}
else
break;
as fallthrough?
if (ok)
{
lastregno = regno;
continue;
}
break;
would be more usual. Maybe I'll tweak it after the microMIPS stuff
has gone in.
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 20/20] MIPS/GAS: Remove dead format specifier code
2010-12-07 11:43 ` Richard Sandiford
@ 2010-12-10 0:38 ` Maciej W. Rozycki
0 siblings, 0 replies; 3+ messages in thread
From: Maciej W. Rozycki @ 2010-12-10 0:38 UTC (permalink / raw)
To: Richard Sandiford; +Cc: Catherine Moore, binutils
On Tue, 7 Dec 2010, Richard Sandiford wrote:
> > gas/
> > * config/tc-mips.c (mips_ip): Remove dead format specifier code.
>
> OK, thanks. I wonder if the 'G' confusion came from someone misinterpreting:
>
> if (ok)
> {
> lastregno = regno;
> continue;
> }
> else
> break;
>
> as fallthrough?
Yes, this well could be indeed, good point. I haven't thought about this
arrangement being a possible cause.
Another possibility is simply a remnant from before cooked CP0 register
names were introduced -- I would expect 'G' to have been handled like 'd'
back then without dedicated outermost switch statement's case code.
> if (ok)
> {
> lastregno = regno;
> continue;
> }
> break;
>
> would be more usual. Maybe I'll tweak it after the microMIPS stuff
> has gone in.
Well, I have actually removed the oddity with the microMIPS patch as the
case had to be heavily tweaked anyway. I also removed a couple of similar
oddities, where a "break" or "continue" was included at the end in a block
rather than following it within the microMIPS patch itself, but I have
just noticed a couple escaped me. I'll clean them up as well as they may
make one wonder if the closing brace is the end of a (misindented)
compound selection or iteration statement.
Maciej
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-10 0:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-02 19:25 [PATCH 20/20] MIPS/GAS: Remove dead format specifier code Maciej W. Rozycki
2010-12-07 11:43 ` Richard Sandiford
2010-12-10 0:38 ` Maciej W. Rozycki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).