summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-09-20 13:32:12 +0100
committerSimon Marlow <marlowsd@gmail.com>2012-09-20 14:00:07 +0100
commit987710c1eb099ecd8982ef1c212450f9640d99ff (patch)
tree65abc51b2e5084cd39d0292b4ea0104593082047 /compiler
parent448ad24fd71b3aa399a80083515ab655b11756ba (diff)
downloadhaskell-987710c1eb099ecd8982ef1c212450f9640d99ff.tar.gz
non-tablesNextToCode fix for returns in the new codegen
Diffstat (limited to 'compiler')
-rw-r--r--compiler/cmm/MkGraph.hs7
-rw-r--r--compiler/codeGen/StgCmmLayout.hs4
2 files changed, 4 insertions, 7 deletions
diff --git a/compiler/cmm/MkGraph.hs b/compiler/cmm/MkGraph.hs
index 3233dbed8c..5ea3d656a3 100644
--- a/compiler/cmm/MkGraph.hs
+++ b/compiler/cmm/MkGraph.hs
@@ -11,7 +11,7 @@ module MkGraph
, mkJumpReturnsTo
, mkJump, mkDirectJump, mkForeignJump, mkForeignJumpExtra, mkJumpGC
, mkCbranch, mkSwitch
- , mkReturn, mkReturnSimple, mkComment, mkCallEntry, mkBranch
+ , mkReturn, mkComment, mkCallEntry, mkBranch
, copyInOflow, copyOutOflow
, noExtraStack
, toCall, Transfer(..)
@@ -228,11 +228,6 @@ mkReturn dflags e actuals updfr_off =
lastWithArgs dflags Ret Old NativeReturn actuals updfr_off $
toCall e Nothing updfr_off 0
-mkReturnSimple :: DynFlags -> [CmmActual] -> UpdFrameOffset -> CmmAGraph
-mkReturnSimple dflags actuals updfr_off =
- mkReturn dflags e actuals updfr_off
- where e = CmmLoad (CmmStackSlot Old updfr_off) (gcWord dflags)
-
mkBranch :: BlockId -> CmmAGraph
mkBranch bid = mkLast (CmmBranch bid)
diff --git a/compiler/codeGen/StgCmmLayout.hs b/compiler/codeGen/StgCmmLayout.hs
index fa80edc96c..75d8d1c38f 100644
--- a/compiler/codeGen/StgCmmLayout.hs
+++ b/compiler/codeGen/StgCmmLayout.hs
@@ -85,7 +85,9 @@ emitReturn results
; case sequel of
Return _ ->
do { adjustHpBackwards
- ; emit (mkReturnSimple dflags results updfr_off) }
+ ; let e = CmmLoad (CmmStackSlot Old updfr_off) (gcWord dflags)
+ ; emit (mkReturn dflags (entryCode dflags e) results updfr_off)
+ }
AssignTo regs adjust ->
do { when adjust adjustHpBackwards
; emitMultiAssign regs results }