From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2491 invoked by alias); 14 Jan 2005 00:22:44 -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 2466 invoked from network); 14 Jan 2005 00:22:37 -0000 Received: from unknown (HELO main.gmane.org) (80.91.229.2) by sourceware.org with SMTP; 14 Jan 2005 00:22:37 -0000 Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CpFEW-0004qi-00 for ; Fri, 14 Jan 2005 01:22:32 +0100 Received: from xdsl-81-173-175-152.netcologne.de ([81.173.175.152]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 14 Jan 2005 01:22:32 +0100 Received: from tg by xdsl-81-173-175-152.netcologne.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 14 Jan 2005 01:22:32 +0100 To: binutils@sources.redhat.com From: Thorsten Glaser Subject: Re: Change i386 assembler/disassembler for SIB with INDEX==4 Date: Fri, 14 Jan 2005 00:22:00 -0000 Message-ID: References: <20050113193516.GA441@lucon.org> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: xdsl-81-173-175-152.netcologne.de In-Reply-To: <20050113193516.GA441@lucon.org> Cc: gcc@gcc.gnu.org X-SW-Source: 2005-01/txt/msg00138.txt.bz2 (Removing GNU/Linux groups from the output) H. J. Lu dixit: >I am proposing to change i386 assembler/disassembler for SIB with >INDEX==4 > >http://sources.redhat.com/bugzilla/show_bug.cgi?id=658 The intel output looks even more weird, is this a shortcoming in the assembler? (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] tg@odem:/home/tg $ cat >y.s .intel_syntax noprefix mov eax,DWORD PTR [ebx] mov eax,DWORD PTR [ebx*2] mov eax,DWORD PTR [ebx*4] mov eax,DWORD PTR [ebx*8] tg@odem:/home/tg $ gcc -c y.s tg@odem:/home/tg $ objdump -d y.o y.o: file format elf32-i386 Disassembly of section .text: 00000000 <.text>: 0: 8b 03 mov (%ebx),%eax 2: 8b 04 5d 00 00 00 00 mov 0x0(,%ebx,2),%eax 9: 8b 04 9d 00 00 00 00 mov 0x0(,%ebx,4),%eax 10: 8b 04 dd 00 00 00 00 mov 0x0(,%ebx,8),%eax tg@odem:/home/tg $ objdump -d -M intel y.o y.o: file format elf32-i386 Disassembly of section .text: 00000000 <.text>: 0: 8b 03 mov eax,DWORD PTR [ebx] 2: 8b 04 5d 00 00 00 00 mov eax,DWORD PTR [ebx*2] 9: 8b 04 9d 00 00 00 00 mov eax,DWORD PTR [ebx*4] 10: 8b 04 dd 00 00 00 00 mov eax,DWORD PTR [ebx*8] //mirabile