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: Andreas Schwab <schwab at suse dot de>
- To: "Dave Korn" <dave dot korn at artimi dot com>
- Cc: "'Jan Beulich'" <JBeulich at novell dot com>,<binutils at sources dot redhat dot com>
- Date: Fri, 06 May 2005 16:59:52 +0200
- Subject: Re: [PATCH] x86: suppress emission of zero displacements in memoryoperands
- References: <SERRANOTDWWcuZcGwM00000026d@SERRANO.CAM.ARTIMI.COM>
"Dave Korn" <dave.korn@artimi.com> writes:
> Well, yes, it's vital for the assembler to support branch optimisation,
> because the programmer can't know in advance which branches will be in range
> or not. But it's also in the case of hand-coded assembler that the coder is
> *most* likely to want to specify an exact instruction sequence,
Most of the time you want optimal assembler code.
> because the coder knows things about the program that the assembler
> doesn't, and it ought to be (at least) possible if not (IMO) the default
> behaviour.
What if the zero is written as `foo - bar', where foo and bar are local
labels surrounding a region that may be empty? Surely you want to get
optimal assembler code independent of the value of foo - bar.
> Relaxing branches without the "--relax" option violates the 'least
> surprise' principle.
I disagree.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."