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: PATCH: Fix i8086 disassembler for 16bit displacements


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Feb 05, 2007 at 10:03:40AM -0800, H. J. Lu wrote:
> 2076-02-05  H.J. Lu  <hongjiu.lu@intel.com>
  ^^^^
There's something wrong with your clock, and it's in CVS too now.

> 	* i386-dis.c (OP_J): Undo the last change. Properly handle 64K
> 	wrap around with the same segment in 16bit mode.

I still don't like the change but I can live with it.  If the current
displacement is greater than 0xffff, then we already know that the
notions of bfd "section" and i8086 "segment" don't map to each other
neatly.  So somehow you have to infer where the segments begin and end.

How do you know where the code segment boundaries are?  They could be at
multiples of 0x10000, in which case your patch is good, but we don't
know that that will be the case - the boundaries have to be only
multiples of 0x10!

Ugh, it's a messy situation which perhaps has no answer that is always
correct.  Any guess to where the boundaries are will be wrong in some
situation.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFx4HrwyMv24BBd/gRAkEOAJ9GOqbYxuOSU00oLS7hCXK4VW7ccACfZgMO
k4PNij44hJ+vQWS7RvJIfb0=
=UMLL
-----END PGP SIGNATURE-----


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