This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: basic asm and memory clobbers - Proposed solution
- From: <Paul_Koning at Dell dot com>
- To: <bernd dot edlinger at hotmail dot de>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Sat, 28 Nov 2015 18:30:03 +0000
- Subject: Re: basic asm and memory clobbers - Proposed solution
- Authentication-results: sourceware.org; auth=none
- References: <56552209 dot 1020306 at LimeGreenSocks dot com> <56592801 dot 9010606 at LimeGreenSocks dot com> <HE1PR07MB09050E30BB6C251DBB454790E4020 at HE1PR07MB0905 dot eurprd07 dot prod dot outlook dot com>
> On Nov 28, 2015, at 2:02 AM, Bernd Edlinger <bernd.edlinger@hotmail.de> wrote:
>
> ...
> Well, I start to think that Jeff is right, and we should treat a asm ("") as if it
> were asm volatile ("" ::: ) but if the asm ("nonempty with optional %") we should
> treat it as asm volatile ("nonempty with optional %%" ::: "memory").
I agree. Even if that goes beyond the letter of what the manual has promised before, it is the cautious answer, and it matches expectations of a lot of existing code.
paul