This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Why aren't we consistent on displacement in x86 disassembler?
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
Consistency is good, but print_operand_value isn't very nice. eg. a
displacement of -4 in hex is printed as 0xfffffffc (and even more f's
if 64-bit). If we go to all hex, I'd like to see 8 bit displacements
printed as signed hex numbers, eg. 0xe8 prints as -0x18. Perhaps you
could drop the 0x on values of -9 to 9.
--
Alan Modra
IBM OzLabs - Linux Technology Centre