Variable ops instructions may ignore the last few operands for code emission.
authorEvan Cheng <evan.cheng@apple.com>
Wed, 6 Sep 2006 20:24:14 +0000 (20:24 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 6 Sep 2006 20:24:14 +0000 (20:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30134 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86CodeEmitter.cpp

index 569931ff6988d47514c77575644eaa9a16180f47..33b28017e58412f1ca7af851b60bed445cde381e 100644 (file)
@@ -526,5 +526,7 @@ void Emitter::emitInstruction(const MachineInstr &MI) {
     ++CurOp;
     break;
   }
-  assert(CurOp == MI.getNumOperands() && "Unknown encoding!");
+
+  if ((Desc.Flags & M_VARIABLE_OPS) == 0)
+    assert(CurOp == MI.getNumOperands() && "Unknown encoding!");
 }