[commit: ghc] master: Fix comment about pointer tagging (2325afe)
git at git.haskell.org
git at git.haskell.org
Thu Nov 10 14:16:49 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/2325afe92cf73479756d3a29af82588b7bbe9d92/ghc
>---------------------------------------------------------------
commit 2325afe92cf73479756d3a29af82588b7bbe9d92
Author: Alex Biehl <alexbiehl at gmail.com>
Date: Thu Nov 10 13:12:30 2016 +0100
Fix comment about pointer tagging
`Lcall` enters the closure. If it has tags we jump directly to `Lret`.
Confirmed with some generated cmm code:
```
R1 = _s2pP::P64;
Sp = Sp - 8;
if (R1 & 7 != 0) goto c2x0; else goto c2x1;
c2x1:
call (I64[R1])(R1) returns to c2x0, args: 8, res: 8, upd: 8;
c2x0:
_s2pQ::P64 = R1;
```
>---------------------------------------------------------------
2325afe92cf73479756d3a29af82588b7bbe9d92
compiler/codeGen/StgCmmExpr.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler/codeGen/StgCmmExpr.hs b/compiler/codeGen/StgCmmExpr.hs
index fdd902d..cd73ec5 100644
--- a/compiler/codeGen/StgCmmExpr.hs
+++ b/compiler/codeGen/StgCmmExpr.hs
@@ -872,7 +872,7 @@ emitEnter fun = do
-- The generated code will be something like this:
--
-- R1 = fun -- copyout
- -- if (fun & 7 != 0) goto Lcall else goto Lret
+ -- if (fun & 7 != 0) goto Lret else goto Lcall
-- Lcall:
-- call [fun] returns to Lret
-- Lret:
More information about the ghc-commits
mailing list