summaryrefslogtreecommitdiff
path: root/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
commit47734db936bd3b434d60f9daee5b34bc722ee3ba (patch)
tree762d666959806fd85e031f0b5b0d336985c83bbd /lib/Target/SystemZ/SystemZFrameLowering.cpp
parent61de142984aa6cb1acfe4725183193d04e437420 (diff)
downloadllvm-47734db936bd3b434d60f9daee5b34bc722ee3ba.tar.gz
llvm-47734db936bd3b434d60f9daee5b34bc722ee3ba.tar.bz2
llvm-47734db936bd3b434d60f9daee5b34bc722ee3ba.tar.xz
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185698 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ/SystemZFrameLowering.cpp')
-rw-r--r--lib/Target/SystemZ/SystemZFrameLowering.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Target/SystemZ/SystemZFrameLowering.cpp b/lib/Target/SystemZ/SystemZFrameLowering.cpp
index 3ae59782f6..a58da90172 100644
--- a/lib/Target/SystemZ/SystemZFrameLowering.cpp
+++ b/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.