X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FnativeGen%2FAsmCodeGen.lhs;fp=compiler%2FnativeGen%2FAsmCodeGen.lhs;h=9ba3dfded44603e6146e123fed61367f80402a89;hp=3a6d97ffbb4d86671a25faec465dd38f1ef1ad70;hb=f0e3d7904df76f35676e105ed63e7b4eb961773a;hpb=daee7323b13a3f35cead6b94092adbcdfdcad568 diff --git a/compiler/nativeGen/AsmCodeGen.lhs b/compiler/nativeGen/AsmCodeGen.lhs index 3a6d97f..9ba3dfd 100644 --- a/compiler/nativeGen/AsmCodeGen.lhs +++ b/compiler/nativeGen/AsmCodeGen.lhs @@ -72,13 +72,9 @@ import UniqFM import Unique ( Unique, getUnique ) import UniqSupply import DynFlags -#if powerpc_TARGET_ARCH -import StaticFlags ( opt_Static, opt_PIC ) -#endif +import StaticFlags import Util -#if !defined(darwin_TARGET_OS) -import Config ( cProjectVersion ) -#endif +import Config import Digraph import qualified Pretty @@ -96,6 +92,7 @@ import Data.List import Data.Maybe import Control.Monad import System.IO +import Distribution.System {- The native-code generator has machine-independent and @@ -836,23 +833,21 @@ cmmExprConFold referenceKind expr (CmmLit $ CmmInt (fromIntegral off) wordWidth) ] -#if powerpc_TARGET_ARCH - -- On powerpc (non-PIC), it's easier to jump directly to a label than - -- to use the register table, so we replace these registers - -- with the corresponding labels: + -- On powerpc (non-PIC), it's easier to jump directly to a label than + -- to use the register table, so we replace these registers + -- with the corresponding labels: CmmReg (CmmGlobal EagerBlackholeInfo) - | not opt_PIC + | cTargetArch == PPC && not opt_PIC -> cmmExprConFold referenceKind $ CmmLit (CmmLabel (mkCmmCodeLabel rtsPackageId (fsLit "__stg_EAGER_BLACKHOLE_info"))) CmmReg (CmmGlobal GCEnter1) - | not opt_PIC + | cTargetArch == PPC && not opt_PIC -> cmmExprConFold referenceKind $ CmmLit (CmmLabel (mkCmmCodeLabel rtsPackageId (fsLit "__stg_gc_enter_1"))) CmmReg (CmmGlobal GCFun) - | not opt_PIC + | cTargetArch == PPC && not opt_PIC -> cmmExprConFold referenceKind $ CmmLit (CmmLabel (mkCmmCodeLabel rtsPackageId (fsLit "__stg_gc_fun"))) -#endif other -> return other