This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Memory outputs in inline asm


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]