This is the mail archive of the
mailing list for the GCC project.
Re: basic asm and memory clobbers
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: David Wohlferd <dw at LimeGreenSocks dot com>
- Cc: Segher Boessenkool <segher at kernel dot crashing dot org>, Richard Henderson <rth at redhat dot com>, Andrew Haley <aph at redhat dot com>, Jeff Law <law at redhat dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, rth at gcc dot gnu dot org, pinskia at gcc dot gnu dot org, Sandra Loosemore <sandra at codesourcery dot com>
- Date: Thu, 26 Nov 2015 18:38:57 -0500 (EST)
- Subject: Re: basic asm and memory clobbers
- Authentication-results: sourceware.org; auth=none
- References: <564A4AA5 dot 1080706 at redhat dot com> <564AC155 dot 4040601 at LimeGreenSocks dot com> <564B9CB1 dot 1060001 at redhat dot com> <564E762B dot 6070705 at LimeGreenSocks dot com> <564EF338 dot 4030703 at redhat dot com> <564EF7FF dot 1070107 at LimeGreenSocks dot com> <564F008B dot 8040703 at redhat dot com> <564F1436 dot 2060005 at LimeGreenSocks dot com> <564F1A7D dot 9050607 at redhat dot com> <alpine dot BSF dot 2 dot 02 dot 1511260518001 dot 40802 at arjuna dot pair dot com> <20151126123540 dot GA21046 at gate dot crashing dot org> <alpine dot BSF dot 2 dot 02 dot 1511261108001 dot 76040 at arjuna dot pair dot com> <56577F5F dot 3010007 at LimeGreenSocks dot com>
On Thu, 26 Nov 2015, David Wohlferd wrote:
> On 11/26/2015 8:26 AM, Hans-Peter Nilsson wrote:
> > On Thu, 26 Nov 2015, Segher Boessenkool wrote:
> > > On Thu, Nov 26, 2015 at 05:30:48AM -0500, Hans-Peter Nilsson wrote:
> > > > @item noinline
> > > > asm ("");
> > I know, the point is that we've promised the above and we
> > shouldn't back down on this mechanism to instead deprecate and
> > warn about it, as seems to be the direction.
> That is indeed the direction I am heading unless someone stops me.
> I was not aware of this magic. Thanks for pointing it out. To be clear,
> wouldn't asm("":) have the same effect?
That does not matter. It'd require source-code changes to
users' code. BTW, does that syntax work for really olden gcc
(say 2.95 era)? Either way, we promised 'asm("")'. I'm pretty
sure the empty string is identifiable. Whatever happens to
register-clobbering effects (wrt. this being expressed as a
"basic asm") is less interesting; it can be made the same as
'asm("":)' whenever any actual-basic-asm-deprecation is
I have no issue with any *actual* basic asm changes. That might
be a good idea, modulo standards issues of course (IIUC it's
optional in *some* ISO/ANSI standards, but better check all
> Since we have committed to this, we don't want to change it lightly.
Right. I don't understand why we couldn't except this
particular thing from actual-basic-asm-deprecation. FWIW, I see
the point in making sure 'asm("":)' does the same, for syntax
consistency, but I wouldn't call that syntax "the right thing".