This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Compiler optimizing variables in inline assembly
- From: David Brown <david at westcontrol dot com>
- To: Cody Rigney <codyrigney92 at gmail dot com>, Andrew Haley <aph at redhat dot com>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Fri, 21 Feb 2014 10:55:35 +0100
- Subject: Re: Compiler optimizing variables in inline assembly
- Authentication-results: sourceware.org; auth=none
- References: <CA+1=iYaWg6OyzNjM9K2Qb1fn40ei0Ls+3AhVyXcg-h2Pm3xQaw at mail dot gmail dot com> <5305C77D dot 3090807 at redhat dot com> <CA+1=iYbK=iDVKhvPESrbseF5nsB-U2oBBBjTiEyveuEkxVeZGw at mail dot gmail dot com>
On 20/02/14 20:29, Cody Rigney wrote:
> That makes sense. In this case, the input parameters are actually
> memory addresses. So how would I do an output or clobber that would
> tell the compiler that the memory at those addresses will change?
>
Easy - you specify "memory" in your clobber list!
> Thanks for your time,
>
> Cody
>
(I forgot the "reply all" to the list - sorry for the duplicate.)