projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added an SRT to each CmmCall and added the current SRT to the CgMonad
[ghc-hetmet.git]
/
compiler
/
nativeGen
/
AsmCodeGen.lhs
diff --git
a/compiler/nativeGen/AsmCodeGen.lhs
b/compiler/nativeGen/AsmCodeGen.lhs
index
ff3063c
..
b3ca844
100644
(file)
--- a/
compiler/nativeGen/AsmCodeGen.lhs
+++ b/
compiler/nativeGen/AsmCodeGen.lhs
@@
-444,16
+444,12
@@
fixAssign (CmmAssign (CmmGlobal reg) src)
where
reg_or_addr = get_GlobalReg_reg_or_addr reg
where
reg_or_addr = get_GlobalReg_reg_or_addr reg
-fixAssign (CmmCall target results args vols)
+{-
+fixAssign (CmmCall target results args)
= mapAndUnzipUs fixResult results `thenUs` \ (results',stores) ->
= mapAndUnzipUs fixResult results `thenUs` \ (results',stores) ->
- returnUs (caller_save ++
- CmmCall target results' args vols :
- caller_restore ++
+ returnUs (CmmCall target results' args :
concat stores)
where
concat stores)
where
- -- we also save/restore any caller-saves STG registers here
- (caller_save, caller_restore) = callerSaveVolatileRegs vols
-
fixResult g@(CmmGlobal reg,hint) =
case get_GlobalReg_reg_or_addr reg of
Left realreg -> returnUs (g, [])
fixResult g@(CmmGlobal reg,hint) =
case get_GlobalReg_reg_or_addr reg of
Left realreg -> returnUs (g, [])
@@
-464,6
+460,7
@@
fixAssign (CmmCall target results args vols)
[CmmStore baseRegAddr (CmmReg local)])
fixResult other =
returnUs (other,[])
[CmmStore baseRegAddr (CmmReg local)])
fixResult other =
returnUs (other,[])
+-}
fixAssign other_stmt = returnUs [other_stmt]
fixAssign other_stmt = returnUs [other_stmt]
@@
-539,7
+536,7
@@
cmmStmtConFold stmt
-> do addr' <- cmmExprConFold JumpReference addr
return $ CmmJump addr' regs
-> do addr' <- cmmExprConFold JumpReference addr
return $ CmmJump addr' regs
- CmmCall target regs args vols
+ CmmCall target regs args srt
-> do target' <- case target of
CmmForeignCall e conv -> do
e' <- cmmExprConFold CallReference e
-> do target' <- case target of
CmmForeignCall e conv -> do
e' <- cmmExprConFold CallReference e
@@
-548,7
+545,7
@@
cmmStmtConFold stmt
args' <- mapM (\(arg, hint) -> do
arg' <- cmmExprConFold DataReference arg
return (arg', hint)) args
args' <- mapM (\(arg, hint) -> do
arg' <- cmmExprConFold DataReference arg
return (arg', hint)) args
- return $ CmmCall target' regs args' vols
+ return $ CmmCall target' regs args' srt
CmmCondBranch test dest
-> do test' <- cmmExprConFold DataReference test
CmmCondBranch test dest
-> do test' <- cmmExprConFold DataReference test