This is the mail archive of the gcc-help@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: How to implement atomic swap with asm on PowerPC


I see. Thanks very much!

Chaoran

> On Apr 23, 2015, at 12:06 PM, Andrew Haley <aph@redhat.com> wrote:
> 
> 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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]