aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-03-01 01:37:19 +0000
committerJim Grosbach <grosbach@apple.com>2011-03-01 01:37:19 +0000
commit2d76c84514216f51526f2be123315f585995d860 (patch)
tree363f542ff0cd43bf84a798053bca8660334d0c07 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parenta656b63ee4d5b0e3f4d26a55dd4cc69795746684 (diff)
downloadexternal_llvm-2d76c84514216f51526f2be123315f585995d860.zip
external_llvm-2d76c84514216f51526f2be123315f585995d860.tar.gz
external_llvm-2d76c84514216f51526f2be123315f585995d860.tar.bz2
Generalize the register matching code in DAGISel a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126731 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 68ba966..5b0790f 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -2392,6 +2392,18 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
CurDAG->getRegister(RegNo, VT), (SDNode*)0));
continue;
}
+ case OPC_EmitRegister2: {
+ // For targets w/ more than 256 register names, the register enum
+ // values are stored in two bytes in the matcher table (just like
+ // opcodes).
+ MVT::SimpleValueType VT =
+ (MVT::SimpleValueType)MatcherTable[MatcherIndex++];
+ unsigned RegNo = MatcherTable[MatcherIndex++];
+ RegNo |= MatcherTable[MatcherIndex++] << 8;
+ RecordedNodes.push_back(std::pair<SDValue, SDNode*>(
+ CurDAG->getRegister(RegNo, VT), (SDNode*)0));
+ continue;
+ }
case OPC_EmitConvertToTarget: {
// Convert from IMM/FPIMM to target version.