summaryrefslogtreecommitdiffstats
path: root/llvm/utils
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2005-12-21 20:20:49 +0000
committerEvan Cheng <evan.cheng@apple.com>2005-12-21 20:20:49 +0000
commitf646926ecffd5e75138039d522f5820b4b344845 (patch)
tree1aa7efc54d77093211c0c87d3877b2b3edd44654 /llvm/utils
parent3a9fc42d20cb4e28406cedaa717e39483d678088 (diff)
downloadbcm5719-llvm-f646926ecffd5e75138039d522f5820b4b344845.tar.gz
bcm5719-llvm-f646926ecffd5e75138039d522f5820b4b344845.zip
Allows instructions which no explicit operands. e.g. X86 RET which has but
an implicit flag operand. llvm-svn: 24916
Diffstat (limited to 'llvm/utils')
-rw-r--r--llvm/utils/TableGen/DAGISelEmitter.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/utils/TableGen/DAGISelEmitter.cpp b/llvm/utils/TableGen/DAGISelEmitter.cpp
index be8fb75b43a..140c8f2bf12 100644
--- a/llvm/utils/TableGen/DAGISelEmitter.cpp
+++ b/llvm/utils/TableGen/DAGISelEmitter.cpp
@@ -1124,23 +1124,22 @@ void DAGISelEmitter::ParseInstructions() {
std::vector<Record*> Operands;
CodeGenInstruction &InstInfo =Target.getInstruction(Instrs[i]->getName());
-
- // Doesn't even define a result?
- if (InstInfo.OperandList.size() == 0)
- continue;
+ // Note: Removed if (InstInfo.OperandList.size() == 0) continue;
+ // It's possible for some instruction, e.g. RET for X86 that only has an
+ // implicit flag operand.
// FIXME: temporary hack...
if (InstInfo.isReturn || InstInfo.isBranch || InstInfo.isCall ||
InstInfo.isStore) {
// These produce no results
- for (unsigned j = 0, e = InstInfo.OperandList.size(); j != e; ++j)
+ for (unsigned j = 0, e = InstInfo.OperandList.size(); j < e; ++j)
Operands.push_back(InstInfo.OperandList[j].Rec);
} else {
// Assume the first operand is the result.
Results.push_back(InstInfo.OperandList[0].Rec);
// The rest are inputs.
- for (unsigned j = 1, e = InstInfo.OperandList.size(); j != e; ++j)
+ for (unsigned j = 1, e = InstInfo.OperandList.size(); j < e; ++j)
Operands.push_back(InstInfo.OperandList[j].Rec);
}
OpenPOWER on IntegriCloud