summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/NCGMonad.hs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-07-15 18:13:49 +0100
committerIan Lynagh <igloo@earth.li>2011-07-15 19:03:23 +0100
commit730301c60e6ccd9ed4fb248bcd2399f938a43d25 (patch)
tree680c524b5353acaff547e2a739185f3593557873 /compiler/nativeGen/NCGMonad.hs
parent5c718b15e83e3b205e13c882660a4952714c3b4c (diff)
downloadhaskell-730301c60e6ccd9ed4fb248bcd2399f938a43d25.tar.gz
Remove more defaultTargetPlatform uses
Diffstat (limited to 'compiler/nativeGen/NCGMonad.hs')
-rw-r--r--compiler/nativeGen/NCGMonad.hs20
1 files changed, 11 insertions, 9 deletions
diff --git a/compiler/nativeGen/NCGMonad.hs b/compiler/nativeGen/NCGMonad.hs
index 2a7376838a..57d2adf9b8 100644
--- a/compiler/nativeGen/NCGMonad.hs
+++ b/compiler/nativeGen/NCGMonad.hs
@@ -130,18 +130,20 @@ getNewLabelNat
getNewRegNat :: Size -> NatM Reg
-getNewRegNat rep
- = do u <- getUniqueNat
- return (RegVirtual $ targetMkVirtualReg u rep)
+getNewRegNat rep
+ = do u <- getUniqueNat
+ dflags <- getDynFlagsNat
+ return (RegVirtual $ targetMkVirtualReg (targetPlatform dflags) u rep)
getNewRegPairNat :: Size -> NatM (Reg,Reg)
-getNewRegPairNat rep
- = do u <- getUniqueNat
- let vLo = targetMkVirtualReg u rep
- let lo = RegVirtual $ targetMkVirtualReg u rep
- let hi = RegVirtual $ getHiVirtualRegFromLo vLo
- return (lo, hi)
+getNewRegPairNat rep
+ = do u <- getUniqueNat
+ dflags <- getDynFlagsNat
+ let vLo = targetMkVirtualReg (targetPlatform dflags) u rep
+ let lo = RegVirtual $ targetMkVirtualReg (targetPlatform dflags) u rep
+ let hi = RegVirtual $ getHiVirtualRegFromLo vLo
+ return (lo, hi)
getPicBaseMaybeNat :: NatM (Maybe Reg)