Memory outputs in inline asm

Segher Boessenkool segher@kernel.crashing.org
Wed Feb 26 16:43:00 GMT 2014


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



More information about the Gcc mailing list