summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2009-09-16 01:04:02 +0000
committerTanya Lattner <tonic@nondot.org>2009-09-16 01:04:02 +0000
commit2622b3d983f3abc29b6e348c59fcfabc5551a27b (patch)
tree92193f215dd4d5bc4818aef1aeb9a296eb105ca5
parent518c626dd093e5689301fbcff1eb0b6081beee6a (diff)
downloadllvm-2622b3d983f3abc29b6e348c59fcfabc5551a27b.tar.gz
Merge 80960 from mainline.
If we've pushed registers onto the stack, but aren't adjusting the stack pointer (i.e., there are no local variables and stuff), we still need to output FDE information for the pushed registers. llvm-svn: 81973
-rw-r--r--llvm/lib/Target/X86/X86RegisterInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86RegisterInfo.cpp b/llvm/lib/Target/X86/X86RegisterInfo.cpp
index 112ff1ce24de..f922a84c0562 100644
--- a/llvm/lib/Target/X86/X86RegisterInfo.cpp
+++ b/llvm/lib/Target/X86/X86RegisterInfo.cpp
@@ -1086,12 +1086,12 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
emitSPUpdate(MBB, MBBI, StackPtr, -(int64_t)NumBytes, Is64Bit, TII);
}
- if (NumBytes && needsFrameMoves) {
+ if ((NumBytes || PushedRegs) && needsFrameMoves) {
// Mark end of stack pointer adjustment.
unsigned LabelId = MMI->NextLabelID();
BuildMI(MBB, MBBI, DL, TII.get(X86::DBG_LABEL)).addImm(LabelId);
- if (!HasFP) {
+ if (!HasFP && NumBytes) {
// Define the current CFA rule to use the provided offset.
if (StackSize) {
MachineLocation SPDst(MachineLocation::VirtualFP);