[LLVMdev] Stack alignment on X86 AVX seems incorrect

Cameron McInally cameron.mcinally at nyu.edu
Thu Mar 1 15:04:22 PST 2012


On Thu, Mar 1, 2012 at 5:30 PM, Cameron McInally
<cameron.mcinally at nyu.edu>wrote:

> Aligning the stack to 32 bytes when there are auto AVX vector variables
>> present shouldn't necessarily break the x86-64 ABI, as long as smaller auto
>> variables remain properly aligned.  A similar approach was taken for i386
>> in GCC in order to support SSE vectors.
>>
>>
This topic is starting to come back to me now. The reason the GCC solution
above did not work for us is that we do not build all of the libraries used
with our compiler. For example, some are proprietary compiled object files
and some are GCC compiled object files from other sources. If our object
files called another library, and in turn that library called a function in
our object code, it's not possible to ensure that the frame of the current
function is still aligned to 32 bytes. That was the determining factor in
my implementation.

That is, unless you know something that I don't. I'm pretty new to compiler
development. :)

-Cameron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120301/02183e07/attachment.html>


More information about the llvm-dev mailing list