diff options
| author | Simon Marlow <marlowsd@gmail.com> | 2013-01-25 20:50:00 +0000 |
|---|---|---|
| committer | Simon Marlow <marlowsd@gmail.com> | 2013-01-25 20:54:58 +0000 |
| commit | 48a96bdbec81d9db527b6b4ad637a630508f3561 (patch) | |
| tree | 454c2023435cd1b1edf0b94fb08206f9076a9224 /compiler | |
| parent | a47ee23a82a669808569b3865383bf932b67fa95 (diff) | |
| download | haskell-48a96bdbec81d9db527b6b4ad637a630508f3561.tar.gz | |
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>
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/main/DriverPipeline.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index c24bb51833..81d0bc0165 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1454,14 +1454,17 @@ 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"] | isSse2Enabled dflags = ["-mattr=+sse2"] |
