This is the mail archive of the
mailing list for the GCC project.
Re: Proposed doc update for Explicit Reg Vars 2/3
- From: Jeff Law <law at redhat dot com>
- To: David Wohlferd <dw at LimeGreenSocks dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Segher Boessenkool <segher at kernel dot crashing dot org>, Sandra Loosemore <sandra at codesourcery dot com>
- Date: Wed, 21 Oct 2015 00:12:00 -0600
- Subject: Re: Proposed doc update for Explicit Reg Vars 2/3
- Authentication-results: sourceware.org; auth=none
- References: <561C3D44 dot 5040506 at LimeGreenSocks dot com> <5625CD44 dot 1080404 at redhat dot com> <5627118A dot 8060208 at LimeGreenSocks dot com>
On 10/20/2015 10:16 PM, David Wohlferd wrote:
Signaling that this stuff may change and that we'd like better solutions
for certain issues is, IMHO, worth keeping. Please keep it.
- Eventually the compiler may work differently than it does now.
That is helpful. It's a way signaling that things may change and that
depending on the precise syntax and semantics may be unwise.
From time to time, particularly with GCC extensions, it has been
necessary to declare certain usage as invalid or to change the
implementation is significantly visible ways.
We never like doing that, but it is sometimes unavoidable. As a
general rule, the more an extension exposes how GCC works internally,
the more likely it has been to need significant changes over time.
(asms being the easiest example to cite).
So please consider keeping something which signals the semantics might
The quote in question is:
Eventually there may be a way of asking the compiler to choose a
register automatically, but first we need to figure out how it should
choose and how to enable you to guide the choice. No solution is evident.
I struggle (and fail) to find anything in this text worth keeping.
So for the example, "a5" is a particularly bad choice these days on
the m68k as it's the PIC register. It may be advisable to just use
r<N> for some value of N and try to be processor agnostic here.
"a5" is what the original text used, but I have no preference. I've
changed it to r12, which works on my x64.
r12 seems fine to me.
I think with adding back the blurb about stuff we'd like to change and
a5->r12 this will be ready to go. Please send an updated patch and I'll
get it installed.