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 25/11/15 02:11, David Wohlferd wrote:
> The 'fix' I am proposing is to give warnings for every use of basic asm 
> inside functions (top-level asm is not a problem).

I'm not sure that's such a great idea on its own.

My suggestion:

1.  Clobber memory.

2.  Document a rule which says that all registers which are used must be
    saved and restored.

This won't break any existing usages, and is AFAICS entirely in the spirit
of what was originally intended and with the ISO C specification.

Andrew.


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