projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed CPS to account for info tables not being next to code
[ghc-hetmet.git]
/
compiler
/
cmm
/
CmmCPSGen.hs
diff --git
a/compiler/cmm/CmmCPSGen.hs
b/compiler/cmm/CmmCPSGen.hs
index
c78525e
..
da72b54
100644
(file)
--- a/
compiler/cmm/CmmCPSGen.hs
+++ b/
compiler/cmm/CmmCPSGen.hs
@@
-17,6
+17,7
@@
import CmmCallConv
import CgProf (curCCS, curCCSAddr)
import CgUtils (cmmOffsetW)
import CgProf (curCCS, curCCSAddr)
import CgUtils (cmmOffsetW)
+import CgInfoTbls (entryCode)
import SMRep
import ForeignCall
import SMRep
import ForeignCall
@@
-178,7
+179,7
@@
continuationToProc (max_stack, update_frame_size, formats) stack_use uniques
FinalSwitch expr targets -> [CmmSwitch expr targets]
FinalReturn arguments ->
tail_call curr_stack
FinalSwitch expr targets -> [CmmSwitch expr targets]
FinalReturn arguments ->
tail_call curr_stack
- (CmmLoad (CmmReg spReg) wordRep)
+ (entryCode (CmmLoad (CmmReg spReg) wordRep))
arguments
FinalJump target arguments ->
tail_call curr_stack target arguments
arguments
FinalJump target arguments ->
tail_call curr_stack target arguments
@@
-385,7
+386,6
@@
pack_continuation allow_header_set
(ContinuationFormat _ cont_id cont_frame_size live_regs)
= pack_frame curr_frame_size cont_frame_size maybe_header continuation_args
where
(ContinuationFormat _ cont_id cont_frame_size live_regs)
= pack_frame curr_frame_size cont_frame_size maybe_header continuation_args
where
- continuation_function = CmmLit $ CmmLabel $ fromJust cont_id
continuation_args = map (maybe Nothing (Just . CmmReg . CmmLocal))
live_regs
needs_header_set =
continuation_args = map (maybe Nothing (Just . CmmReg . CmmLocal))
live_regs
needs_header_set =
@@
-394,7
+394,7
@@
pack_continuation allow_header_set
_ -> isJust cont_id
maybe_header = if allow_header_set && needs_header_set
_ -> isJust cont_id
maybe_header = if allow_header_set && needs_header_set
- then Just continuation_function
+ then maybe Nothing (Just . CmmLit . CmmLabel . entryLblToInfoLbl) cont_id
else Nothing
pack_frame :: WordOff -- ^ Current frame size
else Nothing
pack_frame :: WordOff -- ^ Current frame size