X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FZipCfgCmmRep.hs;h=b08f2f302a4968dfa41de4e21836a681e1c3a13f;hb=617eb195e67525ffda967099fa8d9899e2b15ce8;hp=348ab5bf2bbffa50326594eff73e181deb40ab27;hpb=31a9d04804d9cacda35695c5397590516b964964;p=ghc-hetmet.git diff --git a/compiler/cmm/ZipCfgCmmRep.hs b/compiler/cmm/ZipCfgCmmRep.hs index 348ab5b..b08f2f3 100644 --- a/compiler/cmm/ZipCfgCmmRep.hs +++ b/compiler/cmm/ZipCfgCmmRep.hs @@ -110,16 +110,22 @@ data MidCallTarget -- The target of a MidUnsafeCall deriving Eq data Convention - = Native -- Native C-- call/return + = NativeDirectCall -- Native C-- call skipping the node (closure) argument + + | NativeNodeCall -- Native C-- call including the node argument - | Slow -- Slow entry points: all args pushed on the stack + | NativeReturn -- Native C-- return - | GC -- Entry to the garbage collector: uses the node reg! + | Slow -- Slow entry points: all args pushed on the stack - | PrimOp -- Calling prim ops + | GC -- Entry to the garbage collector: uses the node reg! - | Foreign -- Foreign call/return - ForeignConvention + | PrimOpCall -- Calling prim ops + + | PrimOpReturn -- Returning from prim ops + + | Foreign -- Foreign call/return + ForeignConvention | Private -- Used for control transfers within a (pre-CPS) procedure All @@ -456,7 +462,8 @@ pprMiddle stmt = pp_stmt <+> pp_debug MidForeignCall {} -> text "MidForeignCall" ppr_fc :: ForeignConvention -> SDoc -ppr_fc (ForeignConvention c _ _) = doubleQuotes (ppr c) +ppr_fc (ForeignConvention c args res) = + doubleQuotes (ppr c) <+> text "args: " <+> ppr args <+> text " results: " <+> ppr res ppr_safety :: ForeignSafety -> SDoc ppr_safety (Safe bid upd) = text "safe<" <> ppr bid <> text ", " <> ppr upd <> text ">" @@ -515,12 +522,15 @@ genFullCondBranch expr t f = ] pprConvention :: Convention -> SDoc -pprConvention (Native {}) = text "" -pprConvention Slow = text "" -pprConvention GC = text "" -pprConvention PrimOp = text "" -pprConvention (Foreign c) = ppr c -pprConvention (Private {}) = text "" +pprConvention (NativeNodeCall {}) = text "" +pprConvention (NativeDirectCall {}) = text "" +pprConvention (NativeReturn {}) = text "" +pprConvention Slow = text "" +pprConvention GC = text "" +pprConvention PrimOpCall = text "" +pprConvention PrimOpReturn = text "" +pprConvention (Foreign c) = ppr c +pprConvention (Private {}) = text "" pprForeignConvention :: ForeignConvention -> SDoc pprForeignConvention (ForeignConvention c as rs) = ppr c <> ppr as <> ppr rs