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: Dave Korn <dave dot korn at artimi dot com>
- Cc: 'Andreas Schwab' <schwab at suse dot de>,'Jan Beulich' <JBeulich at novell dot com>, binutils at sources dot redhat dot com
- Date: Fri, 6 May 2005 07:26:00 -0700
- Subject: Re: [PATCH] x86: suppress emission of zero displacements in memoryoperands
- References: <jek6mcwihf.fsf@sykes.suse.de> <SERRANOB5i5Qy2LfHxw0000026a@SERRANO.CAM.ARTIMI.COM>
On Fri, May 06, 2005 at 03:20:59PM +0100, Dave Korn wrote:
> ----Original Message----
> >From: Andreas Schwab
> >Sent: 06 May 2005 15:13
>
> > "Dave Korn" <dave.korn@artimi.com> writes:
> >
> >> I'm not sure if I've fully understood the intent of this patch, ...
>
> > The m68k assembler is doing something similar, also known as relaxing.
>
> Hopefully *only* if you specify --relax on the command line, no?
>
> >> What if someone wants to write self-modifying code that stores varying
> >> offsets into that field?
> >
> > In the m68k assembler you can force a field by adding an explicit size
> > modifier.
>
> Yes, I understand that; what I'm asking is if this patch of Jan's actually
> discards the field *even if* it is explicitly stated, when the offset value
> is zero.
>
I agree. User may do it on purpose and TLS optimization may depend on
it. The same effect can be done with different instructions on x86.
Assembler shouldn't pick one which it thinks is the best.
H.J.