Align stack size to DWORD boundary

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30964 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov 2006-10-14 20:53:35 +00:00
parent d2b5668208
commit 54b1cc6d8a

View File

@ -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;