This is the mail archive of the
mailing list for the GCC project.
Re: [DOC Patch] Explicit Register Variables
- From: David Wohlferd <dw at LimeGreenSocks dot com>
- To: Mike Stump <mikestump at comcast dot net>
- Cc: Jeff Law <law at redhat dot com>, gcc-patches at gcc dot gnu dot org, Gerald Pfeifer <gerald at pfeifer dot com>
- Date: Mon, 30 Jun 2014 22:51:22 -0700
- Subject: Re: [DOC Patch] Explicit Register Variables
- Authentication-results: sourceware.org; auth=none
- References: <53B11D57 dot 706 at LimeGreenSocks dot com> <53B1D029 dot 6090904 at redhat dot com> <53B1EE69 dot 7050807 at LimeGreenSocks dot com> <19666863-3ECD-4EA5-98E0-679DBFDC6DFF at comcast dot net>
On 6/30/2014 6:30 PM, Mike Stump wrote:
On Jun 30, 2014, at 4:10 PM, David Wohlferd <dw@LimeGreenSocks.com> wrote:
- Vague descriptions of things that "are reported" to work on certain
platforms are not useful ("On the SPARC, there are reports that").
I'd disagree. But what's more important here is the registers that are available are a function of the ABI and for someone to attempt to use this feature, they're going to have to be intimately aware of the ABI of their target.
If we could say "On the SPARC, these registers can be used for" I'd be tempted to leave it as an example. But saying "Well, someone once said they thought it might work this way on this one specific platform" is not helpful for either SPARC or non-SPARC users.
So, we can do s/there are reports that//; s/should be suitable, as should/are suitable, as are/ and remove the wishy washy language. If someone later wants to correct the definitive statement in some way, they are welcome to it.
While an example can be illustrative, the potential value here is offset
by the fact that it may not actually be true. Given that, I think I'd
just as soon do without an example.
My proposed patch says "When selecting a register, choose one that is
normally saved and restored by function calls on your machine. This
ensures library routines which are unaware of this reservation will
restore it before returning." This platform-neutral statement seems to
cover what needs to be said here.