diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-06-15 07:22:16 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-06-15 07:22:16 +0000 |
commit | 55772ccfd6f6621628b692877f27369cef7dc495 (patch) | |
tree | 0e98e159b71251642a50868d09c9427892a2a540 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | 5d038cf8023e3cbbca7059dc9818af90812bb6b5 (diff) | |
download | bcm5719-llvm-55772ccfd6f6621628b692877f27369cef7dc495.tar.gz bcm5719-llvm-55772ccfd6f6621628b692877f27369cef7dc495.zip |
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
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |