summaryrefslogtreecommitdiffstats
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
commit34e051d53775174cb218682af3ba450e13e98dd2 (patch)
tree70e1ed2e1d38c7d6df1174d58eb7d99dfb26853a
parent2b7f6359518430360a71b81e12891b746701a042 (diff)
downloadbcm5719-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.cpp3
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;
OpenPOWER on IntegriCloud