summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/X86
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/nativeGen/X86')
-rw-r--r--compiler/nativeGen/X86/CodeGen.hs26
1 files changed, 13 insertions, 13 deletions
diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs
index 5f0f716281..2ade04d36f 100644
--- a/compiler/nativeGen/X86/CodeGen.hs
+++ b/compiler/nativeGen/X86/CodeGen.hs
@@ -63,12 +63,12 @@ import Data.Word
is32BitPlatform :: NatM Bool
is32BitPlatform = do
- dflags <- getDynFlagsNat
+ dflags <- getDynFlags
return $ target32Bit (targetPlatform dflags)
sse2Enabled :: NatM Bool
sse2Enabled = do
- dflags <- getDynFlagsNat
+ dflags <- getDynFlags
case platformArch (targetPlatform dflags) of
ArchX86_64 -> -- SSE2 is fixed on for x86_64. It would be
-- possible to make it optional, but we'd need to
@@ -81,7 +81,7 @@ sse2Enabled = do
sse4_2Enabled :: NatM Bool
sse4_2Enabled = do
- dflags <- getDynFlagsNat
+ dflags <- getDynFlags
return (dopt Opt_SSE4_2 dflags)
if_sse2 :: NatM a -> NatM a -> NatM a
@@ -96,7 +96,7 @@ cmmTopCodeGen
cmmTopCodeGen (CmmProc info lab (ListGraph blocks)) = do
(nat_blocks,statics) <- mapAndUnzipM basicBlockCodeGen blocks
picBaseMb <- getPicBaseMaybeNat
- dflags <- getDynFlagsNat
+ dflags <- getDynFlags
let proc = CmmProc info lab (ListGraph $ concat nat_blocks)
tops = proc : concat statics
os = platformOS $ targetPlatform dflags
@@ -400,7 +400,7 @@ iselExpr64 (CmmMachOp (MO_UU_Conv _ W64) [expr]) = do
)
iselExpr64 expr
- = do dflags <- getDynFlagsNat
+ = do dflags <- getDynFlags
pprPanic "iselExpr64(i386)" (pprPlatform (targetPlatform dflags) expr)
@@ -887,7 +887,7 @@ getRegister' _ (CmmLit lit)
in
return (Any size code)
-getRegister' _ other = do dflags <- getDynFlagsNat
+getRegister' _ other = do dflags <- getDynFlags
pprPanic "getRegister(x86)" (pprPlatform (targetPlatform dflags) other)
@@ -1131,7 +1131,7 @@ isOperand _ _ = False
memConstant :: Int -> CmmLit -> NatM Amode
memConstant align lit = do
lbl <- getNewLabelNat
- dflags <- getDynFlagsNat
+ dflags <- getDynFlags
(addr, addr_code) <- if target32Bit (targetPlatform dflags)
then do dynRef <- cmmMakeDynamicReference
dflags
@@ -1228,10 +1228,10 @@ getCondCode (CmmMachOp mop [x, y])
MO_U_Lt _ -> condIntCode LU x y
MO_U_Le _ -> condIntCode LEU x y
- _other -> do dflags <- getDynFlagsNat
+ _other -> do dflags <- getDynFlags
pprPanic "getCondCode(x86,x86_64,sparc)" (pprPlatform (targetPlatform dflags) (CmmMachOp mop [x,y]))
-getCondCode other = do dflags <- getDynFlagsNat
+getCondCode other = do dflags <- getDynFlags
pprPanic "getCondCode(2)(x86,sparc)" (pprPlatform (targetPlatform dflags) other)
@@ -1621,7 +1621,7 @@ genCCall is32Bit (CmmPrim (MO_PopCnt width)) dest_regs@[CmmHinted dst _]
unitOL (POPCNT size (OpReg src_r)
(getRegisterReg False (CmmLocal dst))))
else do
- dflags <- getDynFlagsNat
+ dflags <- getDynFlags
targetExpr <- cmmMakeDynamicReference dflags addImportNat
CallReference lbl
let target = CmmCallee targetExpr CCallConv
@@ -1959,7 +1959,7 @@ genCCall64 target dest_regs args =
(arg_reg, arg_code) <- getSomeReg arg
delta <- getDeltaNat
setDeltaNat (delta-arg_size)
- dflags <- getDynFlagsNat
+ dflags <- getDynFlags
let platform = targetPlatform dflags
code' = code `appOL` arg_code `appOL` toOL [
SUB (intSize wordWidth) (OpImm (ImmInt arg_size)) (OpReg rsp) ,
@@ -1992,7 +1992,7 @@ maxInlineSizeThreshold = 128
outOfLineCmmOp :: CallishMachOp -> Maybe HintedCmmFormal -> [HintedCmmActual] -> NatM InstrBlock
outOfLineCmmOp mop res args
= do
- dflags <- getDynFlagsNat
+ dflags <- getDynFlags
targetExpr <- cmmMakeDynamicReference dflags addImportNat CallReference lbl
let target = CmmCallee targetExpr CCallConv
@@ -2063,7 +2063,7 @@ genSwitch expr ids
= do
(reg,e_code) <- getSomeReg expr
lbl <- getNewLabelNat
- dflags <- getDynFlagsNat
+ dflags <- getDynFlags
dynRef <- cmmMakeDynamicReference dflags addImportNat DataReference lbl
(tableReg,t_code) <- getSomeReg $ dynRef
let op = OpAddr (AddrBaseIndex (EABaseReg tableReg)