Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : ghc-7.2

http://hackage.haskell.org/trac/ghc/changeset/c9c3328482827c43b304fd75d0ac3f9c46218a8e

>---------------------------------------------------------------

commit c9c3328482827c43b304fd75d0ac3f9c46218a8e
Author: David Terei <[email protected]>
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



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to