aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenTarget.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-08-01 05:59:33 +0000
committerChris Lattner <sabre@nondot.org>2004-08-01 05:59:33 +0000
commit2e1f51b8a583649d74cb666ca5e4cf680cc1ced9 (patch)
tree9d3918655c2d43639de8e63e519beb837528ba00 /utils/TableGen/CodeGenTarget.cpp
parentec3524064c57fbc2c5976ca301bbaadc94006d07 (diff)
Initial cut at an asm writer emitter. So far, this only handles emission of
instructions, and only instructions that take no operands at that! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15386 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenTarget.cpp')
-rw-r--r--utils/TableGen/CodeGenTarget.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index 026119d8d0..422e8d0b4f 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/utils/TableGen/CodeGenTarget.cpp
@@ -122,14 +122,23 @@ CodeGenInstruction::CodeGenInstruction(Record *R) : TheDef(R) {
Namespace = R->getValueAsString("Namespace");
AsmString = R->getValueAsString("AsmString");
- //TODO: Parse OperandList
-
isReturn = R->getValueAsBit("isReturn");
isBranch = R->getValueAsBit("isBranch");
isBarrier = R->getValueAsBit("isBarrier");
isCall = R->getValueAsBit("isCall");
isTwoAddress = R->getValueAsBit("isTwoAddress");
isTerminator = R->getValueAsBit("isTerminator");
+
+
+ //TODO: Parse OperandList
+ try {
+ DagInit *DI = R->getValueAsDag("OperandList");
+
+ // Cannot handle instructions with operands yet.
+ if (DI->getNumArgs())
+ AsmString.clear();
+ } catch (...) {
+ }
}