[llvm-commits] [llvm] r80960 - /llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp

Bill Wendling isanbard at gmail.com
Thu Sep 3 15:19:22 PDT 2009


Author: void
Date: Thu Sep  3 17:19:22 2009
New Revision: 80960

URL: http://llvm.org/viewvc/llvm-project?rev=80960&view=rev
Log:
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/trunk/lib/Target/X86/X86RegisterInfo.cpp

Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=80960&r1=80959&r2=80960&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Thu Sep  3 17:19:22 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-commits mailing list