Commit b29e277d authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Change some conditional tests from Config.cTargetArch to platformArch

parent 7da235b1
...@@ -51,6 +51,7 @@ import SrcLoc ...@@ -51,6 +51,7 @@ import SrcLoc
import FastString import FastString
import LlvmCodeGen ( llvmFixupAsm ) import LlvmCodeGen ( llvmFixupAsm )
import MonadUtils import MonadUtils
import Platform
import Exception import Exception
import Data.IORef ( readIORef ) import Data.IORef ( readIORef )
...@@ -1059,7 +1060,7 @@ runPhase cc_phase input_fn dflags ...@@ -1059,7 +1060,7 @@ runPhase cc_phase input_fn dflags
-- than a double, which leads to unpredictable results. -- than a double, which leads to unpredictable results.
-- By default, we turn this off with -ffloat-store unless -- By default, we turn this off with -ffloat-store unless
-- the user specified -fexcess-precision. -- the user specified -fexcess-precision.
(if cTargetArch == I386 && (if platformArch (targetPlatform dflags) == ArchX86 &&
not (dopt Opt_ExcessPrecision dflags) not (dopt Opt_ExcessPrecision dflags)
then [ "-ffloat-store" ] then [ "-ffloat-store" ]
else []) ++ else []) ++
...@@ -1102,7 +1103,7 @@ runPhase cc_phase input_fn dflags ...@@ -1102,7 +1103,7 @@ runPhase cc_phase input_fn dflags
-- regardless of the ordering. -- regardless of the ordering.
-- --
-- This is a temporary hack. -- This is a temporary hack.
++ (if cTargetArch == Sparc ++ (if platformArch (targetPlatform dflags) == ArchSPARC
then ["-mcpu=v9"] then ["-mcpu=v9"]
else []) else [])
...@@ -1180,7 +1181,7 @@ runPhase As input_fn dflags ...@@ -1180,7 +1181,7 @@ runPhase As input_fn dflags
-- regardless of the ordering. -- regardless of the ordering.
-- --
-- This is a temporary hack. -- This is a temporary hack.
++ (if cTargetArch == Sparc ++ (if platformArch (targetPlatform dflags) == ArchSPARC
then [SysTools.Option "-mcpu=v9"] then [SysTools.Option "-mcpu=v9"]
else []) else [])
...@@ -1235,7 +1236,7 @@ runPhase SplitAs _input_fn dflags ...@@ -1235,7 +1236,7 @@ runPhase SplitAs _input_fn dflags
-- regardless of the ordering. -- regardless of the ordering.
-- --
-- This is a temporary hack. -- This is a temporary hack.
(if cTargetArch == Sparc (if platformArch (targetPlatform dflags) == ArchSPARC
then [SysTools.Option "-mcpu=v9"] then [SysTools.Option "-mcpu=v9"]
else []) ++ else []) ++
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment