Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
3fff0020
Commit
3fff0020
authored
Aug 20, 2011
by
kgardas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
on ARMv7 with VFPv3[D16] support pass appropriate -mattr value to LLVM llc
parent
bab9a72d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
compiler/main/DriverPipeline.hs
compiler/main/DriverPipeline.hs
+15
-3
No files found.
compiler/main/DriverPipeline.hs
View file @
3fff0020
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment