From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13030 invoked by alias); 12 May 2015 16:03:38 -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 12922 invoked by uid 89); 12 May 2015 16:03:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 12 May 2015 16:03:37 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C4653ABE6; Tue, 12 May 2015 16:03:33 +0000 (UTC) Date: Tue, 12 May 2015 16:03:00 -0000 From: Michael Matz To: "H.J. Lu" cc: Jan Beulich , Binutils Subject: Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches In-Reply-To: Message-ID: References: <20150511212331.GA1838@intel.com> <5551F4E70200007800079575@mail.emea.novell.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> User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00101.txt.bz2 Hi, On Tue, 12 May 2015, H.J. Lu wrote: > On Tue, May 12, 2015 at 8:47 AM, Michael Matz wrote: > > Hi, > > > > On Tue, 12 May 2015, H.J. Lu wrote: > > > >> > Actually also that one is correctly printed I think (from a hello world > >> > main, where I added a jmprel16 +0): > >> > > >> > 000000000040055c
: > >> > 40055c: 55 push %rbp > >> > 40055d: 48 89 e5 mov %rsp,%rbp > >> > 400560: 48 83 ec 30 sub $0x30,%rsp > >> > 400564: c6 45 d1 00 movb $0x0,-0x2f(%rbp) > >> > 400568: c6 45 d0 61 movb $0x61,-0x30(%rbp) > >> > 40056c: 48 8d 45 d0 lea -0x30(%rbp),%rax > >> > 400570: 48 89 c2 mov %rax,%rdx > >> > 400573: be 44 06 40 00 mov $0x400644,%esi > >> > 400578: 66 e9 00 00 jmpw 57c <_init-0x3ffe8c> > >> > > >> > 000000000040057c : > >> > 40057c: bf 52 06 40 00 mov $0x400652,%edi > >> > ... > >> > > >> > It shows that rip is going to be truncated. > >> > > >> > >> This is the same issue as > >> > >> https://sourceware.org/bugzilla/show_bug.cgi?id=18386 > >> > >> On Intel processors, 0x66 prefix before direct 32-bit unconditional > >> call/jmp is ignored. Whatever we do is wrong on AMD or Intel > >> processors. > > > > Well, in that case I'd say the correct thing to do is to _not_ do any > > This is NO correct thing to do. Well, what do you suggest? Your change is clearly wrong as well. Ciao, Michael.