AW: basic asm and memory clobbers - Proposed solution

Bernd Edlinger bernd.edlinger@hotmail.de
Thu Dec 17 19:30:00 GMT 2015


Hi,


On Thu, 17 Dec 2015 15:13:07, Bernd Schmidt wrote:
> >   What's your take on making -Wonly-top-basic-asm a default (either now or
> >   v7)?  Is making it a non-default a waste of time because no one will
> >   ever see it?  Or is making it a default too aggressive? What about
> >   adding it to -Wall?
>
>
> Depends if anyone has one in system headers I guess. We could try to add it to -Wall.

Sorry, but if I have to object.

Adding this warning to -Wall is too quickly and will bring the ia64, tilegx and mep ports into trouble.
Each of them invokes some special semantics for basic asm:

mep: mep_interrupt_saved_reg looks for ASM_INPUT in the body, and saves different registers if found.

tilegx:  They never wrap {} around inline asm. But extended asm, are handled differently, probably automatically surrounded by braces.

ia64:  ASM_INPUT emits stop-bits.  extended asm does not the same.  That was already mentioned by Segher.


Bernd.


More information about the Gcc mailing list