change the zipper representation of calls
[ghc-hetmet.git] / compiler / cmm / PprCmm.hs
index c31c4de..470b325 100644 (file)
@@ -40,7 +40,7 @@
 --
 
 module PprCmm
-    ( writeCmms, pprCmms, pprCmm, pprStmt, pprExpr, pprSection, pprStatic
+    ( writeCmms, pprCmms, pprCmm, pprStmt, pprExpr, pprSection, pprStatic, pprLit
     )
 where
 
@@ -295,9 +295,15 @@ genJump expr args =
                     CmmLoad (CmmReg _) _ -> pprExpr expr 
                     _ -> parens (pprExpr expr)
          , space
-         , parens  ( commafy $ map ppr args )
+         , parens  ( commafy $ map pprHinted args )
          , semi ]
 
+pprHinted :: Outputable a => (a, MachHint) -> SDoc
+pprHinted (a, NoHint)     = ppr a
+pprHinted (a, PtrHint)    = quotes(text "address") <+> ppr a
+pprHinted (a, SignedHint) = quotes(text "signed")  <+> ppr a
+pprHinted (a, FloatHint)  = quotes(text "float")   <+> ppr a
+
 -- --------------------------------------------------------------------------
 -- Return from a function. [1], Section 6.8.2 of version 1.128
 --
@@ -512,10 +518,10 @@ pprReg r
 pprLocalReg :: LocalReg -> SDoc
 pprLocalReg (LocalReg uniq rep follow) 
     = hcat [ char '_', ppr uniq, ty ] where
-  ty = if rep == wordRep && follow == KindNonPtr
+  ty = if rep == wordRep && follow == GCKindNonPtr
                 then empty
                 else dcolon <> ptr <> ppr rep
-  ptr = if follow == KindNonPtr
+  ptr = if follow == GCKindNonPtr
                 then empty
                 else doubleQuotes (text "ptr")
 
@@ -566,4 +572,3 @@ pprBlockId b = ppr $ getUnique b
 
 commafy :: [SDoc] -> SDoc
 commafy xs = hsep $ punctuate comma xs
-