Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/3fff0020aa802250a3b469967e4c474ae7239580 >--------------------------------------------------------------- commit 3fff0020aa802250a3b469967e4c474ae7239580 Author: Karel Gardas <[email protected]> Date: Sat Aug 20 23:53:22 2011 +0200 on ARMv7 with VFPv3[D16] support pass appropriate -mattr value to LLVM llc >--------------------------------------------------------------- compiler/main/DriverPipeline.hs | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 43e096e..0e87ec8 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1333,7 +1333,8 @@ runPhase LlvmLlc input_fn dflags SysTools.Option $ "-relocation-model=" ++ rmodel, SysTools.FileOption "" input_fn, SysTools.Option "-o", SysTools.FileOption "" output_fn] - ++ map SysTools.Option lc_opts) + ++ map SysTools.Option lc_opts + ++ map SysTools.Option fpOpts) return (LlvmMangle, output_fn) where @@ -1341,6 +1342,17 @@ runPhase LlvmLlc input_fn dflags llvmOpts = if platformOS (targetPlatform dflags) == OSDarwin then ["-O1", "-O2", "-O2"] else ["-O1", "-O2", "-O3"] + -- On ARMv7 using LLVM, LLVM fails to allocate floating point registers + -- while compiling GHC source code. It's probably due to fact + -- that it does not enable VFP by default. Let's do this manually + -- here + fpOpts = case platformArch (targetPlatform dflags) of + ArchARM ARMv7 ext -> if (elem VFPv3 ext) + then ["-mattr=+v7,+vfp3"] + else if (elem VFPv3D16 ext) + then ["-mattr=+v7,+vfp3,+d16"] + else [] + _ -> [] ----------------------------------------------------------------------------- -- LlvmMangle phase @@ -1465,8 +1477,8 @@ mkExtraObjToLinkIntoBinary dflags dep_packages = do elfSectionNote :: String elfSectionNote = case platformArch (targetPlatform dflags) of - ArchARM -> "%note" - _ -> "@note" + ArchARM _ _ -> "%note" + _ -> "@note" -- The "link info" is a string representing the parameters of the -- link. We save this information in the binary, and the next time we _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
