<div dir="ltr">In pre-v6 Linux you could use the kernel-provided helpers:<blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><a href="https://www.kernel.org/doc/Documentation/arm/kernel_user_helpers.txt">https://www.kernel.org/doc/Documentation/arm/kernel_user_helpers.txt</a></div></blockquote></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 25, 2015 at 5:18 PM, Ahmed Bougacha <span dir="ltr"><<a href="mailto:ahmed.bougacha@gmail.com" target="_blank">ahmed.bougacha@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Sep 25, 2015 at 2:17 PM, JF Bastien <<a href="mailto:jfb@google.com">jfb@google.com</a>> wrote:<br>
> Looks like this was caused by r248294. Author CC'ed.<br>
><br>
> On Fri, Sep 25, 2015 at 1:46 PM, Richard Pennington via llvm-dev<br>
> <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> I was compiling libc++ with a recent TOT (248571) and when I got to the<br>
>> ARMv6, I got a code generation error in memory.cpp:<br>
>><br>
>> fatal error: error in backend: Cannot select: intrinsic %llvm.arm.clrex<br>
>> ecc: error: clang frontend command failed with exit code 70 (use -v to see<br>
>> invocation)<br>
>> clang version 3.8.0 (trunk)<br>
>><br>
>> It looks as if the newly added emitAtomicCmpXchgNoStoreLLBalance()<br>
>> function is the culprit.  Does this seem like a resaonable fix, or do I need<br>
>> to do something different for v6 and earlier?<br>
>><br>
>> void ARMTargetLowering::emitAtomicCmpXchgNoStoreLLBalance(<br>
>>     IRBuilder<> &Builder) const {<br>
>>   if (Subtarget->hasV7Ops()) {<br>
>>     Module *M = Builder.GetInsertBlock()->getParent()->getParent();<br>
>>     Builder.CreateCall(llvm::Intrinsic::getDeclaration(M,<br>
>> Intrinsic::arm_clrex));<br>
>>   }<br>
>> }<br>
<br>
</span>For v6, I guess we could do a fake strex to some dummy global?<br>
<br>
Anyway, r248640, sorry about that!<br>
<span class="HOEnZb"><font color="#888888"><br>
-Ahmed<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
>> -Rich<br>
>> _______________________________________________<br>
>> LLVM Developers mailing list<br>
>> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
><br>
><br>
</div></div></blockquote></div><br></div>