summaryrefslogtreecommitdiff
path: root/ghc/compiler/cmm
diff options
context:
space:
mode:
authorsimonmar <unknown>2004-08-25 10:37:06 +0000
committersimonmar <unknown>2004-08-25 10:37:06 +0000
commit69cb15e2f6853435602f00ecbccd2598a9e7eea9 (patch)
treeae2137dd8a13f0b4819650fd68e00495e1ff5a82 /ghc/compiler/cmm
parent80a4263b3990b6f5bba77fe4c75fc8bb2423b784 (diff)
downloadhaskell-69cb15e2f6853435602f00ecbccd2598a9e7eea9.tar.gz
[project @ 2004-08-25 10:37:06 by simonmar]
fix braino in previous commit: we should cast the function result to the right type, not just assume (W_).
Diffstat (limited to 'ghc/compiler/cmm')
-rw-r--r--ghc/compiler/cmm/PprC.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/ghc/compiler/cmm/PprC.hs b/ghc/compiler/cmm/PprC.hs
index cc70a9a08a..51e429b0ae 100644
--- a/ghc/compiler/cmm/PprC.hs
+++ b/ghc/compiler/cmm/PprC.hs
@@ -682,7 +682,8 @@ pprCall ppr_fn cconv results args vols
where
ppr_results [] = empty
ppr_results [(one,hint)]
- = pprExpr (CmmReg one) <> ptext SLIT(" = ") <> pprUnHint hint
+ = pprExpr (CmmReg one) <> ptext SLIT(" = ")
+ <> pprUnHint hint (cmmRegRep one)
ppr_results _other = panic "pprCall: multiple results"
pprArg (expr, PtrHint)
@@ -693,10 +694,10 @@ pprCall ppr_fn cconv results args vols
pprArg (expr, _other)
= pprExpr expr
- pprUnHint PtrHint = mkW_
- pprUnHint SignedHint = mkW_
- pprUnHint _ = empty
-
+ pprUnHint PtrHint rep = parens (machRepCType rep)
+ pprUnHint SignedHint rep = parens (machRepCType rep)
+ pprUnHint _ _ = empty
+
save = save_restore SLIT("CALLER_SAVE")
restore = save_restore SLIT("CALLER_RESTORE")