This is the mail archive of the binutils@sourceware.org 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: [PATCH] MIPS: Make the CODE10 operand code consistent between ISAs


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


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