aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit87bddeb2afeaa8cebe43a216430375afec8c16d3 (patch)
tree2626077707f52c5e5685c02e679cd52771839b13 /utils
parent35186bacc3ce68ca670acd2b5717d7702ff0387f (diff)
downloadexternal_llvm-87bddeb2afeaa8cebe43a216430375afec8c16d3.zip
external_llvm-87bddeb2afeaa8cebe43a216430375afec8c16d3.tar.gz
external_llvm-87bddeb2afeaa8cebe43a216430375afec8c16d3.tar.bz2
Allows instructions which no explicit operands. e.g. X86 RET which has but
an implicit flag operand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24916 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index be8fb75..140c8f2 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/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);
}