diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-01-31 09:59:15 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-01-31 09:59:15 +0000 |
commit | bb81d97feb396a8bb21d074db1c57e9f66525f40 (patch) | |
tree | 1b7fda6273344331e160122778fe96319e45d842 /lib/Target/X86/X86RegisterInfo.cpp | |
parent | 8535624739e55ab7424eadf792e1a3b4123421c7 (diff) | |
download | llvm-bb81d97feb396a8bb21d074db1c57e9f66525f40.tar.gz llvm-bb81d97feb396a8bb21d074db1c57e9f66525f40.tar.bz2 llvm-bb81d97feb396a8bb21d074db1c57e9f66525f40.tar.xz |
Add an extra operand to LABEL nodes which distinguishes between debug, EH, or misc labels. This fixes the EH breakage. However I am not convinced this is *the* solution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46609 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86RegisterInfo.cpp')
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index 53efdc8d55..5f9f290ae7 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -525,11 +525,11 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const { X86FI->getCalleeSavedFrameSize() +(-TailCallReturnAddrDelta)); uint64_t NumBytes = StackSize - X86FI->getCalleeSavedFrameSize(); - // Skip over the labels which mark the beginning of the function. + // Skip over the debug labels which mark the beginning of the function. if (MMI && MMI->needsFrameInfo()) { unsigned NumLabels = 0; while (NumLabels <= 1 && - MBBI != MBB.end() && MBBI->getOpcode() == X86::LABEL) { + MBBI != MBB.end() && MBBI->isDebugLabel()) { ++NumLabels; ++MBBI; } @@ -557,7 +557,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const { if (MMI && MMI->needsFrameInfo()) { // Mark effective beginning of when frame pointer becomes valid. FrameLabelId = MMI->NextLabelID(); - BuildMI(MBB, MBBI, TII.get(X86::LABEL)).addImm(FrameLabelId); + BuildMI(MBB, MBBI, TII.get(X86::LABEL)).addImm(FrameLabelId).addImm(0); } // Update EBP with the new base value... @@ -569,7 +569,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const { if (MMI && MMI->needsFrameInfo()) { // Mark effective beginning of when frame pointer is ready. ReadyLabelId = MMI->NextLabelID(); - BuildMI(MBB, MBBI, TII.get(X86::LABEL)).addImm(ReadyLabelId); + BuildMI(MBB, MBBI, TII.get(X86::LABEL)).addImm(ReadyLabelId).addImm(0); } // Skip the callee-saved push instructions. |