From 55772ccfd6f6621628b692877f27369cef7dc495 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 15 Jun 2006 07:22:16 +0000 Subject: Instructions with variable operands (variable_ops) can have a number required operands. e.g. def CALL32r : I<0xFF, MRM2r, (ops GR32:$dst, variable_ops), "call {*}$dst", [(X86call GR32:$dst)]>; TableGen should emit operand informations for the "required" operands. Added a target instruction info flag M_VARIABLE_OPS to indicate the target instruction may have more operands in addition to the minimum required operands. llvm-svn: 28791 --- llvm/lib/CodeGen/MachineInstr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/MachineInstr.cpp') diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 8003afa0ba5..480364a2821 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -91,7 +91,8 @@ MachineInstr *MachineInstr::removeFromParent() { /// bool MachineInstr::OperandsComplete() const { int NumOperands = TargetInstrDescriptors[Opcode].numOperands; - if (NumOperands >= 0 && getNumOperands() >= (unsigned)NumOperands) + if ((TargetInstrDescriptors[Opcode].Flags & M_VARIABLE_OPS) == 0 && + getNumOperands() >= (unsigned)NumOperands) return true; // Broken: we have all the operands of this instruction! return false; } -- cgit v1.2.3