Re: How to implement atomic swap with asm on PowerPC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/23/2015 05:58 PM, Chaoran Yang wrote:
> Since I specified ptr as an input, I assume GCC should not try to reuse the register. Am I missing a constraint here? What should I do to tell GCC to not to use the same register for ldarx instruction?

Your output needs an earlyclobber.  : "=&r" (old)

Andrew.





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux