This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] x86: suppress emission of zero displacements in memoryoperands


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]