[llvm-commits] CVS: llvm/lib/CodeGen/MachineInstr.cpp

Evan Cheng evan.cheng at apple.com
Thu Jun 15 00:22:31 PDT 2006



Changes in directory llvm/lib/CodeGen:

MachineInstr.cpp updated: 1.123 -> 1.124
---
Log message:

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.


---
Diffs of the changes:  (+2 -1)

 MachineInstr.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/lib/CodeGen/MachineInstr.cpp
diff -u llvm/lib/CodeGen/MachineInstr.cpp:1.123 llvm/lib/CodeGen/MachineInstr.cpp:1.124
--- llvm/lib/CodeGen/MachineInstr.cpp:1.123	Fri May 26 03:00:14 2006
+++ llvm/lib/CodeGen/MachineInstr.cpp	Thu Jun 15 02:22:16 2006
@@ -91,7 +91,8 @@
 ///
 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;
 }






More information about the llvm-commits mailing list