public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Thorsten Glaser <tg@66h.42h.de>
To: binutils@sources.redhat.com
Cc: gcc@gcc.gnu.org
Subject: Re: Change i386 assembler/disassembler for SIB with INDEX==4
Date: Fri, 14 Jan 2005 00:22:00 -0000	[thread overview]
Message-ID: <Pine.BSO.4.61L.0501140013160.13215@odem.66h.42h.de> (raw)
In-Reply-To: <20050113193516.GA441@lucon.org>

(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

  reply	other threads:[~2005-01-14  0:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-13 19:35 H. J. Lu
2005-01-14  0:22 ` Thorsten Glaser [this message]
2005-01-14  0:38   ` Alan Modra
2005-01-13 20:33 Allan B. Cruse
2005-01-13 22:48 ` H. J. Lu
2005-01-14  0:18   ` Alan Modra
2005-01-14  0:32     ` Thorsten Glaser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.BSO.4.61L.0501140013160.13215@odem.66h.42h.de \
    --to=tg@66h.42h.de \
    --cc=binutils@sources.redhat.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).