[committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
Michael Matz
matz@suse.de
Tue May 12 15:14:00 GMT 2015
Hi,
On Tue, 12 May 2015, H.J. Lu wrote:
> >> 2. Can you speculate what
> >>
> >> " jmpw 4"
> >>
> >> does?
> >
> > It should do a jump to $nextip+offset, of course, just like a 32bit
> > jump. The disassembly is correct, because with a zero offset, that's
> > indeed '4'.
>
> I thought it did jump to "(nextip + offset) & 0xffff" on AMD. Can you
> verify if it is true?
Sorry, yes, this is true, the 16bit operand size prefix truncates RIP to
16 bit. Nevertheless it's a valid instruction and works as documented.
Ciao,
Michael.
More information about the Binutils
mailing list