[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp
Evan Cheng
evan.cheng at apple.com
Wed Dec 21 18:35:33 PST 2005
Changes in directory llvm/utils/TableGen:
DAGISelEmitter.cpp updated: 1.112 -> 1.113
---
Log message:
Attempt to fix a crash on WIN32.
---
Diffs of the changes: (+16 -15)
DAGISelEmitter.cpp | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.112 llvm/utils/TableGen/DAGISelEmitter.cpp:1.113
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.112 Wed Dec 21 20:24:50 2005
+++ llvm/utils/TableGen/DAGISelEmitter.cpp Wed Dec 21 20:35:21 2005
@@ -1124,22 +1124,23 @@
CodeGenInstruction &InstInfo =Target.getInstruction(Instrs[i]->getName());
- // 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)
- Operands.push_back(InstInfo.OperandList[j].Rec);
- } else {
- // Assume the first operand is the result.
- Results.push_back(InstInfo.OperandList[0].Rec);
+ if (InstInfo.OperandList.size() != 0) {
+ // 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)
+ 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)
- Operands.push_back(InstInfo.OperandList[j].Rec);
+ // The rest are inputs.
+ for (unsigned j = 1, e = InstInfo.OperandList.size(); j < e; ++j)
+ Operands.push_back(InstInfo.OperandList[j].Rec);
+ }
}
// Create and insert the instruction.
More information about the llvm-commits
mailing list