projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
errno corresponding to ERROR_NO_DATA should be EPIPE (non-threaded RTS)
[ghc-hetmet.git]
/
compiler
/
cmm
/
PprCmm.hs
diff --git
a/compiler/cmm/PprCmm.hs
b/compiler/cmm/PprCmm.hs
index
d8d34c3
..
a9df2b9
100644
(file)
--- a/
compiler/cmm/PprCmm.hs
+++ b/
compiler/cmm/PprCmm.hs
@@
-265,6
+265,8
@@
pprStmt stmt = case stmt of
pp_lhs | null results = empty
| otherwise = commafy (map ppr_ar results) <+> equals
-- Don't print the hints on a native C-- call
pp_lhs | null results = empty
| otherwise = commafy (map ppr_ar results) <+> equals
-- Don't print the hints on a native C-- call
+
+ ppr_ar :: Outputable a => CmmHinted a -> SDoc
ppr_ar (CmmHinted ar k) = case cconv of
CmmCallConv -> ppr ar
_ -> ppr (ar,k)
ppr_ar (CmmHinted ar k) = case cconv of
CmmCallConv -> ppr ar
_ -> ppr (ar,k)
@@
-272,11
+274,16
@@
pprStmt stmt = case stmt of
CmmCallConv -> empty
_ -> ptext (sLit("foreign")) <+> doubleQuotes (ppr cconv)
CmmCallConv -> empty
_ -> ptext (sLit("foreign")) <+> doubleQuotes (ppr cconv)
+ -- Call a CallishMachOp, like sin or cos that might be implemented as a library call.
CmmCall (CmmPrim op) results args safety ret ->
pprStmt (CmmCall (CmmCallee (CmmLit lbl) CCallConv)
results args safety ret)
where
CmmCall (CmmPrim op) results args safety ret ->
pprStmt (CmmCall (CmmCallee (CmmLit lbl) CCallConv)
results args safety ret)
where
- lbl = CmmLabel (mkForeignLabel (mkFastString (show op)) Nothing False IsFunction)
+ -- HACK: A CallishMachOp doesn't really correspond to a ForeignLabel, but we
+ -- use one to get the label printed.
+ lbl = CmmLabel (mkForeignLabel
+ (mkFastString (show op))
+ Nothing ForeignLabelInThisPackage IsFunction)
CmmBranch ident -> genBranch ident
CmmCondBranch expr ident -> genCondBranch expr ident
CmmBranch ident -> genBranch ident
CmmCondBranch expr ident -> genCondBranch expr ident