summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-07-05 13:11:52 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-07-05 13:11:52 +0000
commit23943229f6e951f674490641f7441643862b358f (patch)
tree00100bc5db8872b3f96d553b5f85a074e37e2757 /llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp
parent8ef843fc724dd91e9443d9534d28aed2dc1d3d51 (diff)
downloadbcm5719-llvm-23943229f6e951f674490641f7441643862b358f.tar.gz
bcm5719-llvm-23943229f6e951f674490641f7441643862b358f.zip
[SystemZ] Allocate a second register scavenging slot
This is another prerequisite for frame-to-frame MVC copies. I'll commit the patch that makes use of the slot separately. The downside of trying to test many corner cases with each of the available addressing modes is that a fair few tests need to account for the new frame layout. I do still think it's useful to have all these tests though, since it's something that wouldn't get much coverage otherwise. llvm-svn: 185698
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp b/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp
index 3ae59782f60..a58da901720 100644
--- a/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp
@@ -270,10 +270,14 @@ processFunctionBeforeFrameFinalized(MachineFunction &MF,
MachineFrameInfo *MFFrame = MF.getFrameInfo();
uint64_t MaxReach = (MFFrame->estimateStackSize(MF) +
SystemZMC::CallFrameSize * 2);
- if (!isUInt<12>(MaxReach))
- // We may need a register scavenging slot if some parts of the frame
+ if (!isUInt<12>(MaxReach)) {
+ // We may need register scavenging slots if some parts of the frame
// are outside the reach of an unsigned 12-bit displacement.
+ // Create 2 for the case where both addresses in an MVC are
+ // out of range.
RS->addScavengingFrameIndex(MFFrame->CreateStackObject(8, 8, false));
+ RS->addScavengingFrameIndex(MFFrame->CreateStackObject(8, 8, false));
+ }
}
// Emit instructions before MBBI (in MBB) to add NumBytes to Reg.
OpenPOWER on IntegriCloud