This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] MIPS: Make the CODE10 operand code consistent between ISAs
- From: "Maciej W. Rozycki" <macro at codesourcery dot com>
- To: Richard Sandiford <rdsandiford at googlemail dot com>
- Cc: <binutils at sourceware dot org>
- Date: Tue, 26 Aug 2014 13:55:04 +0100
- Subject: Re: [PATCH] MIPS: Make the CODE10 operand code consistent between ISAs
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 1 dot 10 dot 1408211234210 dot 2958 at tp dot orcam dot me dot uk> <87tx50z3h8 dot fsf at googlemail dot com>
On Mon, 25 Aug 2014, Richard Sandiford wrote:
> > This change therefore moves the microMIPS 10-bit immediate code embedded
> > at bits 25..16 in the SYSCALL, WAIT, SDBBP and HYPCALL instructions from
> > `B' over to `+J' which is the operand code used in the standard MIPS
> > instructions set for the same instruction field, used by HYPCALL only in
> > that set.
>
> Well, it seems like matching by purpose vs. matching by field position.
> E.g. "s"/RS is in a different position for microMIPS vs. MIPS, so if we
> were going to apply that logic consistently, the microMIPS RS fields
> would use "t"/RT instead.
Actually I got the description wrong for some reason, likely by looking
at the wrong code or manual and not realising that. Sorry about that.
The field position is actually different, bits 25..16 for the microMIPS
encoding vs bits 20..11 for the standard MIPS encoding. The purpose is
however the same, i.e. an uninterpreted 10-bit immediate code embedded in
the instruction.
We also use "q" to denote an uninterpreted 10-bit immediate code embedded
in standard MIPS trap instructions (TEQ, etc.), but that is shared with
and reuses the exact bit position of the historically-created 10-bit high
part of the standard MIPS BREAK instruction code, so I don't think it's
suitable here. And also given the HYPCALL instruction staying away from
"q" and being in both instruction sets after my change.
> But I suppose I don't mind either way, so if you feel strongly about it,
> the patch is OK.
Given that it matches your expectation after all and that you didn't mind
anyway I have applied this change now, with a small obvious tweak that I
should have done originally, that is capitalised instruction names being
addressed in include/opcode/mips.h. I have applied the other two patches
too, thanks for your review.
Maciej