[llvm-branch-commits] [llvm-branch] r81973 - /llvm/branches/release_26/lib/Target/X86/X86RegisterInfo.cpp

Tanya Lattner tonic at nondot.org
Tue Sep 15 18:04:03 PDT 2009


Author: tbrethou
Date: Tue Sep 15 20:04:02 2009
New Revision: 81973

URL: http://llvm.org/viewvc/llvm-project?rev=81973&view=rev
Log:
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.

Modified:
    llvm/branches/release_26/lib/Target/X86/X86RegisterInfo.cpp

Modified: llvm/branches/release_26/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_26/lib/Target/X86/X86RegisterInfo.cpp?rev=81973&r1=81972&r2=81973&view=diff

==============================================================================
--- llvm/branches/release_26/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/branches/release_26/lib/Target/X86/X86RegisterInfo.cpp Tue Sep 15 20:04:02 2009
@@ -1086,12 +1086,12 @@
       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);





More information about the llvm-branch-commits mailing list