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: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Maciej W. Rozycki" <macro at linux-mips dot org>
- Cc: Michael Matz <matz at suse dot de>, Jan Beulich <JBeulich at suse dot com>, Binutils <binutils at sourceware dot org>
- Date: Wed, 13 May 2015 09:53:42 -0700
- 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>
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.
--
H.J.
- 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