summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit1d479dbc55c27628aa1be041bbb81203a8f606f4 (patch)
tree7b869de04a5ea714835d05a2a9d2c0374310b09b /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parentdbe37f38d0a5e2a04fa741efd7d15b95141f94ea (diff)
downloadbcm5719-llvm-1d479dbc55c27628aa1be041bbb81203a8f606f4.tar.gz
bcm5719-llvm-1d479dbc55c27628aa1be041bbb81203a8f606f4.zip
Generalize the register matching code in DAGISel a bit.
llvm-svn: 126731
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 68ba966d268..5b0790f241d 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud