mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Update MaxCallFrameSize regardless of the relocation model selected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132070 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1319,7 +1319,6 @@ MipsTargetLowering::LowerCall(SDValue Chain, SDValue Callee,
|
||||
Chain = DAG.getNode(MipsISD::JmpLink, dl, NodeTys, &Ops[0], Ops.size());
|
||||
InFlag = Chain.getValue(1);
|
||||
|
||||
if (IsPIC) {
|
||||
// Function can have an arbitrary number of calls, so
|
||||
// hold the LastArgStackLoc with the biggest offset.
|
||||
unsigned MaxCallFrameSize = MipsFI->getMaxCallFrameSize();
|
||||
@@ -1333,6 +1332,7 @@ MipsTargetLowering::LowerCall(SDValue Chain, SDValue Callee,
|
||||
if (MaxCallFrameSize < NextStackOffset) {
|
||||
MipsFI->setMaxCallFrameSize(NextStackOffset);
|
||||
|
||||
if (IsPIC) {
|
||||
// $gp restore slot must be aligned.
|
||||
unsigned StackAlignment = TFL->getStackAlignment();
|
||||
NextStackOffset = (NextStackOffset + StackAlignment - 1) /
|
||||
|
Reference in New Issue
Block a user