From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12100 invoked by alias); 13 May 2015 13:32:35 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 12077 invoked by uid 89); 13 May 2015 13:32:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f52.google.com Received: from mail-oi0-f52.google.com (HELO mail-oi0-f52.google.com) (209.85.218.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 13 May 2015 13:32:34 +0000 Received: by oica37 with SMTP id a37so31053421oic.0 for ; Wed, 13 May 2015 06:32:31 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.59.106 with SMTP id y10mr16094512oeq.45.1431523951809; Wed, 13 May 2015 06:32:31 -0700 (PDT) Received: by 10.76.54.14 with HTTP; Wed, 13 May 2015 06:32:31 -0700 (PDT) In-Reply-To: References: <20150511212331.GA1838@intel.com> <55520C440200007800079718@mail.emea.novell.com> <555216370200007800079773@mail.emea.novell.com> <5552318402000078000798A8@mail.emea.novell.com> <555233B602000078000798EF@mail.emea.novell.com> <555235930200007800079911@mail.emea.novell.com> Date: Wed, 13 May 2015 13:32:00 -0000 Message-ID: Subject: Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches From: "H.J. Lu" To: Michael Matz Cc: Jan Beulich , Binutils Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00117.txt.bz2 On Wed, May 13, 2015 at 5:34 AM, Michael Matz wrote: > Hi, > > On Tue, 12 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. >> Given that >> >> 0x66 jmp/call rel32 >> >> works on Intel processors and crashes on AMD processors. >> I will keep my change in unlessl someone can show a real usage of >> >> 066 jmp/call rel16 >> >> on AMD processors. > > Huh, what? I must say I'm not very fond of your way of maintaining the > x86-64 binutils. > I am keen to improve. Pleas feel free to point outs things I should work on. Thanks. -- H.J.