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
This commit is contained in:
Chris Lattner
2004-08-01 05:59:33 +00:00
parent ec3524064c
commit 2e1f51b8a5
4 changed files with 99 additions and 3 deletions

View File

@@ -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 (...) {
}
}