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 11/23/2015 1:44 PM, wrote:
On Nov 23, 2015, at 4:36 PM, David Wohlferd <> wrote:

The more I think about it, I'm just not keen on forcing all those old-style asms to change.
If you mean you aren't keen to change them to "clobber all," I'm with you.  If you are worried about changing them from basic to extended, what kinds of problems do you foresee?  I've been reading a lot of basic asm lately, and it seems to me that most of it would be fine with a simple colon.  Certainly no worse than the current behavior.
I'm not sure.  I have some asm("sync") which I think assume that this means asm("sync"::"memory")

Another excellent reason to nudge people towards using extended asm. If you saw asm("sync":::"memory"), you would *know* what it did, without having to read the docs (which don't say anyway).

I'm pretty confident that asm("") doesn't clobber memory on i386, but maybe that behavior is platform-specific. Since i386 doesn't have "sync", I assume you are on something else?

If you have a chance to experiment, I'd love confirmation from other platforms that asm("blah") is the same as asm("blah":). Feel free to email me off list to discuss.


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