<span class="Apple-style-span" style="font-family: monospace; font-size: 13px; ">Hey guys,<br><br>Attached are the patches for post-GCC v4.4 Atomic NAND support for the<br>ARM, PPC, and X86 targets. It appears that the MBlaze and Mips targets<br>
also implement the Atomic NAND intrinsic, but their implementations are<br>already current and correct. That is, unless I made a mistake interpreting the code.<br>It is new to me.<br><br>Is there an expert who could check out the ARM patch especially? I do<br>
not have much experience with ARM, so it's possible that this change<br>could be implemented in a better way. My solution was to use the MVN<br>instruction to NOT the result of the AND. Perhaps this could be done in<br>
a more efficient/correct manner.<br><br>Assuming these patches are acceptable, we'll still need to:<br><br>1) Update Clang to issue a WARNING message for the Atomic NAND builtin's behavior change;<br>2) Update the tests for the Atomic NAND feature (or possibly write tests for this feature);<br>
<br>-Cameron</span><br><br><div class="gmail_quote">On Thu, Jul 14, 2011 at 11:41 AM, Jim Grosbach <span dir="ltr"><<a href="mailto:grosbach@apple.com">grosbach@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Jul 14, 2011, at 9:29 AM, Chris Lattner wrote:<br>
<br>
><br>
> On Jul 14, 2011, at 8:03 AM, Cameron McInally wrote:<br>
><br>
>> Hey Guys,<br>
>><br>
>> I have been working on Atomic NAND. Here is a patch that allows the<br>
>> compiler writer to select a [NOT AND] implementation, while retaining<br>
>> [NEGATE and AND] as the default implementation for those that do not<br>
>> want the current GCC implementation (i.e. GCC v4.4 and later).<br>
><br>
> Hi Cameron,<br>
><br>
> Is there a reason to support the broken pre-gcc-4.4 implementation at all?<br>
><br>
<br>
</div>If we change (either optionally or unconditionally), we should also make sure to change all targets that implement the intrinsics, not just X86. It would be really nasty for the behaviour to be target specific.<br>

<font color="#888888"><br>
-Jim</font></blockquote></div><br>