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


"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."


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