From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19002 invoked by alias); 14 Jan 2005 00:59:38 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 18332 invoked from network); 14 Jan 2005 00:59:21 -0000 Received: from unknown (HELO gizmo04bw.bigpond.com) (144.140.70.14) by sourceware.org with SMTP; 14 Jan 2005 00:59:21 -0000 Received: (qmail 28728 invoked from network); 14 Jan 2005 00:59:18 -0000 Received: from unknown (HELO bwmam12.bigpond.com) (144.135.24.103) by gizmo04bw.bigpond.com with SMTP; 14 Jan 2005 00:59:18 -0000 Received: from cpe-144-136-221-26.sa.bigpond.net.au ([144.136.221.26]) by bwmam12.bigpond.com(MAM REL_3_4_2a 189/40177774) with SMTP id 40177774; Fri, 14 Jan 2005 10:59:18 +1000 Received: by bubble.modra.org (Postfix, from userid 500) id 6705DFA29F; Fri, 14 Jan 2005 11:29:18 +1030 Date: Fri, 14 Jan 2005 00:59:00 -0000 From: Alan Modra To: "H. J. Lu" Cc: "Allan B. Cruse" , binutils@sources.redhat.com, gcc@gcc.gnu.org, GNU C Library Subject: Re: PATCH: Fix i386 disassembler with index == 0x4 in SIB (Re: objdump bug-report) Message-ID: <20050114005918.GD3408@bubble.modra.org> Mail-Followup-To: "H. J. Lu" , "Allan B. Cruse" , binutils@sources.redhat.com, gcc@gcc.gnu.org, GNU C Library References: <20050111210753.0C8CB219E0@nexus.cs.usfca.edu> <20050112191052.GA12463@lucon.org> <20050113034440.GG30985@bubble.modra.org> <20050113170849.GA30644@lucon.org> <20050114000528.GA3408@bubble.modra.org> <20050114002659.GA4491@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050114002659.GA4491@lucon.org> User-Agent: Mutt/1.4i X-SW-Source: 2005-01/txt/msg00142.txt.bz2 On Thu, Jan 13, 2005 at 04:26:59PM -0800, H. J. Lu wrote: > If it is an optimization, there shouldn't be a warning. No, whether we warn or not is an entirely separate matter to whether we optimize. > I think it > may be useful to turn "leal 0xf(%eax,1), %eax" into "8d 44 20 0f" > Gcc/ld use > > leal foo(%reg), %eax; call ___tls_get_addr; nop > > today for TLS optimization. With the change, we can use > > leal foo(%reg,1), %eax; call ___tls_get_addr; Hmm. So that you generate a larger instruction on purpose? Wanted for the space needed with some of the tls transformations, I expect. OK, that is a valid reason to support encoding of the instruction that way. You still should warn for scale factors other than 1, because it's easy to forget the comma in (,%reg,2) where you really do want the register to be scaled. > Then it should display > > 8b 04 23 mov (%ebx,1),%eax Agreed. -- Alan Modra IBM OzLabs - Linux Technology Centre