summaryrefslogtreecommitdiff
path: root/ghc/compiler
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2006-03-24 09:34:43 +0000
committerSimon Marlow <simonmar@microsoft.com>2006-03-24 09:34:43 +0000
commit39f96fb8a4e0150edf6d090f05590d7d7450190a (patch)
tree409980f0949f587b8641f8c7e906f10183c17c00 /ghc/compiler
parent1eff6846ec58e0b480af27acacb3f2826e82728e (diff)
downloadhaskell-39f96fb8a4e0150edf6d090f05590d7d7450190a.tar.gz
omit the __DISCARD__() call if unregisterised
Diffstat (limited to 'ghc/compiler')
-rw-r--r--ghc/compiler/cmm/PprC.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/ghc/compiler/cmm/PprC.hs b/ghc/compiler/cmm/PprC.hs
index 51a3f07233..a8d30668b7 100644
--- a/ghc/compiler/cmm/PprC.hs
+++ b/ghc/compiler/cmm/PprC.hs
@@ -38,6 +38,7 @@ import UniqFM ( eltsUFM )
import FastString
import Outputable
import Constants
+import StaticFlags ( opt_Unregisterised )
-- The rest
import Data.List ( intersperse, groupBy )
@@ -709,7 +710,9 @@ pprCall ppr_fn cconv results args vols
-- to the callee, because the argument expressions may refer to
-- machine registers that are also used for passing arguments in the
-- C calling convention.
- ptext SLIT("__DISCARD__();") $$
+ (if (not opt_Unregisterised)
+ then ptext SLIT("__DISCARD__();")
+ else empty) $$
#endif
ppr_assign results (ppr_fn <> parens (commafy (map pprArg args))) <> semi $$
ptext SLIT("CALLER_RESTORE_SYSTEM") $$