Min-Yih Hsu via llvm-dev
2021-Apr-14 21:48 UTC
[llvm-dev] Question regarding the number of operands in MCInst
Hi All, I have a simple question regarding the number of operands in MCInst: Given a MCInst that is not variadic and does not have any implicit use/def operand. Does the number of its operands _always_ match the number of operands described in its MCInstrDesc counterpart? More specifically, `MCID` is the MCInstrDesc object of a MCInst `MCI`, is the following statement always true? ``` MCID.getNumOperands() == MI.getNumOperands() || MCID.isVariadic() || MCID.getNumImplicitUses() || MCID.getNumImplicitDefs() ``` Is there any chances where a MCInst has more/less operands than its MCInstrDesc (other than variadic and implicit operands)? Thank you! -Min