This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: disassembler bug
- To: Shaun Jackman <sjackman at home dot com>
- Subject: Re: disassembler bug
- From: Andreas Jaeger <aj at suse dot de>
- Date: 25 Apr 2001 07:43:36 +0200
- Cc: binutils at sources dot redhat dot com
- References: <01042414580100.22516@quince>
Shaun Jackman <sjackman@home.com> writes:
> try this...
>
> #!/bin/sh
> cat > foo.s << END
> mov (%esp),%ebx
> mov %ebx,(%esp)
> END
> as foo.s
> objdump -D
>
> ----- Result -----
> a.out: file format elf32-i386
>
> Disassembly of section .text:
>
> 00000000 <.text>:
> 0: 8b 1c 24 mov (%esp,1),%ebx
> 3: 89 1c 24 mov %ebx,(%esp,1)
> 6: 89 f6 mov %esi,%esi
> Disassembly of section .data:
> ------------------
>
> Should those (%esp,1) be (%esp)?
(%esp) looks nicer but (%esp,1) is the same, %esp as displacement, 0
as index and 1 as multiplikator giving: %esp+0*1=%esp.
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj