Commit 200d2b8b authored by mrchebas@gmail.com's avatar mrchebas@gmail.com

prettifying Cmm: print MachOps as identifiers by replacing ' ' with '_'

parent 5e2dabea
......@@ -339,7 +339,10 @@ genMachOp 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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment