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,14 +1454,17 @@ runPhase LlvmLlc input_fn dflags ...@@ -1454,14 +1454,17 @@ runPhase LlvmLlc input_fn dflags
else if (elem VFPv3D16 ext) else if (elem VFPv3D16 ext)
then ["-mattr=+v7,+vfp3,+d16"] then ["-mattr=+v7,+vfp3,+d16"]
else [] 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 -- On Ubuntu/Debian with ARM hard float ABI, LLVM's llc still
-- compiles into soft-float ABI. We need to explicitly set abi -- compiles into soft-float ABI. We need to explicitly set abi
-- to hard -- to hard
abiOpts = case platformArch (targetPlatform dflags) of abiOpts = case platformArch (targetPlatform dflags) of
ArchARM ARMv7 _ HARD -> ["-float-abi=hard"] ArchARM _ _ HARD -> ["-float-abi=hard"]
ArchARM ARMv7 _ _ -> [] ArchARM _ _ _ -> []
_ -> [] _ -> []
sseOpts | isSse4_2Enabled dflags = ["-mattr=+sse42"] sseOpts | isSse4_2Enabled dflags = ["-mattr=+sse42"]
| isSse2Enabled dflags = ["-mattr=+sse2"] | isSse2Enabled dflags = ["-mattr=+sse2"]
......
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