<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 21, 2010, at 2:18 PM, Wesley Peck wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">As a note, I just now noticed commit 99522 which removed these operations because they are inconsistently implemented in GCC. I believe the problem is GCC before 4.4 implemented:<div><br><div><span class="Apple-tab-span" style="white-space:pre">    </span>res = ~(*mem) & val</div><div><br></div><div>where as GCC 4.4 and after implement:</div><div><span class="Apple-tab-span" style="white-space:pre"><br></span></div><div><span class="Apple-tab-span" style="white-space:pre">    </span>res = ~(*mem & val) </div></div></div></blockquote><div><br></div><div>Yes.  IIRC I was the one who decided to follow 4.2 in llvm even though it was, IMO, wrong; I wasn't comfortable with that choice, but incompatibility is bad too.  Since this has been disabled for 9 months without anyone complaining it should be safe to go ahead and do it right at this point.   Just MO.</div><div><br></div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Is this still an issue? The patch that I attached implements the form used by GCC 4.4 and later for __sync_nand_and_fetch and simply lowers to the LLVM intrinsic function for __sync_fetch_and_nand.</div><div><br></div><div><div><div><span class="Apple-style-span" style="border-collapse: separate; font-family: Menlo; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><span class="Apple-style-span" style="font-family: Helvetica; ">--</span></div><div><div style="font-family: Helvetica; ">Wesley Peck</div><div style="font-family: Helvetica; ">University of Kansas</div><div style="font-family: Helvetica; ">SLDG Laboratory</div></div></span>
</div>
<br><div><div>On Dec 21, 2010, at 4:06 PM, Wesley Peck wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Attached is a patch that adds support for the builtin functions <span class="Apple-style-span" style="font-family: monospace; ">__sync_fetch_and_nand and __sync_nand_and_fetch. It lowers the builtins to the associated LLVM intrinsic function.</span><div><font class="Apple-style-span" face="monospace"><br></font><div>
<span class="Apple-style-span" style="border-collapse: separate; font-family: Menlo; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><span class="Apple-style-span" style="font-family: Helvetica; ">--</span></div><div><div style="font-family: Helvetica; ">Wesley Peck</div><div style="font-family: Helvetica; ">University of Kansas</div><div style="font-family: Helvetica; ">SLDG Laboratory</div></div></span>
</div><div><br class="webkit-block-placeholder"></div><div></div></div></div><span><clang_sync_nand.patch></span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div></div>
<br></div></div></blockquote></div><br></div></div></div></div>_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br></blockquote></div><br></body></html>