Commit bb827864 authored by dterei's avatar dterei
Browse files

LLVM: Fix compilation of writebarrier, #4308

parent 7594ea18
...@@ -152,6 +152,10 @@ genCall :: LlvmEnv -> CmmCallTarget -> HintedCmmFormals -> HintedCmmActuals ...@@ -152,6 +152,10 @@ genCall :: LlvmEnv -> CmmCallTarget -> HintedCmmFormals -> HintedCmmActuals
-- Write barrier needs to be handled specially as it is implemented as an LLVM -- Write barrier needs to be handled specially as it is implemented as an LLVM
-- intrinsic function. -- intrinsic function.
#if i386_TARGET_ARCH || x86_64_TARGET_ARCH || sparc_TARGET_ARCH
genCall env (CmmPrim MO_WriteBarrier) _ _ _ = return (env, nilOL, [])
#else
genCall env (CmmPrim MO_WriteBarrier) _ _ _ = do genCall env (CmmPrim MO_WriteBarrier) _ _ _ = do
let fname = fsLit "llvm.memory.barrier" let fname = fsLit "llvm.memory.barrier"
let funSig = LlvmFunctionDecl fname ExternallyVisible CC_Ccc LMVoid let funSig = LlvmFunctionDecl fname ExternallyVisible CC_Ccc LMVoid
...@@ -172,6 +176,7 @@ genCall env (CmmPrim MO_WriteBarrier) _ _ _ = do ...@@ -172,6 +176,7 @@ genCall env (CmmPrim MO_WriteBarrier) _ _ _ = do
where where
lmTrue :: LlvmVar lmTrue :: LlvmVar
lmTrue = LMLitVar $ LMIntLit (-1) i1 lmTrue = LMLitVar $ LMIntLit (-1) i1
#endif
-- Handle all other foreign calls and prim ops. -- Handle all other foreign calls and prim ops.
genCall env target res args ret = do genCall env target res args ret = do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment