This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Memory outputs in inline asm
- From: "Segher Boessenkool" <segher at kernel dot crashing dot org>
- To: "Andrew Haley" <aph at redhat dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 26 Feb 2014 17:43:02 +0100 (CET)
- Subject: Re: Memory outputs in inline asm
- Authentication-results: sourceware.org; auth=none
- References: <530DC2D3 dot 9030301 at redhat dot com>
FWIW:
> __asm__("\t0:\n"
> "\tstr wzr, [%2, #4]!\n"
> "\tsub %1, %1, #1\n"
> "\tcbnz %1, 0b\n"
> : "=m"(*p), "+r"(len) : "r"(p));
"+r"(p) as well, you're modifying %2.
Cheers,
Segher