diff options
author | José Fonseca <jfonseca@vmware.com> | 2011-05-18 18:00:55 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2011-05-18 18:14:37 +0100 |
commit | 61c67eca7dbcef4b7b1398f5a9e0193597f304ed (patch) | |
tree | d4a358d25bf8ea721bc75e003d17f6dd31e51519 | |
parent | 8a98aabe0bcea42cfdc982001ae4876e3d9b1214 (diff) |
gallivm: Tell LLVM to not assume a 16-byte aligned stack on x86.
Fixes fdo 36738.
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index 843a14a500..0ccf6a698b 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -73,6 +73,19 @@ lp_set_target_options(void) #endif #endif + /* + * LLVM revision 123367 switched the default stack alignment to 16 bytes on + * Linux (and several other Unices in later revisions), to match recent gcc + * versions. + * + * However our drivers can be loaded by old binary applications, still + * maintaining a 4 bytes stack alignment. Therefore we must tell LLVM here + * to only assume a 4 bytes alignment for backwards compatibility. + */ +#if defined(PIPE_ARCH_X86) + llvm::StackAlignment = 4; +#endif + #if defined(DEBUG) || defined(PROFILE) llvm::NoFramePointerElim = true; #endif |