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 in memoryoperands
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Jan Beulich <JBeulich at novell dot com>
- Cc: dave dot korn at artimi dot com, binutils at sources dot redhat dot com
- Date: Fri, 6 May 2005 09:50:33 -0700
- Subject: Re: [PATCH] x86: suppress emission of zero displacements in memoryoperands
- References: <s27baa29.000@emea1-mh.id2.novell.com>
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 still prefer to fix compiler instead of assembler.
H.J.