This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Proposed doc update for Explicit Reg Vars 2/3


On 10/20/2015 10:16 PM, David Wohlferd wrote:

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

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.
Signaling that this stuff may change and that we'd like better solutions for certain issues is, IMHO, worth keeping. Please keep it.



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.

jeff


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