aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/COFFObjectFile.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2014-10-02 20:53:50 +0000
committerHal Finkel <hfinkel@anl.gov>2014-10-02 20:53:50 +0000
commitd2208b59cfaa092dddb533587e7670247df9de30 (patch)
tree909b4477a8389e24271097c99d00a4e7f43b2d69 /llvm/lib/Object/COFFObjectFile.cpp
parente9914abe3b132622aa7f85707f5da23c179d5edd (diff)
downloadllvm-d2208b59cfaa092dddb533587e7670247df9de30.zip
llvm-d2208b59cfaa092dddb533587e7670247df9de30.tar.gz
llvm-d2208b59cfaa092dddb533587e7670247df9de30.tar.bz2
Add __sync_fetch_and_nand (again)
Prior to GCC 4.4, __sync_fetch_and_nand was implemented as: { tmp = *ptr; *ptr = ~tmp & value; return tmp; } but this was changed in GCC 4.4 to be: { tmp = *ptr; *ptr = ~(tmp & value); return tmp; } in response to this change, support for sync_fetch_and_nand (and sync_nand_and_fetch) was removed in r99522 in order to avoid miscompiling code depending on the old semantics. However, at this point: 1. Many years have passed, and the amount of code relying on the old semantics is likely smaller. 2. Through the work of many contributors, all LLVM backends have been updated such that "atomicrmw nand" provides the newer GCC 4.4+ semantics (this process was complete July of 2014 (added to the release notes in r212635). 3. The lack of this intrinsic is now a needless impediment to porting codes from GCC to Clang (I've now seen several examples of this). It is true, however, that we still set GNUC_MINOR to 2 (corresponding to GCC 4.2). To compensate for this, and to address the original concern regarding code relying on the old semantics, I've added a warning that specifically details the fact that the semantics have changed and that we provide the newer semantics. Fixes PR8842. llvm-svn: 218905
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions