bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[opcodes/i386-dis.c] disassemble output bugs in binutils 2.14 (last cvs


From: Claudio Fontana
Subject: [opcodes/i386-dis.c] disassemble output bugs in binutils 2.14 (last cvs version) objdump 2.14.90 20040115
Date: Thu, 15 Jan 2004 12:52:25 +0100 (CET)

Hello,
the problem with the disassembly output for scaled
registers

es: mov eax, DWORD PTR [eax+ecx*4]

with assembly flavour intel is present in the latest
cvs version too. The problem manifests as incorrect
output

es: mov eax, DWORD PTR [eax+ecx]

(missing scale value)

I'm not used to AT&T syntax, however there seems to be
a small problem with AT&T syntax too in some cases
when the register is not scaled:

es: disassembly of opcode 89 34 24

$ objdump -d --disassembler-options=intel ./test

/home/my_home_dir/test:     file format elf32-i386
Disassembly of section .text:
00000000 <_start>:
  0: 89 34 24      mov    DWORD PTR [esp],esi

this time the intel syntax is ok, while the AT&T is:

$ objdump -d ./test

/home/my_home_dir/test:     file format elf32-i386
Disassembly of section .text:
00000000 <_start>:
  0: 89 34 24      mov    %esi,(%esp,1)

Now shouldn't the second place in the parenthesis be
reserved for the index as in (base, index, scale)?
Maybe a mov   %esi,(%esp) would be better?

ref Solaris x86 assembler manual:
http://docs.sun.com/db/doc/806-3773/6jct9o0ad?a=view

I have read the code and I might have isolated the
cause of both behaviours in opcodes/i386-dis.c:3176. A
patch in unified format is attached (it works for me),
but please keep in mind that it's the first patch I
submit so beware!

Claudio F.



______________________________________________________________________
Yahoo! Mail: 6MB di spazio gratuito, 30MB per i tuoi allegati, l'antivirus, il 
filtro Anti-spam
http://it.yahoo.com/mail_it/foot/?http://it.mail.yahoo.com/

Attachment: i386-dis.c.diff
Description: i386-dis.c.diff


reply via email to

[Prev in Thread] Current Thread [Next in Thread]