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: [committed, PATCH] PR binutis/18386: callw with 0x66 prefix incorrectly disassembled in 64-bit mode


>>> On 09.05.15 at 15:52, <hjl.tools@gmail.com> wrote:
> The operand size prefix (0x66) is ignored for 32-bit PC-relative call,
> jmp and jcc in 64-bit mode.

Now that's again a change that should have been discussed
before committing: While it is correct for the Intel implementation
of x86-64, it isn't for AMD's original (and I'd tend to say that the
latter is more correct, since afaik there's nowhere that exceptions
are being made for the meaning of the operand size prefix).

Apart from that I find it odd that you mention only 32-bit PC-relative
branches when the same behavioral difference also applies to 8-bit
displacement ones as well as near branches to absolute addresses
(including returns). And of course there are more differences
elsewhere. Perhaps this should be hidden behind an option to
select the flavor, defaulting (imo) to the original AMD behavior.

Jan


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