From 3530bafe00a46efe5e164eb66bd229ed2d321dac Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 6 Sep 2006 20:24:14 +0000 Subject: [PATCH] Variable ops instructions may ignore the last few operands for code emission. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30134 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86CodeEmitter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Target/X86/X86CodeEmitter.cpp b/lib/Target/X86/X86CodeEmitter.cpp index 569931ff698..33b28017e58 100644 --- a/lib/Target/X86/X86CodeEmitter.cpp +++ b/lib/Target/X86/X86CodeEmitter.cpp @@ -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!"); }