mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Ensure that fastcall'ed function is correctly mangled & stack is
properly aligned git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34788 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -49,10 +49,8 @@ static X86FunctionInfo calculateFunctionInfo(const Function *F,
|
||||
|
||||
for (Function::const_arg_iterator AI = F->arg_begin(), AE = F->arg_end();
|
||||
AI != AE; ++AI)
|
||||
Size += TD->getTypeSize(AI->getType());
|
||||
|
||||
// Size should be aligned to DWORD boundary
|
||||
Size = ((Size + 3)/4)*4;
|
||||
// Size should be aligned to DWORD boundary
|
||||
Size += ((TD->getTypeSize(AI->getType()) + 3)/4)*4;
|
||||
|
||||
// We're not supporting tooooo huge arguments :)
|
||||
Info.setBytesToPopOnReturn((unsigned int)Size);
|
||||
|
Reference in New Issue
Block a user