This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- From: "Jan Beulich" <JBeulich at suse dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: "Maciej W. Rozycki" <macro at linux-mips dot org>, "Binutils" <binutils at sourceware dot org>,"Michael Matz" <matz at suse dot de>
- Date: Fri, 15 May 2015 07:39:30 +0100
- Subject: Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Authentication-results: sourceware.org; auth=none
- References: <20150511212331 dot GA1838 at intel dot com> <55520C440200007800079718 at mail dot emea dot novell dot com> <CAMe9rOpOx=SSUZnCFimn4fBzFqNRDch8QYLn3Os_y7EfQH65Qw at mail dot gmail dot com> <5552318402000078000798A8 at mail dot emea dot novell dot com> <CAMe9rOoqcr7aE8dr6E44KUK6JLrNMNcDNFFWhcb6K+14M=Y+=w at mail dot gmail dot com> <555233B602000078000798EF at mail dot emea dot novell dot com> <CAMe9rOrOS+K0R+r1jHCNwAkgrhjftHUOGt_wTuP8wRYcPdifmQ at mail dot gmail dot com> <555235930200007800079911 at mail dot emea dot novell dot com> <alpine dot LSU dot 2 dot 20 dot 1505121736050 dot 4883 at wotan dot suse dot de> <CAMe9rOo76QirYvEH=tX7BDBws3z=g0O8c+A1wSp+19yaNXUk1w at mail dot gmail dot com> <alpine dot LSU dot 2 dot 20 dot 1505121745550 dot 27315 at wotan dot suse dot de> <CAMe9rOqM+cojMqoz9Kwb_KedgZG-14_xFaV2mk=hNEQGUkDWVw at mail dot gmail dot com> <alpine dot LSU dot 2 dot 20 dot 1505121803030 dot 27315 at wotan dot suse dot de> <CAMe9rOqECoP=-Bz4neR1LnFsnPO94axMuSpEiOzjmJzbNgA_kA at mail dot gmail dot com> <alpine dot LSU dot 2 dot 20 dot 1505131430230 dot 27315 at wotan dot suse dot de> <CAMe9rOrjt5e8qqOqqCOsuDfhtVSb2atwiqoF5HN_3aSBzsOgyQ at mail dot gmail dot com> <alpine dot LFD dot 2 dot 11 dot 1505131738000 dot 1538 at eddie dot linux-mips dot org> <CAMe9rOo-K21Gs9prT6Tb4nX80VRi2bA26mGonnr7=vt8W1NFKA at mail dot gmail dot com>
>>> On 13.05.15 at 18:53, <hjl.tools@gmail.com> wrote:
> On Wed, May 13, 2015 at 9:50 AM, Maciej W. Rozycki <macro@linux-mips.org>
> wrote:
>> On Wed, 13 May 2015, H.J. Lu wrote:
>>
>>> >> > Well, what do you suggest? Your change is clearly wrong as well.
>>> >>
>>> >> I won't call it wrong since it implies there is a right.
>>> >
>>> > Of course there is a right. The x86-64 specification is quite clear what
>>> > happens with the prefix on jumps. Intel CPUs are simply buggy in not
>>> > implementing it. And you're making binutils follow that buggy behaviour.
>>>
>>> AMD64 and Intel64 differ in some subtle ways.
>>>
>>> > And that is wrong. The associated bug report is invalid.
>>>
>>> How about this
>>>
>>> 1. Add flavors of AMD64 and Intel64 to assembler. Make the most
>>> permissive one as the default. In case of call/jmp, the default will
>>> take AMD64.
>>> 2. Add -Mintel64/-Mamd64 to objdump, Make the most permissive
>>> ones the default.
>>
>> FWIW I think this will be the right direction, though the exact options
>> may have to be discussed yet.
>>
>> The assembler is a tool, it should not be forcing a use policy upon
>> users. Therefore it should allow whatever is encodable given the
>> instruction set definition and let users decide themselves how to use
>> it, whether implementations follow the rules or not.
>>
>> And then if you want to add safety traps such as for this difference
>> between individual model implementations, then wire them to `-march=' or
>> suchlike.
>
> Thanks for your feedbacks. I am waiting for feedbacks from Jan and
> Michael before I start investigation.
Not sure what else feedback you expect - after all I had suggested
the introduction of command line options or alike to control the
specific behavior. All I'm really after is that without any such override
given behavior remain like what it is in 2.25.
Jan
- References:
- [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches