Pad static literals to word size in the code generator
[ghc-hetmet.git] / compiler / cmm / PprCmm.hs
index 4dc4887..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
 --
@@ -566,4 +572,3 @@ pprBlockId b = ppr $ getUnique b
 
 commafy :: [SDoc] -> SDoc
 commafy xs = hsep $ punctuate comma xs
-