Commit 48a96bdb authored by Simon Marlow's avatar Simon Marlow
Browse files

Improve LLVM options for ARMv6

- -float-abi=hard also works for arm v6
- pass -mattr=+vfp2 if we have VFP2

Submitted by: Karel Gardas <karel.gardas@centrum.cz>
parent a47ee23a
......@@ -1454,13 +1454,16 @@ runPhase LlvmLlc input_fn dflags
else if (elem VFPv3D16 ext)
then ["-mattr=+v7,+vfp3,+d16"]
else []
ArchARM ARMv6 ext _ -> if (elem VFPv2 ext)
then ["-mattr=+v6,+vfp2"]
else ["-mattr=+v6"]
_ -> []
-- On Ubuntu/Debian with ARM hard float ABI, LLVM's llc still
-- compiles into soft-float ABI. We need to explicitly set abi
-- to hard
abiOpts = case platformArch (targetPlatform dflags) of
ArchARM ARMv7 _ HARD -> ["-float-abi=hard"]
ArchARM ARMv7 _ _ -> []
ArchARM _ _ HARD -> ["-float-abi=hard"]
ArchARM _ _ _ -> []
_ -> []
sseOpts | isSse4_2Enabled dflags = ["-mattr=+sse42"]
......
Markdown is supported
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