[PATCH] D52467: [PowerPC] [NFC] Refactor code for printing register operands

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 26 03:25:34 PDT 2018


nemanjai added inline comments.


================
Comment at: lib/Target/PowerPC/PPCInstrInfo.h:415
+  static unsigned getRegNumForOperand(const MCInstrDesc &Desc, unsigned Reg,
+                                      unsigned OpNo) {
+    if (Desc.TSFlags & PPCII::UseVSXReg) {
----------------
inouehrs wrote:
> nemanjai wrote:
> > inouehrs wrote:
> > > Why do we need `OpNo`? There is no use of this parameter.
> > > 
> > There is currently no use for this parameter. But various pseudo-instructions we may need to add in the future may have different numbering schemes for different operands.
> > 
> > For example, I could implement something like this:
> > `mypseudo VRT, XA, VRA` which would do something on vector registers and `XA` is a 6-bit VSX register number, whereas `VRT, VRA` are 5-bit VMX register numbers.
> I see. Maybe it is nice if you can write so in comment.
Will do. Thanks for the suggestion.


Repository:
  rL LLVM

https://reviews.llvm.org/D52467





More information about the llvm-commits mailing list