Skip to content

Commit ddd5c2c

Browse files
author
git apple-llvm automerger
committed
Merge commit '772863e3120f' from llvm.org/main into next
2 parents 7f3af7c + 772863e commit ddd5c2c

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ bool SystemZELFFrameLowering::assignCalleeSavedSpillSlots(
181181
StartSPOffset = Offset;
182182
}
183183
Offset -= SystemZMC::ELFCallFrameSize;
184-
int FrameIdx = MFFrame.CreateFixedSpillStackObject(8, Offset);
184+
int FrameIdx =
185+
MFFrame.CreateFixedSpillStackObject(getPointerSize(), Offset);
185186
CS.setFrameIdx(FrameIdx);
186187
} else
187188
CS.setFrameIdx(INT32_MAX);
@@ -456,8 +457,10 @@ void SystemZELFFrameLowering::processFunctionBeforeFrameFinalized(
456457
// are outside the reach of an unsigned 12-bit displacement.
457458
// Create 2 for the case where both addresses in an MVC are
458459
// out of range.
459-
RS->addScavengingFrameIndex(MFFrame.CreateStackObject(8, Align(8), false));
460-
RS->addScavengingFrameIndex(MFFrame.CreateStackObject(8, Align(8), false));
460+
RS->addScavengingFrameIndex(
461+
MFFrame.CreateStackObject(getPointerSize(), Align(8), false));
462+
RS->addScavengingFrameIndex(
463+
MFFrame.CreateStackObject(getPointerSize(), Align(8), false));
461464
}
462465

463466
// If R6 is used as an argument register it is still callee saved. If it in
@@ -870,7 +873,7 @@ int SystemZELFFrameLowering::getOrCreateFramePointerSaveIndex(
870873
if (!FI) {
871874
MachineFrameInfo &MFFrame = MF.getFrameInfo();
872875
int Offset = getBackchainOffset(MF) - SystemZMC::ELFCallFrameSize;
873-
FI = MFFrame.CreateFixedObject(8, Offset, false);
876+
FI = MFFrame.CreateFixedObject(getPointerSize(), Offset, false);
874877
ZFI->setFramePointerSaveIndex(FI);
875878
}
876879
return FI;
@@ -906,7 +909,7 @@ int SystemZXPLINKFrameLowering::getOrCreateFramePointerSaveIndex(
906909
int FI = ZFI->getFramePointerSaveIndex();
907910
if (!FI) {
908911
MachineFrameInfo &MFFrame = MF.getFrameInfo();
909-
FI = MFFrame.CreateFixedObject(8, 0, false);
912+
FI = MFFrame.CreateFixedObject(getPointerSize(), 0, false);
910913
MFFrame.setStackID(FI, TargetStackID::NoAlloc);
911914
ZFI->setFramePointerSaveIndex(FI);
912915
}
@@ -1032,7 +1035,7 @@ bool SystemZXPLINKFrameLowering::assignCalleeSavedSpillSlots(
10321035
// Non-volatile GPRs are saved in the dedicated register save area at
10331036
// the bottom of the stack and are not truly part of the "normal" stack
10341037
// frame. Mark the frame index as NoAlloc to indicate it as such.
1035-
unsigned RegSize = 8;
1038+
unsigned RegSize = getPointerSize();
10361039
int FrameIdx =
10371040
(FPSI && Offset == 0)
10381041
? FPSI
@@ -1302,7 +1305,7 @@ void SystemZXPLINKFrameLowering::emitPrologue(MachineFunction &MF,
13021305
for (unsigned I = FixedRegs; I < SystemZ::XPLINK64NumArgGPRs; I++) {
13031306
uint64_t StartOffset = MFFrame.getOffsetAdjustment() +
13041307
MFFrame.getStackSize() + Regs.getCallFrameSize() +
1305-
getOffsetOfLocalArea() + I * 8;
1308+
getOffsetOfLocalArea() + I * getPointerSize();
13061309
unsigned Reg = GPRs[I];
13071310
BuildMI(MBB, MBBI, DL, TII->get(SystemZ::STG))
13081311
.addReg(Reg)

0 commit comments

Comments
 (0)