This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] x86: suppress emission of zero displacements inmemoryoperands
- From: "Jan Beulich" <JBeulich at novell dot com>
- To: <hjl at lucon dot org>
- Cc: <dave dot korn at artimi dot com>,<binutils at sources dot redhat dot com>
- Date: Fri, 06 May 2005 18:55:52 +0200
- Subject: Re: [PATCH] x86: suppress emission of zero displacements inmemoryoperands
>>> "H. J. Lu" <hjl@lucon.org> 06.05.05 18:50:33 >>>
>On Fri, May 06, 2005 at 06:33:00PM +0200, Jan Beulich wrote:
>> This stripping is intentional; I'm running into this in many cases where structure offsets are generated (i.e. through a C translation), and the
>> zero offset gets needlessly retained. The point is that you anyway can't force the assembler to everything, like use a 32-bit displacement
>> when an 8-bit one (or even none) suffices. If that's already impossible, then adding this additional thing is no issue at all in my opinion. Jan
>>
>
>Please check out
>
>http://people.redhat.com/drepper/tls.pdf
>
>elf_i386_relocate_section and elf64_x86_64_relocate_section to make
>sure that TLS optimization, which depends on the exact length of
>the instruction, won't get affected.
I will.
>I still prefer to fix compiler instead of assembler.
I'm not sure what compiler fix you're referring to here. I'm referring to e.g. Linux' asm-offsets logic, which can easily create zero offsets, and which the compiler has no way to deal with.
Jan