projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5e2dabe
)
prettifying Cmm: print MachOps as identifiers by replacing ' ' with '_'
author
mrchebas@gmail.com
<unknown>
Wed, 17 Jan 2007 13:32:34 +0000
(13:32 +0000)
committer
mrchebas@gmail.com
<unknown>
Wed, 17 Jan 2007 13:32:34 +0000
(13:32 +0000)
compiler/cmm/PprCmm.hs
patch
|
blob
|
history
diff --git
a/compiler/cmm/PprCmm.hs
b/compiler/cmm/PprCmm.hs
index
714c80e
..
cb2adf7
100644
(file)
--- a/
compiler/cmm/PprCmm.hs
+++ b/
compiler/cmm/PprCmm.hs
@@
-339,7
+339,10
@@
genMachOp mop args
|| isJust (infixMachOp7 mop)
|| isJust (infixMachOp8 mop) = parens (pprExpr (CmmMachOp mop args))
|| isJust (infixMachOp7 mop)
|| isJust (infixMachOp8 mop) = parens (pprExpr (CmmMachOp mop args))
- | otherwise = char '%' <> pprMachOp mop <> parens (commafy (map pprExpr args))
+ | otherwise = char '%' <> ppr_op <> parens (commafy (map pprExpr args))
+ where ppr_op = text (map (\c -> if c == ' ' then '_' else c)
+ (show mop))
+ -- replace spaces in (show mop) with underscores,
--
-- Unsigned ops on the word size of the machine get nice symbols.
--
-- Unsigned ops on the word size of the machine get nice symbols.