This is the mail archive of the
mailing list for the GCC project.
Re: asm volatile("":::"memory) uncertainty.
- From: Tom Udale <tom at ionoptix dot com>
- To: Andrew Haley <aph at redhat dot com>, gcc-help at gcc dot gnu dot org
- Date: Mon, 16 May 2016 19:40:15 -0400
- Subject: Re: asm volatile("":::"memory) uncertainty.
- Authentication-results: sourceware.org; auth=none
- References: <f3141159-2f2a-6317-8dd6-da0aa64eca14 at ionoptix dot com> <5731A8BE dot 2090507 at redhat dot com> <5731D7B3 dot 1060007 at westcontrol dot com> <6482230d-d824-c20a-5984-9be81d20c9f2 at ionoptix dot com> <573206DF dot 8040307 at redhat dot com>
> It won't: GCC does not inspect asms to see if they do
> anything. Besides, if you are really worried about that
> you can put a "do nothing" comment into the asm.
> I think your reasoning about asm goto is sound. The
> only real problem you'll have is that GCC will to
> remove statements which it knows have no side effects.
Do you mean the asm statement itself? Will the volatile not prevent
that? Or am I missing something else.