This is the mail archive of the 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: basic asm and memory clobbers

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
complete, IIUC.

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
applicable versions).

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

brgds, H-P

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