bug-binutils
[Top][All Lists]
Advanced

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

[Bug gas/976] New: Superfluous 0 displacment added in x86 code


From: cutaway at bellsouth dot net
Subject: [Bug gas/976] New: Superfluous 0 displacment added in x86 code
Date: 29 May 2005 07:31:38 -0000

Assemble something like this:

 movl 0(%edi),%eax

An explicit zero byte of displacment is being emitted into the code making this 
a 3 byte instruction rather than two bytes.  The latest source I examined 
looked like this was probably somewhat easy to fix in the instruction emitter 
by just checking if a displacement was included (and zero) then whacking the 
disp field pointer to null, or something along those lines.  That should keep 
the existing "fake EBP 0" logic pretty intact and unaffected.

A lot of app header files I've seen seemed to use explicit zeros like above for 
clarity reasons when there are a series of related displacements, or to make 
the code line up nice on the page, etc.  What tipped me off on this was I saw 
the explicit zero displacement show up in an ASM listings of some of the Linux 
387 emulator code and it jumped out at me.

-- 
           Summary: Superfluous 0 displacment added in x86 code
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: gas
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: cutaway at bellsouth dot net
                CC: bug-binutils at gnu dot org


http://sources.redhat.com/bugzilla/show_bug.cgi?id=976

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

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