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

Hiroshi Inoue via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 25 20:11:29 PDT 2018


inouehrs 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) {
----------------
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.


Repository:
  rL LLVM

https://reviews.llvm.org/D52467





More information about the llvm-commits mailing list