X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcodeGen%2FStgCmmUtils.hs;h=48416e3f69a42db85ce5846ce8224aef54f18f10;hb=a52ff7619e8b7d74a9d933d922eeea49f580bca8;hp=73b30523498dadc1c7a1e37e26d85f7fe49785d6;hpb=e4caa74b6c809cd17c5d1f7d472b9a47b2ea6f1c;p=ghc-hetmet.git diff --git a/compiler/codeGen/StgCmmUtils.hs b/compiler/codeGen/StgCmmUtils.hs index 73b3052..48416e3 100644 --- a/compiler/codeGen/StgCmmUtils.hs +++ b/compiler/codeGen/StgCmmUtils.hs @@ -20,7 +20,7 @@ module StgCmmUtils ( tagToClosure, mkTaggedObjectLoad, - callerSaveVolatileRegs, get_GlobalReg_addr, + callerSaves, callerSaveVolatileRegs, get_GlobalReg_addr, cmmAndWord, cmmOrWord, cmmNegate, cmmEqWord, cmmNeWord, cmmUGtWord, @@ -49,11 +49,11 @@ module StgCmmUtils ( import StgCmmMonad import StgCmmClosure import BlockId -import Cmm -import MkZipCfgCmm +import CmmDecl +import CmmExpr hiding (regUsedIn) +import MkGraph import CLabel import CmmUtils -import PprCmm ( {- instances -} ) import ForeignCall import IdInfo @@ -98,9 +98,11 @@ 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 fod) = CmmLabel (mkForeignLabel fs ms is_dyn fod) - where - is_dyn = False -- ToDo: fix me +mkSimpleLit (MachLabel fs ms fod) + = CmmLabel (mkForeignLabel fs ms labelSrc fod) + where + -- TODO: Literal labels might not actually be in the current package... + labelSrc = ForeignLabelInThisPackage mkSimpleLit other = pprPanic "mkSimpleLit" (ppr other) mkLtOp :: Literal -> MachOp @@ -594,7 +596,6 @@ reg `regUsedIn` CmmRegOff (CmmLocal reg') _ = reg == reg' reg `regUsedIn` CmmMachOp _ es = any (reg `regUsedIn`) es _reg `regUsedIn` _other = False -- The CmmGlobal cases - ------------------------------------------------------------------------- -- mkSwitch -------------------------------------------------------------------------