From: simonmar Date: Wed, 2 Nov 2005 11:56:56 +0000 (+0000) Subject: [project @ 2005-11-02 11:56:56 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~90 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=3348660bc5073046a0bf133aaf174ede9f504d27;hp=f7e8044f26652537e9b87c4481a45cdfb1bafb8a;p=ghc-hetmet.git [project @ 2005-11-02 11:56:56 by simonmar] Fix warnings when assigning the result of a foreign call to BaseReg (as now happens in SMP mode with resumeThread()). --- diff --git a/ghc/compiler/cmm/PprC.hs b/ghc/compiler/cmm/PprC.hs index 8bcfd0c..7427f50 100644 --- a/ghc/compiler/cmm/PprC.hs +++ b/ghc/compiler/cmm/PprC.hs @@ -654,6 +654,7 @@ isStrangeTypeGlobal r = isPtrGlobalReg r strangeRegType :: CmmReg -> Maybe SDoc strangeRegType (CmmGlobal CurrentTSO) = Just (ptext SLIT("struct StgTSO_ *")) strangeRegType (CmmGlobal CurrentNursery) = Just (ptext SLIT("struct bdescr_ *")) +strangeRegType (CmmGlobal BaseReg) = Just (ptext SLIT("struct StgRegTable_ *")) strangeRegType _ = Nothing -- pprReg just prints the register name. @@ -707,6 +708,9 @@ pprCall ppr_fn cconv results args vols where ppr_results [] = empty ppr_results [(one,hint)] + | Just ty <- strangeRegType one + = pprReg one <> ptext SLIT(" = ") <> parens ty + | otherwise = pprReg one <> ptext SLIT(" = ") <> pprUnHint hint (cmmRegRep one) ppr_results _other = panic "pprCall: multiple results"