X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2FcodeGen%2FCgUtils.hs;h=0a545432d670ae912cd2707b11736863be8ff4e2;hb=984a288119983912d40a80845c674ee4b83a19ce;hp=fd49cb718296be4cdc59ce7b104ac54fd0ccdd6f;hpb=176fa33f17dd78355cc572e006d2ab26898e2c69;p=ghc-hetmet.git diff --git a/compiler/codeGen/CgUtils.hs b/compiler/codeGen/CgUtils.hs index fd49cb7..0a54543 100644 --- a/compiler/codeGen/CgUtils.hs +++ b/compiler/codeGen/CgUtils.hs @@ -50,7 +50,7 @@ module CgUtils ( ) where #include "HsVersions.h" -#include "../includes/MachRegs.h" +#include "../includes/stg/MachRegs.h" import BlockId import CgMonad @@ -110,7 +110,7 @@ mkSimpleLit (MachWord i) = CmmInt i wordWidth mkSimpleLit (MachWord64 i) = CmmInt i W64 mkSimpleLit (MachFloat r) = CmmFloat r W32 mkSimpleLit (MachDouble r) = CmmFloat r W64 -mkSimpleLit (MachLabel fs ms) = CmmLabel (mkForeignLabel fs ms is_dyn) +mkSimpleLit (MachLabel fs ms fod) = CmmLabel (mkForeignLabel fs ms is_dyn fod) where is_dyn = False -- ToDo: fix me @@ -322,7 +322,6 @@ emitIfThenElse :: CmmExpr -- Boolean -- Emit (if e then x else y) emitIfThenElse cond then_part else_part = do { then_id <- newLabelC - ; else_id <- newLabelC ; join_id <- newLabelC ; stmtC (CmmCondBranch cond then_id) ; else_part @@ -332,15 +331,15 @@ emitIfThenElse cond then_part else_part ; labelC join_id } -emitRtsCall :: LitString -> [CmmHinted CmmExpr] -> Bool -> Code +emitRtsCall :: FastString -> [CmmHinted CmmExpr] -> Bool -> Code emitRtsCall fun args safe = emitRtsCall' [] fun args Nothing safe -- The 'Nothing' says "save all global registers" -emitRtsCallWithVols :: LitString -> [CmmHinted CmmExpr] -> [GlobalReg] -> Bool -> Code +emitRtsCallWithVols :: FastString -> [CmmHinted CmmExpr] -> [GlobalReg] -> Bool -> Code emitRtsCallWithVols fun args vols safe = emitRtsCall' [] fun args (Just vols) safe -emitRtsCallWithResult :: LocalReg -> ForeignHint -> LitString +emitRtsCallWithResult :: LocalReg -> ForeignHint -> FastString -> [CmmHinted CmmExpr] -> Bool -> Code emitRtsCallWithResult res hint fun args safe = emitRtsCall' [CmmHinted res hint] fun args Nothing safe @@ -348,7 +347,7 @@ emitRtsCallWithResult res hint fun args safe -- Make a call to an RTS C procedure emitRtsCall' :: [CmmHinted LocalReg] - -> LitString + -> FastString -> [CmmHinted CmmExpr] -> Maybe [GlobalReg] -> Bool -- True <=> CmmSafe call