summaryrefslogtreecommitdiff
path: root/lib/Target
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
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')
-rw-r--r--lib/Target/CellSPU/SPURegisterInfo.cpp6
-rw-r--r--lib/Target/PowerPC/PPCRegisterInfo.cpp8
-rw-r--r--lib/Target/Target.td2
-rw-r--r--lib/Target/X86/X86RegisterInfo.cpp8
4 files changed, 12 insertions, 12 deletions
diff --git a/lib/Target/CellSPU/SPURegisterInfo.cpp b/lib/Target/CellSPU/SPURegisterInfo.cpp
index 3c89c7f306..39edccb606 100644
--- a/lib/Target/CellSPU/SPURegisterInfo.cpp
+++ b/lib/Target/CellSPU/SPURegisterInfo.cpp
@@ -454,7 +454,7 @@ void SPURegisterInfo::emitPrologue(MachineFunction &MF) const
if (hasDebugInfo) {
// Mark effective beginning of when frame pointer becomes valid.
FrameLabelId = MMI->NextLabelID();
- BuildMI(MBB, MBBI, TII.get(ISD::LABEL)).addImm(FrameLabelId);
+ BuildMI(MBB, MBBI, TII.get(ISD::LABEL)).addImm(FrameLabelId).addImm(0);
}
// Adjust stack pointer, spilling $lr -> 16($sp) and $sp -> -FrameSize($sp)
@@ -514,7 +514,7 @@ void SPURegisterInfo::emitPrologue(MachineFunction &MF) const
// Mark effective beginning of when frame pointer is ready.
unsigned ReadyLabelId = MMI->NextLabelID();
- BuildMI(MBB, MBBI, TII.get(ISD::LABEL)).addImm(ReadyLabelId);
+ BuildMI(MBB, MBBI, TII.get(ISD::LABEL)).addImm(ReadyLabelId).addImm(0);
MachineLocation FPDst(SPU::R1);
MachineLocation FPSrc(MachineLocation::VirtualFP);
@@ -528,7 +528,7 @@ void SPURegisterInfo::emitPrologue(MachineFunction &MF) const
MachineBasicBlock::iterator MBBI = prior(MBB.end());
// Insert terminator label
unsigned BranchLabelId = MMI->NextLabelID();
- BuildMI(MBB, MBBI, TII.get(SPU::LABEL)).addImm(BranchLabelId);
+ BuildMI(MBB, MBBI, TII.get(SPU::LABEL)).addImm(BranchLabelId).addImm(0);
}
}
}
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));
diff --git a/lib/Target/Target.td b/lib/Target/Target.td
index d155e713c0..4b1ab2850c 100644
--- a/lib/Target/Target.td
+++ b/lib/Target/Target.td
@@ -334,7 +334,7 @@ def INLINEASM : Instruction {
}
def LABEL : Instruction {
let OutOperandList = (ops);
- let InOperandList = (ops i32imm:$id);
+ let InOperandList = (ops i32imm:$id, i32imm:$flavor);
let AsmString = "";
let Namespace = "TargetInstrInfo";
let hasCtrlDep = 1;
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.