Skip to content

Commit 2622b3d

Browse files
committed
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
1 parent 518c626 commit 2622b3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/X86/X86RegisterInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,12 +1086,12 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
10861086
emitSPUpdate(MBB, MBBI, StackPtr, -(int64_t)NumBytes, Is64Bit, TII);
10871087
}
10881088

1089-
if (NumBytes && needsFrameMoves) {
1089+
if ((NumBytes || PushedRegs) && needsFrameMoves) {
10901090
// Mark end of stack pointer adjustment.
10911091
unsigned LabelId = MMI->NextLabelID();
10921092
BuildMI(MBB, MBBI, DL, TII.get(X86::DBG_LABEL)).addImm(LabelId);
10931093

1094-
if (!HasFP) {
1094+
if (!HasFP && NumBytes) {
10951095
// Define the current CFA rule to use the provided offset.
10961096
if (StackSize) {
10971097
MachineLocation SPDst(MachineLocation::VirtualFP);

0 commit comments

Comments
 (0)