projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Moved global register saving from the backend to codeGen
[ghc-hetmet.git]
/
compiler
/
cmm
/
PprCmm.hs
diff --git
a/compiler/cmm/PprCmm.hs
b/compiler/cmm/PprCmm.hs
index
06d68c0
..
4ade7a4
100644
(file)
--- a/
compiler/cmm/PprCmm.hs
+++ b/
compiler/cmm/PprCmm.hs
@@
-80,6
+80,9
@@
instance Outputable CmmExpr where
instance Outputable CmmReg where
ppr e = pprReg e
instance Outputable CmmReg where
ppr e = pprReg e
+instance Outputable LocalReg where
+ ppr e = pprLocalReg e
+
instance Outputable GlobalReg where
ppr e = pprGlobalReg e
instance Outputable GlobalReg where
ppr e = pprGlobalReg e
@@
-96,7
+99,7
@@
pprCmm (Cmm tops) = vcat $ intersperse (text "") $ map pprTop tops
pprTop :: CmmTop -> SDoc
pprTop (CmmProc info lbl params blocks )
pprTop :: CmmTop -> SDoc
pprTop (CmmProc info lbl params blocks )
- = vcat [ pprCLabel lbl <> parens (commafy $ map pprLocalReg params) <+> lbrace
+ = vcat [ pprCLabel lbl <> parens (commafy $ map ppr params) <+> lbrace
, nest 8 $ pprInfo info lbl
, nest 4 $ vcat (map ppr blocks)
, rbrace ]
, nest 8 $ pprInfo info lbl
, nest 4 $ vcat (map ppr blocks)
, rbrace ]
@@
-147,7
+150,7
@@
pprStmt stmt = case stmt of
-- call "ccall" foo(x, y)[r1, r2];
-- ToDo ppr volatile
-- call "ccall" foo(x, y)[r1, r2];
-- ToDo ppr volatile
- CmmCall (CmmForeignCall fn cconv) results args _volatile ->
+ CmmCall (CmmForeignCall fn cconv) results args ->
hcat [ ptext SLIT("call"), space,
doubleQuotes(ppr cconv), space,
target fn, parens ( commafy $ map ppr args ),
hcat [ ptext SLIT("call"), space,
doubleQuotes(ppr cconv), space,
target fn, parens ( commafy $ map ppr args ),
@@
-158,9
+161,9
@@
pprStmt stmt = case stmt of
target (CmmLit lit) = pprLit lit
target fn' = parens (ppr fn')
target (CmmLit lit) = pprLit lit
target fn' = parens (ppr fn')
- CmmCall (CmmPrim op) results args volatile ->
+ CmmCall (CmmPrim op) results args ->
pprStmt (CmmCall (CmmForeignCall (CmmLit lbl) CCallConv)
pprStmt (CmmCall (CmmForeignCall (CmmLit lbl) CCallConv)
- results args volatile)
+ results args)
where
lbl = CmmLabel (mkForeignLabel (mkFastString (show op)) Nothing False)
where
lbl = CmmLabel (mkForeignLabel (mkFastString (show op)) Nothing False)