This is the mail archive of the binutils@sources.redhat.com 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]

Re: CGEN patch


Hi Richard,

: This is a cgen-related binutils patch.  Uncertain of the etiquette,
: I'm posting it to both the cgen and binutils lists.

This is the right thing to do.  The bfd parts of the patch need to be
approved by a binutils maintainer and the cgen parts by a cgen
maintainer.  Since the cgen parts require the bfd parts, posting them
together is the right approach.

: 2000-12-21  Richard Sandiford  <rsandifo@redhat.com>
: 
: 	* libbfd.c (bfd_get_bits): Added
: 	(bfd_put_bits): Likewise
: 	* bfd-in.h: Declared the above.

Approved and applied.

A couple of minor formatting points:

: + /* Byte swapping routines which take size and endiannes as arguments. */

Two spaces at the end of a comment.

: + bfd_vma bfd_get_bits PARAMS ((bfd_byte *, int, boolean));
: + void bfd_put_bits PARAMS ((bfd_vma, bfd_byte *, int, boolean));
: + 
:   

There is no need for a blank line before the ^L.

: +   if (bits % 8 != 0)
: +     abort();

A space between the function name and the opening parenthesis.

: +       int index = big_p? bytes - i - 1 : i;
: +       addr[index] = (bfd_byte) data;

A blank line between the declaration of variables and the start of the
statements.


One other point - bfd-in.h is used to generate bfd-in2.h, so in your
ChangeLog entry you ought to include:

	  bfd-in2.h: Regenerate.

(And of course if you were checking in this patch yourself you would
need to make sure that you did regenerate bfd-in2.h).

I will leave the cgen parts of you your patch to be approved by a cgen
maintainer.

Cheers
	Nick

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