[commit: ghc] wip/kavon-nosplit-llvm: addressing a TODO related to FFI calls (be00cf3)

git at git.haskell.org git at git.haskell.org
Tue Mar 13 03:44:53 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/kavon-nosplit-llvm
Link       : http://ghc.haskell.org/trac/ghc/changeset/be00cf3a98f256c8cfa56715c187138d586d0118/ghc

>---------------------------------------------------------------

commit be00cf3a98f256c8cfa56715c187138d586d0118
Author: Kavon Farvardin <kavon at farvard.in>
Date:   Sun Mar 11 17:23:34 2018 -0500

    addressing a TODO related to FFI calls


>---------------------------------------------------------------

be00cf3a98f256c8cfa56715c187138d586d0118
 compiler/codeGen/StgCmmForeign.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/codeGen/StgCmmForeign.hs b/compiler/codeGen/StgCmmForeign.hs
index 9666643..8fd2903 100644
--- a/compiler/codeGen/StgCmmForeign.hs
+++ b/compiler/codeGen/StgCmmForeign.hs
@@ -225,7 +225,7 @@ emitForeignCall safety results target args
     target' <- load_target_into_temp target
     args' <- mapM maybe_assign_temp args
     k <- newBlockId
-    let (off, _, copyout) = copyInOflow dflags NativeReturn (Young k) results []
+    let (off, retRegs, copyout) = copyInOflow dflags NativeReturn (Young k) results []
        -- see Note [safe foreign call convention]
     tscope <- getTickScope
     emit $
@@ -241,7 +241,7 @@ emitForeignCall safety results target args
             <*> mkLabel k tscope
             <*> copyout
            )
-    return (ReturnedTo k off []) -- TODO(kavon) this will need to change once you get to foreign calls
+    return (ReturnedTo k off retRegs)
 
 load_target_into_temp :: ForeignTarget -> FCode ForeignTarget
 load_target_into_temp (ForeignTarget expr conv) = do



More information about the ghc-commits mailing list