diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2006-10-14 20:53:35 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2006-10-14 20:53:35 +0000 |
commit | 34e051d53775174cb218682af3ba450e13e98dd2 (patch) | |
tree | 70e1ed2e1d38c7d6df1174d58eb7d99dfb26853a | |
parent | 2b7f6359518430360a71b81e12891b746701a042 (diff) | |
download | bcm5719-llvm-34e051d53775174cb218682af3ba450e13e98dd2.tar.gz bcm5719-llvm-34e051d53775174cb218682af3ba450e13e98dd2.zip |
Align stack size to DWORD boundary
llvm-svn: 30964
-rw-r--r-- | llvm/lib/Target/X86/X86AsmPrinter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86AsmPrinter.cpp b/llvm/lib/Target/X86/X86AsmPrinter.cpp index 4ab72eef8ef..829219dac5b 100644 --- a/llvm/lib/Target/X86/X86AsmPrinter.cpp +++ b/llvm/lib/Target/X86/X86AsmPrinter.cpp @@ -53,6 +53,9 @@ static X86FunctionInfo calculateFunctionInfo(const Function *F, AI != AE; ++AI) Size += TD->getTypeSize(AI->getType()); + // Size should be aligned to DWORD boundary + Size = ((Size + 3)/4)*4; + // We're not supporting tooooo huge arguments :) Info.setBytesToPopOnReturn((unsigned int)Size); return Info; |