mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-15 09:33:39 +00:00
The only target that uses this code (v9) always has argsOnStackHaveFixedSize
set to true (obviously) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15692 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
484577a870
commit
3927af8d70
@ -332,22 +332,7 @@ ComputeMaxOptionalArgsSize(const TargetMachine& target, const Function *F,
|
|||||||
if (numExtra <= 0)
|
if (numExtra <= 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
unsigned sizeForThisCall;
|
unsigned sizeForThisCall = numExtra * 8;
|
||||||
if (frameInfo.argsOnStackHaveFixedSize())
|
|
||||||
{
|
|
||||||
int argSize = frameInfo.getSizeOfEachArgOnStack();
|
|
||||||
sizeForThisCall = numExtra * (unsigned) argSize;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
assert(0 && "UNTESTED CODE: Size per stack argument is not "
|
|
||||||
"fixed on this architecture: use actual arg sizes to "
|
|
||||||
"compute MaxOptionalArgsSize");
|
|
||||||
sizeForThisCall = 0;
|
|
||||||
for (unsigned i = 0; i < numOperands; ++i)
|
|
||||||
sizeForThisCall += target.getTargetData().getTypeSize(callInst->
|
|
||||||
getOperand(i)->getType());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (maxSize < sizeForThisCall)
|
if (maxSize < sizeForThisCall)
|
||||||
maxSize = sizeForThisCall;
|
maxSize = sizeForThisCall;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user