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: tc-m68k.c portability patch



On 5 May 2001, Andreas Schwab wrote:

> 	* config/tc-m68k.c (md_convert_frag_1): Don't set fx_pcrel_adjust
> 	to a negative number.

OK I suppose.  I've never liked that particular trick in tc-m68k.c, and
feel it would be better to assign -1 to fx_pcrel_adjust, then explicitly
sign extend the (possibly unsigned) char where it is used.  ie. instead of

  adjust = fixP->fx_pcrel_adjust;
  if (adjust == 64)
    adjust = -1;

write

  adjust = ((fixP->fx_pcrel_adjust & 0xff) ^ 0x80) - 0x80;

and similarly in tc_gen_reloc.  If you feel so motivated, consider such a
patch pre-approved.  You know what you're doing with m68k, in fact I
reckon you should put your hand up to be binutils m68k maintainer.  ;-)

Errm, apologies if we already have a 68k maintainer who is too shy to put
their name in MAINTAINERS.

-- 
Alan Modra


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