aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2006-10-14 20:53:35 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2006-10-14 20:53:35 +0000
commit54b1cc6d8a2e5299c13db0fa3438b78cab13de71 (patch)
tree87d70ac919cc0157be7a167f4775e4324fe602c0
parentd2b5668208ac9c699be39408f68f4dee9deb90f0 (diff)
Align stack size to DWORD boundary
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30964 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86AsmPrinter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp
index 4ab72eef8e..829219dac5 100644
--- a/lib/Target/X86/X86AsmPrinter.cpp
+++ b/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;