From 48ff2fb1293879dbe95ea56f0242f62bdd7f9569 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 6 Sep 2006 20:32:45 +0000 Subject: [PATCH] Watch out for variable_ops instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30135 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86CodeEmitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Target/X86/X86CodeEmitter.cpp b/lib/Target/X86/X86CodeEmitter.cpp index 33b28017e58..bfbf98968a2 100644 --- a/lib/Target/X86/X86CodeEmitter.cpp +++ b/lib/Target/X86/X86CodeEmitter.cpp @@ -493,7 +493,7 @@ void Emitter::emitInstruction(const MachineInstr &MI) { emitRegModRMByte(MI.getOperand(CurOp++).getReg(), (Desc.TSFlags & X86II::FormMask)-X86II::MRM0r); - if (CurOp != MI.getNumOperands()) + if (CurOp != MI.getNumOperands() && MI.getOperand(CurOp).isImmediate()) emitConstant(MI.getOperand(CurOp++).getImm(), sizeOfImm(Desc)); break; -- 2.34.1