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 Fri, Nov 20, 2015 at 04:29:50PM +0100, Richard Henderson wrote:
> >>It seems to me that it would be better to remove the feature, forcing what
> >>must be an extremely small number of users to audit and update to extended
> >>asm.
> >
> >Should  asm("bla");  then be an extended asm with no input, no outputs,
> >no (non-automatic) clobbers?  That would be the most straightforward and
> >logical semantics, but will it break user code?
> I'm suggesting that we don't accept that at all inside a function.  One 
> must audit the source and make a conscious decision to write asm("bla" : ); 
> instead.

Ah, or excepting asm("bla") and treating it just like asm("bla" : ), but
giving a warning?  That will get people to migrate at least.

> Accepting basic asm outside of a function is perfectly ok, since that's 
> just a mechanism by which one can inject complete assembly routines into a 
> C translation unit.

Of course.  You cannot have extended asm outside of functions at all.


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