Change instruction description to split OperandList into OutOperandList and
[oota-llvm.git] / utils / TableGen / CodeGenTarget.cpp
index 2aabe51c51c94808ef61b9f600acf093d03ee207..268711da53b3f47ef081a1fda8e5ee63855b3c0e 100644 (file)
@@ -376,13 +376,25 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr)
   
   DagInit *DI;
   try {
-    DI = R->getValueAsDag("OperandList");
+    DI = R->getValueAsDag("OutOperandList");
   } catch (...) {
     // Error getting operand list, just ignore it (sparcv9).
     AsmString.clear();
     OperandList.clear();
     return;
   }
+  NumDefs = DI->getNumArgs();
+
+  DagInit *IDI;
+  try {
+    IDI = R->getValueAsDag("InOperandList");
+  } catch (...) {
+    // Error getting operand list, just ignore it (sparcv9).
+    AsmString.clear();
+    OperandList.clear();
+    return;
+  }
+  DI = (DagInit*)(new BinOpInit(BinOpInit::CONCAT, DI, IDI))->Fold();
 
   unsigned MIOperandNo = 0;
   std::set<std::string> OperandNames;