@@ -181,7 +181,8 @@ bool SystemZELFFrameLowering::assignCalleeSavedSpillSlots(
181
181
StartSPOffset = Offset;
182
182
}
183
183
Offset -= SystemZMC::ELFCallFrameSize;
184
- int FrameIdx = MFFrame.CreateFixedSpillStackObject (8 , Offset);
184
+ int FrameIdx =
185
+ MFFrame.CreateFixedSpillStackObject (getPointerSize (), Offset);
185
186
CS.setFrameIdx (FrameIdx);
186
187
} else
187
188
CS.setFrameIdx (INT32_MAX);
@@ -456,8 +457,10 @@ void SystemZELFFrameLowering::processFunctionBeforeFrameFinalized(
456
457
// are outside the reach of an unsigned 12-bit displacement.
457
458
// Create 2 for the case where both addresses in an MVC are
458
459
// 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 ));
461
464
}
462
465
463
466
// If R6 is used as an argument register it is still callee saved. If it in
@@ -870,7 +873,7 @@ int SystemZELFFrameLowering::getOrCreateFramePointerSaveIndex(
870
873
if (!FI) {
871
874
MachineFrameInfo &MFFrame = MF.getFrameInfo ();
872
875
int Offset = getBackchainOffset (MF) - SystemZMC::ELFCallFrameSize;
873
- FI = MFFrame.CreateFixedObject (8 , Offset, false );
876
+ FI = MFFrame.CreateFixedObject (getPointerSize () , Offset, false );
874
877
ZFI->setFramePointerSaveIndex (FI);
875
878
}
876
879
return FI;
@@ -906,7 +909,7 @@ int SystemZXPLINKFrameLowering::getOrCreateFramePointerSaveIndex(
906
909
int FI = ZFI->getFramePointerSaveIndex ();
907
910
if (!FI) {
908
911
MachineFrameInfo &MFFrame = MF.getFrameInfo ();
909
- FI = MFFrame.CreateFixedObject (8 , 0 , false );
912
+ FI = MFFrame.CreateFixedObject (getPointerSize () , 0 , false );
910
913
MFFrame.setStackID (FI, TargetStackID::NoAlloc);
911
914
ZFI->setFramePointerSaveIndex (FI);
912
915
}
@@ -1032,7 +1035,7 @@ bool SystemZXPLINKFrameLowering::assignCalleeSavedSpillSlots(
1032
1035
// Non-volatile GPRs are saved in the dedicated register save area at
1033
1036
// the bottom of the stack and are not truly part of the "normal" stack
1034
1037
// frame. Mark the frame index as NoAlloc to indicate it as such.
1035
- unsigned RegSize = 8 ;
1038
+ unsigned RegSize = getPointerSize () ;
1036
1039
int FrameIdx =
1037
1040
(FPSI && Offset == 0 )
1038
1041
? FPSI
@@ -1302,7 +1305,7 @@ void SystemZXPLINKFrameLowering::emitPrologue(MachineFunction &MF,
1302
1305
for (unsigned I = FixedRegs; I < SystemZ::XPLINK64NumArgGPRs; I++) {
1303
1306
uint64_t StartOffset = MFFrame.getOffsetAdjustment () +
1304
1307
MFFrame.getStackSize () + Regs.getCallFrameSize () +
1305
- getOffsetOfLocalArea () + I * 8 ;
1308
+ getOffsetOfLocalArea () + I * getPointerSize () ;
1306
1309
unsigned Reg = GPRs[I];
1307
1310
BuildMI (MBB, MBBI, DL, TII->get (SystemZ::STG))
1308
1311
.addReg (Reg)
0 commit comments