This is the mail archive of the 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: [RFC] msp430 instruction decoder

On Wednesday 22 May 2013 06:13:26 nick clifton wrote:
> >> +typedef struct
> >> +{
> >> +  MSP430_Opcode_Decoded * msp430;
> > 
> > shouldn't the style be:
> > 	MSP430_Opcode_Decoded *msp430;
> > 
> > seems like general style guidelines are violated a lot in this file.  do
> > we normally ignore that in the opcodes/ tree ?
> No, and I have revised the formatting in the patch files.  They do now
> conform to the GNU Coding Standard.  Note - the msp430-decode.opc file
> includes some comments that do not quite conform to the standard.  This
> is because these comments are directives to the opc2c program and need
> to remain in their current format.
> Do you have any more concerns with this patch ?

style around MSP430_Opcode_Operand struct decl in the header needs a little 

the .opc could do with a little tweaking:
 - space before () in the B define when calling GETBYTE
 - should OP and OPX have spaces after each comma in the arg list ?  seems to 
happen with a bunch of other macros too ...
 - OP and OPX should also not have a space before the final )
 - indentation after UNSUPPORTED and IMMU and IMMS should prob be tabs and not 
 - F_____ (and the two after it) have a tab after the #define rather than a 
 - in msp430_decode_opcode, are the multiple macro calls on the same line on 
purpose, or should those get fixed to be one per line ?  for example:
  ID (dopc_to_id (dopc)); ASX (sreg, as, srxt_bits); ADX (dreg, a, dsxt_bits); 
ABW (al_bit, b);

the heavy macro usage is understandable in these sorts of things and common

Attachment: signature.asc
Description: This is a digitally signed message part.

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