#4211: LLVM: Stack alignment on OSX
--------------------------------+-------------------------------------------
Reporter: dterei | Owner: dterei
Type: task | Status: new
Priority: normal | Milestone: 7.4.1
Component: Compiler (LLVM) | Version: 6.13
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: MacOS X | Blocking:
Architecture: x86 | Failure: None/Unknown
--------------------------------+-------------------------------------------
Comment(by dmp@…):
commit a9ce36118f0de3aeb427792f8f2c5ae097c94d3f
{{{
Author: David M Peixotto <[email protected]>
Date: Wed Oct 19 15:49:06 2011 -0500
Change stack alignment to 16+8 bytes in STG code
This patch changes the STG code so that %rsp to be aligned
to a 16-byte boundary + 8. This is the alignment required by
the x86_64 ABI on entry to a function. Previously we kept
%rsp aligned to a 16-byte boundary, but this was causing
problems for the LLVM backend (see #4211).
We now don't need to invoke llvm stack mangler on
x86_64 targets. Since the stack is now 16+8 byte algined in
STG land on x86_64, we don't need to mangle the stack
manipulations with the llvm mangler.
This patch only modifies the alignement for x86_64 backends.
Signed-off-by: David Terei <[email protected]>
compiler/llvmGen/LlvmMangler.hs | 6 +++-
compiler/nativeGen/X86/CodeGen.hs | 16 +++++++-----
rts/StgCRun.c | 46
+++++++++++++++++++++----------------
3 files changed, 39 insertions(+), 29 deletions(-)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4211#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs