X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FNCGMonad.hs;h=a8283ea279738cf3773e00b675384a9f58739fa4;hb=c62b824e9e8808eb3845ddb1614494b0575eaafd;hp=cd1adf670b6e63fc152f025ce38602e6ae81a590;hpb=7fc749a43b4b6b85d234fa95d4928648259584f4;p=ghc-hetmet.git diff --git a/compiler/nativeGen/NCGMonad.hs b/compiler/nativeGen/NCGMonad.hs index cd1adf6..a8283ea 100644 --- a/compiler/nativeGen/NCGMonad.hs +++ b/compiler/nativeGen/NCGMonad.hs @@ -1,3 +1,10 @@ +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + -- ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow 1993-2004 @@ -6,13 +13,6 @@ -- -- ----------------------------------------------------------------------------- -{-# OPTIONS -w #-} --- The above warning supression flag is a temporary kludge. --- While working on this module you are encouraged to remove it and fix --- any warnings in the module. See --- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings --- for details - module NCGMonad ( NatM_State(..), mkNatM_State, @@ -25,10 +25,9 @@ module NCGMonad ( #include "HsVersions.h" -import Cmm ( BlockId(..) ) +import BlockId import CLabel ( CLabel, mkAsmTempLabel ) import MachRegs -import MachOp ( MachRep ) import UniqSupply import Unique ( Unique ) import DynFlags @@ -102,10 +101,10 @@ getBlockIdNat = do u <- getUniqueNat; return (BlockId u) getNewLabelNat :: NatM CLabel getNewLabelNat = do u <- getUniqueNat; return (mkAsmTempLabel u) -getNewRegNat :: MachRep -> NatM Reg +getNewRegNat :: Size -> NatM Reg getNewRegNat rep = do u <- getUniqueNat; return (mkVReg u rep) -getNewRegPairNat :: MachRep -> NatM (Reg,Reg) +getNewRegPairNat :: Size -> NatM (Reg,Reg) getNewRegPairNat rep = do u <- getUniqueNat let lo = mkVReg u rep; hi = getHiVRegFromLo lo @@ -114,7 +113,7 @@ getNewRegPairNat rep = do getPicBaseMaybeNat :: NatM (Maybe Reg) getPicBaseMaybeNat = NatM (\state -> (natm_pic state, state)) -getPicBaseNat :: MachRep -> NatM Reg +getPicBaseNat :: Size -> NatM Reg getPicBaseNat rep = do mbPicBase <- getPicBaseMaybeNat case mbPicBase of