[commit: ghc] master: Fix LLVM backend in unregisterised build to use C (ac0800b)
David Terei
davidterei at gmail.com
Tue Jun 28 09:03:13 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/ac0800b6bfdb7b1f3895fe33981e0bc853b0d409
>---------------------------------------------------------------
commit ac0800b6bfdb7b1f3895fe33981e0bc853b0d409
Author: David Terei <davidterei at gmail.com>
Date: Mon Jun 27 23:57:42 2011 -0700
Fix LLVM backend in unregisterised build to use C
calling convention.
Patch based on one by Karel Gardas.
>---------------------------------------------------------------
compiler/llvmGen/LlvmCodeGen/Base.hs | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/compiler/llvmGen/LlvmCodeGen/Base.hs b/compiler/llvmGen/LlvmCodeGen/Base.hs
index 221106a..59cdad4 100644
--- a/compiler/llvmGen/LlvmCodeGen/Base.hs
+++ b/compiler/llvmGen/LlvmCodeGen/Base.hs
@@ -29,6 +29,7 @@ import LlvmCodeGen.Regs
import CLabel
import CgUtils ( activeStgRegs )
+import Config
import Constants
import FastString
import OldCmm
@@ -80,7 +81,8 @@ widthToLlvmInt w = LMInt $ widthInBits w
-- | GHC Call Convention for LLVM
llvmGhcCC :: LlvmCallConvention
-llvmGhcCC = CC_Ncc 10
+llvmGhcCC | cGhcUnregisterised == "NO" = CC_Ncc 10
+ | otherwise = CC_Ccc
-- | Llvm Function type for Cmm function
llvmFunTy :: LlvmType
More information about the Cvs-ghc
mailing list