[llvm-dev] Question regarding the number of operands in MCInst

27 views
Skip to first unread message

Min-Yih Hsu via llvm-dev

unread,
Apr 14, 2021, 5:48:24 PM4/14/21
to LLVM Dev
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
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

Reply all
Reply to author
Forward
0 new messages