aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/CBackend
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2008-02-16 14:46:26 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2008-02-16 14:46:26 +0000
commitd497d9fab6e90499c703f3e672ec001dbfa074f9 (patch)
tree547eb8e3f145c096925ad6dccddf43d652172343 /lib/Target/CBackend
parent051bb7b07504be9f848f7cce802e62ed24980bc5 (diff)
downloadexternal_llvm-d497d9fab6e90499c703f3e672ec001dbfa074f9.zip
external_llvm-d497d9fab6e90499c703f3e672ec001dbfa074f9.tar.gz
external_llvm-d497d9fab6e90499c703f3e672ec001dbfa074f9.tar.bz2
I cannot find a libgcc function for this builtin. Therefor expanding it to a noop (which is how it use to be treated). If someone who knows the x86 backend better than me could tell me how to get a lock prefix on an instruction, that would be nice to complete x86 support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47213 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CBackend')
-rw-r--r--lib/Target/CBackend/CBackend.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index d434eb9..334f6fe 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -2459,6 +2459,7 @@ void CWriter::lowerIntrinsics(Function &F) {
if (Function *F = CI->getCalledFunction())
switch (F->getIntrinsicID()) {
case Intrinsic::not_intrinsic:
+ case Intrinsic::memory_barrier:
case Intrinsic::vastart:
case Intrinsic::vacopy:
case Intrinsic::vaend:
@@ -2544,6 +2545,9 @@ void CWriter::visitCallInst(CallInst &I) {
WroteCallee = true;
break;
}
+ case Intrinsic::memory_barrier:
+ Out << "0; __sync_syncronize()";
+ return;
case Intrinsic::vastart:
Out << "0; ";