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: Why aren't we consistent on displacement in x86 disassembler?


On Thu, Apr 26, 2007 at 05:00:14PM +0100, Jan Beulich wrote:
> >>> "H. J. Lu" <hjl@lucon.org> 26.04.07 17:54 >>>
> >On Thu, Apr 26, 2007 at 04:36:25PM +0100, Jan Beulich wrote:
> >> >We can do one of
> >> >
> >> >1. Use decimal on all 8bit displacements and hex on all 16/32bit
> >> >displacement.
> >> >2. Use hex on all displacements.
> >> >
> >> >Any comments?
> >> 
> >> I'd prefer option 2. Jan
> >
> >I have another idea. We use decimal on all displacements which
> >can be fitted in 8 bits since -128 is easier to read than
> >0xffffff80 and is what is in the original assembly code anyway.
> 
> Hmm, I'd prefer hex nevertheless? How about -0x80? (In a private disassembler
> library I have, I'd even use ~0x7f here when the immediate is an operand of an
> instruction doing bitwise operation.)

Are you suggesting we display all displacements as signed hex? It
works for me.


H.J.


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