summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCRegisterInfo.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-01-31 09:59:15 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-01-31 09:59:15 +0000
commitbb81d97feb396a8bb21d074db1c57e9f66525f40 (patch)
tree1b7fda6273344331e160122778fe96319e45d842 /lib/Target/PowerPC/PPCRegisterInfo.cpp
parent8535624739e55ab7424eadf792e1a3b4123421c7 (diff)
downloadllvm-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/PowerPC/PPCRegisterInfo.cpp')
-rw-r--r--lib/Target/PowerPC/PPCRegisterInfo.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/PowerPC/PPCRegisterInfo.cpp b/lib/Target/PowerPC/PPCRegisterInfo.cpp
index ff8b359470..fa218263bc 100644
--- a/lib/Target/PowerPC/PPCRegisterInfo.cpp
+++ b/lib/Target/PowerPC/PPCRegisterInfo.cpp
@@ -712,11 +712,11 @@ void PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
// Prepare for frame info.
unsigned FrameLabelId = 0;
- // 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() == PPC::LABEL) {
+ MBBI != MBB.end() && MBBI->isDebugLabel()) {
++NumLabels;
++MBBI;
}
@@ -786,7 +786,7 @@ void PPCRegisterInfo::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(PPC::LABEL)).addImm(FrameLabelId);
+ BuildMI(MBB, MBBI, TII.get(PPC::LABEL)).addImm(FrameLabelId).addImm(0);
}
// Adjust stack pointer: r1 += NegFrameSize.
@@ -870,7 +870,7 @@ void PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
// Mark effective beginning of when frame pointer is ready.
unsigned ReadyLabelId = MMI->NextLabelID();
- BuildMI(MBB, MBBI, TII.get(PPC::LABEL)).addImm(ReadyLabelId);
+ BuildMI(MBB, MBBI, TII.get(PPC::LABEL)).addImm(ReadyLabelId).addImm(0);
MachineLocation FPDst(HasFP ? (IsPPC64 ? PPC::X31 : PPC::R31) :
(IsPPC64 ? PPC::X1 : PPC::R1));