Align stack size to DWORD boundary

llvm-svn: 30964
This commit is contained in:
Anton Korobeynikov 2006-10-14 20:53:35 +00:00
parent 2b7f635951
commit 34e051d537
1 changed files with 3 additions and 0 deletions

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;