[commit: ghc] ghc-7.4: Fix for unregisterised compilation: isStrangeTypeGlobal CCCS = True (0ea1e77)

Ian Lynagh igloo at earth.li
Fri Jan 6 14:20:58 CET 2012


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

On branch  : ghc-7.4

http://hackage.haskell.org/trac/ghc/changeset/0ea1e77a8d404ac09fea740a43da9ae880ab8187

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

commit 0ea1e77a8d404ac09fea740a43da9ae880ab8187
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Wed Jan 4 15:13:56 2012 +0000

    Fix for unregisterised compilation: isStrangeTypeGlobal CCCS = True
    
    Needed by #5357

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

 compiler/cmm/PprC.hs |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
index c16066d..21826f8 100644
--- a/compiler/cmm/PprC.hs
+++ b/compiler/cmm/PprC.hs
@@ -757,12 +757,14 @@ isStrangeTypeReg (CmmLocal _)   = False
 isStrangeTypeReg (CmmGlobal g)  = isStrangeTypeGlobal g
 
 isStrangeTypeGlobal :: GlobalReg -> Bool
+isStrangeTypeGlobal CCCS                = True
 isStrangeTypeGlobal CurrentTSO          = True
 isStrangeTypeGlobal CurrentNursery      = True
 isStrangeTypeGlobal BaseReg             = True
 isStrangeTypeGlobal r                   = isFixedPtrGlobalReg r
 
 strangeRegType :: CmmReg -> Maybe SDoc
+strangeRegType (CmmGlobal CCCS) = Just (ptext (sLit "struct CostCentreStack_ *"))
 strangeRegType (CmmGlobal CurrentTSO) = Just (ptext (sLit "struct StgTSO_ *"))
 strangeRegType (CmmGlobal CurrentNursery) = Just (ptext (sLit "struct bdescr_ *"))
 strangeRegType (CmmGlobal BaseReg) = Just (ptext (sLit "struct StgRegTable_ *"))





More information about the Cvs-ghc mailing list