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 Fri, Feb 02, 2007 at 04:37:37PM -0800, H. J. Lu wrote:
> 2076-02-02  H.J. Lu  <hongjiu.lu@intel.com>
  ^^^^
May I borrow your time machine please?

> 	* i386-dis.c (OP_J): Only mask to 16bit if there is a data16
> 	prefix.
> 
> --- binutils/ld/testsuite/ld-i386/pcrel16.d.disp	2006-01-18 13:07:49.000000000 -0800
> +++ binutils/ld/testsuite/ld-i386/pcrel16.d	2007-02-02 15:22:36.000000000 -0800
> @@ -12,4 +12,4 @@ Disassembly of section .text:
>       420:	cd 42[ 	]+int    \$0x42
>       422:	ca 02 00[ 	]+lret   \$0x2
>  	...
> -    f065:	e9 b8 13[ 	]+jmp    420 <_start\+0x420>
> +    f065:	e9 b8 13[ 	]+jmp    10420 <__bss_start\+0x3b8>
                                         ^^^^^
What does a 16-bit processor, or a 32 or 64-bit one in 16-bit mode, know
of addresses greater than 0xffff?

I don't understand under which circumstances it is ever correct to
disassemble a jump target to greater than 0xffff if it is known to be a
16-bit displacement.  Can you explain to me when this would be correct?

- -- 
Problems experienced downstream are symptoms of neglect upstream.
Upstream problems can only be solved upstream. - someone
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFxu8FwyMv24BBd/gRAg9cAJ9pafwIyP/SYJMFSnUewbLbdcIPzwCfUoT1
QUzqpUMtt3x9vgmXg3C8k64=
=sC/a
-----END PGP SIGNATURE-----


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