genCall :: ForeignTarget -> [CmmFormal] -> [CmmActual]
              -> LlvmM StmtData

-- Write barrier needs to be handled specially as it is implemented as an LLVM
-- intrinsic function.
genCall (PrimTarget MO_WriteBarrier) _ _ = do
    platform <- getLlvmPlatform
    if platformArch platform `elem` [ArchX86, ArchX86_64, ArchSPARC]
       then return (nilOL, [])
       else barrier
genCall :: ForeignTarget -> [CmmFormal] -> [CmmActual]
              -> LlvmM StmtData
genCall (PrimTarget MO_WriteBarrier) _ _ = do
    platform <- getLlvmPlatform
    if platformArch platform `elem` [ArchX86, ArchX86_64, ArchSPARC]
       then return (nilOL, [])
       else barrier
genCall (PrimTarget MO_WriteBarrier) _ _ = do
    platform <- getLlvmPlatform
    if platformArch platform `elem` [ArchX86, ArchX86_64, ArchSPARC]
       then return (nilOL, [])
       else barrier