Pass all the flags to the asm printer, not just the # operands.
authorChris Lattner <sabre@nondot.org>
Fri, 24 Feb 2006 19:50:58 +0000 (19:50 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 24 Feb 2006 19:50:58 +0000 (19:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26362 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter.cpp
lib/CodeGen/SelectionDAG/ScheduleDAG.cpp

index 9450576a9adecee7b7e64c3a8fb7fefd2ce97993..dceaced12f902b60b7f724ce8070d3a32e9fc2a0 100644 (file)
@@ -575,8 +575,10 @@ void AsmPrinter::printInlineAsm(const MachineInstr *MI) const {
         unsigned OpNo = 1;
         
         // Scan to find the machine operand number for the operand.
-        for (; Val; --Val)
-          OpNo += MI->getOperand(OpNo).getImmedValue()+1;
+        for (; Val; --Val) {
+          unsigned OpFlags = MI->getOperand(OpNo).getImmedValue();
+          OpNo += (OpFlags >> 3) + 1;
+        }
         
         ++OpNo;  // Skip over the ID number.
         
index b7c7ec37f739ec203d17abf05e7314ae1900751e..9bc168f7a6d7dea4b2009d097088f4e45f226c4b 100644 (file)
@@ -328,7 +328,7 @@ void ScheduleDAG::EmitNode(NodeInfo *NI) {
         unsigned Flags = cast<ConstantSDNode>(Node->getOperand(i))->getValue();
         unsigned NumVals = Flags >> 3;
         
-        MI->addZeroExtImm64Operand(NumVals);
+        MI->addZeroExtImm64Operand(Flags);
         ++i;  // Skip the ID value.
         
         switch (Flags & 7) {