Added an SRT to each CmmCall and added the current SRT to the CgMonad
[ghc-hetmet.git] / compiler / nativeGen / AsmCodeGen.lhs
index f909d24..b3ca844 100644 (file)
@@ -444,6 +444,7 @@ fixAssign (CmmAssign (CmmGlobal reg) src)
   where
        reg_or_addr = get_GlobalReg_reg_or_addr reg
 
+{-
 fixAssign (CmmCall target results args)
   = mapAndUnzipUs fixResult results `thenUs` \ (results',stores) ->
     returnUs (CmmCall target results' args :
@@ -459,6 +460,7 @@ fixAssign (CmmCall target results args)
                              [CmmStore baseRegAddr (CmmReg local)])
        fixResult other =
          returnUs (other,[])
+-}
 
 fixAssign other_stmt = returnUs [other_stmt]
 
@@ -534,7 +536,7 @@ cmmStmtConFold stmt
            -> do addr' <- cmmExprConFold JumpReference addr
                  return $ CmmJump addr' regs
 
-       CmmCall target regs args
+       CmmCall target regs args srt
           -> do target' <- case target of
                              CmmForeignCall e conv -> do
                                e' <- cmmExprConFold CallReference e
@@ -543,7 +545,7 @@ cmmStmtConFold stmt
                  args' <- mapM (\(arg, hint) -> do
                                   arg' <- cmmExprConFold DataReference arg
                                   return (arg', hint)) args
-                return $ CmmCall target' regs args'
+                return $ CmmCall target' regs args' srt
 
         CmmCondBranch test dest
            -> do test' <- cmmExprConFold DataReference test