aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 14:11:40 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 14:11:40 +0000
commit66f1b378bc6d7c52ed4398e0d26cc3c0e9865310 (patch)
tree3100eeea1f86c74f1442942e518e65eb3a4b3a42
parentc94fdf76dd6dc88ef696f4a33b43c8b3131a0931 (diff)
Do not forget to save R15 when we allocate stack frame
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75995 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/SystemZ/SystemZRegisterInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/SystemZ/SystemZRegisterInfo.cpp b/lib/Target/SystemZ/SystemZRegisterInfo.cpp
index dc1561fb1a..6e8982d94a 100644
--- a/lib/Target/SystemZ/SystemZRegisterInfo.cpp
+++ b/lib/Target/SystemZ/SystemZRegisterInfo.cpp
@@ -149,7 +149,8 @@ SystemZRegisterInfo::processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
/* FIXME: function calls eh_return */)
MF.getRegInfo().setPhysRegUsed(SystemZ::R14D);
- if (FFI->getObjectIndexEnd() != 0 || // Contains automatic variables
+ if (FFI->hasCalls() ||
+ FFI->getObjectIndexEnd() != 0 || // Contains automatic variables
FFI->hasVarSizedObjects() // Function calls dynamic alloca's
/* FIXME: function is varargs */)
MF.getRegInfo().setPhysRegUsed(SystemZ::R15D);