From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15382 invoked by alias); 14 Jan 2005 00:38:01 -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 14976 invoked from network); 14 Jan 2005 00:37:54 -0000 Received: from unknown (HELO gizmo05bw.bigpond.com) (144.140.70.40) by sourceware.org with SMTP; 14 Jan 2005 00:37:54 -0000 Received: (qmail 24999 invoked from network); 14 Jan 2005 00:37:51 -0000 Received: from unknown (HELO bwmam12.bigpond.com) (144.135.24.103) by gizmo05bw.bigpond.com with SMTP; 14 Jan 2005 00:37:51 -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/40155578) with SMTP id 40155578; Fri, 14 Jan 2005 10:37:52 +1000 Received: by bubble.modra.org (Postfix, from userid 500) id 8D4F6FA2A0; Fri, 14 Jan 2005 11:07:51 +1030 Date: Fri, 14 Jan 2005 00:38:00 -0000 From: Alan Modra To: Thorsten Glaser Cc: gcc@gcc.gnu.org, binutils@sources.redhat.com Subject: Re: Change i386 assembler/disassembler for SIB with INDEX==4 Message-ID: <20050114003751.GC3408@bubble.modra.org> Mail-Followup-To: Thorsten Glaser , gcc@gcc.gnu.org, binutils@sources.redhat.com References: <20050113193516.GA441@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-SW-Source: 2005-01/txt/msg00141.txt.bz2 On Fri, Jan 14, 2005 at 12:14:53AM +0000, Thorsten Glaser wrote: > The intel output looks even more weird, is this a shortcoming > in the assembler? Yes, that's plainly a bug, since the disassembled code is specifying ebx as an index register, not a base register. ie. In intel mode we should be showing 0: 8b 04 23 mov eax,DWORD PTR [ebx+0*1] 3: 8b 04 63 mov eax,DWORD PTR [ebx+0*2] 6: 8b 04 a3 mov eax,DWORD PTR [ebx+0*4] 9: 8b 04 e3 mov eax,DWORD PTR [ebx+0*8] or something like that. > (Use -M intel, not -m i386:intel, the latter gave me 64 bit output!) > > tg@odem:/home/tg $ objdump -d -M intel x.o > > x.o: file format elf32-i386 > > Disassembly of section .text: > > 00000000 <.text>: > 0: 8b 04 23 mov eax,DWORD PTR [ebx] > 3: 8b 04 63 mov eax,DWORD PTR [ebx*2] > 6: 8b 04 a3 mov eax,DWORD PTR [ebx*4] > 9: 8b 04 e3 mov eax,DWORD PTR [ebx*8] -- Alan Modra IBM OzLabs - Linux Technology Centre