summaryrefslogtreecommitdiff
path: root/utils/TableGen/DAGISelEmitter.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 /utils/TableGen/DAGISelEmitter.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 'utils/TableGen/DAGISelEmitter.cpp')
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index 1f568ad5ee..05c27c47d9 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/utils/TableGen/DAGISelEmitter.cpp
@@ -1795,12 +1795,15 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
OS << "SDNode *Select_LABEL(const SDOperand &N) {\n"
<< " SDOperand Chain = N.getOperand(0);\n"
<< " SDOperand N1 = N.getOperand(1);\n"
- << " unsigned C = cast<ConstantSDNode>(N1)->getValue();\n"
- << " SDOperand Tmp = CurDAG->getTargetConstant(C, MVT::i32);\n"
+ << " SDOperand N2 = N.getOperand(2);\n"
+ << " unsigned C1 = cast<ConstantSDNode>(N1)->getValue();\n"
+ << " unsigned C2 = cast<ConstantSDNode>(N2)->getValue();\n"
+ << " SDOperand Tmp1 = CurDAG->getTargetConstant(C1, MVT::i32);\n"
+ << " SDOperand Tmp2 = CurDAG->getTargetConstant(C2, MVT::i32);\n"
<< " AddToISelQueue(Chain);\n"
- << " SDOperand Ops[] = { Tmp, Chain };\n"
+ << " SDOperand Ops[] = { Tmp1, Tmp2, Chain };\n"
<< " return CurDAG->getTargetNode(TargetInstrInfo::LABEL,\n"
- << " MVT::Other, Ops, 2);\n"
+ << " MVT::Other, Ops, 3);\n"
<< "}\n\n";
OS << "SDNode *Select_EXTRACT_SUBREG(const SDOperand &N) {\n"