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: basic asm and memory clobbers


On Fri, Nov 20, 2015 at 04:29:50PM +0100, Richard Henderson wrote:
> On 11/20/2015 04:20 PM, Segher Boessenkool wrote:
> >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.

I have now audited all code involving RTL's ASM_INPUT (i.e. the basic asm),
and those work identically to zero-operand no-clobber volatile ASM_OPERANDS
(i.e., extended asm) everywhere.  Well, two exceptions: the mep port does
not handle that second form (which can never happen currently), and the
ia64 port treats the two forms differently for its placing of stop bits.

So as far as RTL is concerned, we do not need to force users' source code
changes for transitioning to "no more basic asm".

Now looking at what happens before RTL...  probably more exciting ;-)


Segher


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