[LLVMbugs] [Bug 8842] New: Support for __sync_fetch_and_nand and __sync_nand_and_fetch
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Dec 21 18:12:35 PST 2010
http://llvm.org/bugs/show_bug.cgi?id=8842
Summary: Support for __sync_fetch_and_nand and
__sync_nand_and_fetch
Product: clang
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: peckw at wesleypeck.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=5919)
--> (http://llvm.org/bugs/attachment.cgi?id=5919)
GCC 4.4 style __sync_fetch_and_nand and __sync_nand_and_fetch support.
Support for the atomic builtins __sync_fetch_and_nand and __sync_nand_and_fetch
was removed in commit 99522 due to inconsistencies in the GCC implementation.
Specifically, GCC versions prior to 4.4 implemented the atomic as:
{ tmp = *ptr; *ptr = ~tmp & value; return tmp; }
where as, GCC 4.4 and following implements the atomic as:
{ tmp = *ptr; *ptr = ~(tmp & value); return tmp; }
The attached patch supports __sync_fetch_and_nand through the LLVM intrinsic
function llvm.atomic.load.nand and generates GCC 4.4 style code for the atomic
__sync_nand_and_fetch.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list