From 3348660bc5073046a0bf133aaf174ede9f504d27 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 2 Nov 2005 11:56:56 +0000 Subject: [PATCH] [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()). --- ghc/compiler/cmm/PprC.hs | 4 ++++ 1 file changed, 4 insertions(+) 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" -- 1.7.10.4