X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2FcodeGen%2FStgCmmUtils.hs;h=bf452c46514f8462038a6647395f3ff562f12a86;hb=984a288119983912d40a80845c674ee4b83a19ce;hp=9ef5862eaafd7db62c1e9c3ba648926291ad75f2;hpb=e239aa2329416a2822fcc03c4ed486c7d28739e1;p=ghc-hetmet.git diff --git a/compiler/codeGen/StgCmmUtils.hs b/compiler/codeGen/StgCmmUtils.hs index 9ef5862..bf452c4 100644 --- a/compiler/codeGen/StgCmmUtils.hs +++ b/compiler/codeGen/StgCmmUtils.hs @@ -44,13 +44,12 @@ module StgCmmUtils ( ) where #include "HsVersions.h" -#include "MachRegs.h" +#include "../includes/stg/MachRegs.h" import StgCmmMonad import StgCmmClosure import BlockId import Cmm -import CmmExpr import MkZipCfgCmm import CLabel import CmmUtils @@ -284,15 +283,15 @@ tagToClosure tycon tag -- ------------------------------------------------------------------------- -emitRtsCall :: LitString -> [(CmmExpr,ForeignHint)] -> Bool -> FCode () +emitRtsCall :: FastString -> [(CmmExpr,ForeignHint)] -> Bool -> FCode () emitRtsCall fun args safe = emitRtsCall' [] fun args Nothing safe -- The 'Nothing' says "save all global registers" -emitRtsCallWithVols :: LitString -> [(CmmExpr,ForeignHint)] -> [GlobalReg] -> Bool -> FCode () +emitRtsCallWithVols :: FastString -> [(CmmExpr,ForeignHint)] -> [GlobalReg] -> Bool -> FCode () emitRtsCallWithVols fun args vols safe = emitRtsCall' [] fun args (Just vols) safe -emitRtsCallWithResult :: LocalReg -> ForeignHint -> LitString +emitRtsCallWithResult :: LocalReg -> ForeignHint -> FastString -> [(CmmExpr,ForeignHint)] -> Bool -> FCode () emitRtsCallWithResult res hint fun args safe = emitRtsCall' [(res,hint)] fun args Nothing safe @@ -300,7 +299,7 @@ emitRtsCallWithResult res hint fun args safe -- Make a call to an RTS C procedure emitRtsCall' :: [(LocalReg,ForeignHint)] - -> LitString + -> FastString -> [(CmmExpr,ForeignHint)] -> Maybe [GlobalReg] -> Bool -- True <=> CmmSafe call @@ -314,7 +313,7 @@ emitRtsCall' res fun args _vols safe where call updfr_off = if safe then - mkCall fun_expr NativeCall res' args' updfr_off + mkCmmCall fun_expr res' args' updfr_off else mkUnsafeCall (ForeignTarget fun_expr (ForeignConvention CCallConv arg_hints res_hints)) res' args'