aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/CodeGenInstruction.cpp
diff options
context:
space:
mode:
authorNowar Gu <nowar100@gmail.com>2011-07-01 23:28:45 +0800
committerNowar Gu <nowar100@gmail.com>2011-07-01 23:37:27 +0800
commit53d48080e55bf0c99cb7ca9de5b15a084d7324b5 (patch)
tree98f4e257a61eebb14933d37ddc16678da0a7069d /utils/TableGen/CodeGenInstruction.cpp
parent039a79eb418211573bada57ec3a1edf5a9d6071e (diff)
parented5bc470aab7097c30e5f881158112f7830472f3 (diff)
downloadexternal_llvm-53d48080e55bf0c99cb7ca9de5b15a084d7324b5.zip
external_llvm-53d48080e55bf0c99cb7ca9de5b15a084d7324b5.tar.gz
external_llvm-53d48080e55bf0c99cb7ca9de5b15a084d7324b5.tar.bz2
Merge upstream to r134237 at Fri. 1st July 2011.
Conflicts: lib/Target/ARM/ARMCodeEmitter.cpp
Diffstat (limited to 'utils/TableGen/CodeGenInstruction.cpp')
-rw-r--r--utils/TableGen/CodeGenInstruction.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/TableGen/CodeGenInstruction.cpp b/utils/TableGen/CodeGenInstruction.cpp
index e9557d2..5fa91be 100644
--- a/utils/TableGen/CodeGenInstruction.cpp
+++ b/utils/TableGen/CodeGenInstruction.cpp
@@ -69,7 +69,9 @@ CGIOperandList::CGIOperandList(Record *R) : TheDef(R) {
std::string EncoderMethod;
unsigned NumOps = 1;
DagInit *MIOpInfo = 0;
- if (Rec->isSubClassOf("Operand")) {
+ if (Rec->isSubClassOf("RegisterOperand")) {
+ PrintMethod = Rec->getValueAsString("PrintMethod");
+ } else if (Rec->isSubClassOf("Operand")) {
PrintMethod = Rec->getValueAsString("PrintMethod");
// If there is an explicit encoder method, use it.
EncoderMethod = Rec->getValueAsString("EncoderMethod");
@@ -415,6 +417,9 @@ bool CodeGenInstAlias::tryAliasOpMatch(DagInit *Result, unsigned AliasOpNo,
// Handle explicit registers.
if (ADI && ADI->getDef()->isSubClassOf("Register")) {
+ if (InstOpRec->isSubClassOf("RegisterOperand"))
+ InstOpRec = InstOpRec->getValueAsDef("RegClass");
+
if (!InstOpRec->isSubClassOf("RegisterClass"))
return false;