[PATCH] D29133: [PowerPC][Altivec] Add vmr extended mnemonic

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 26 06:32:05 PST 2017


nemanjai added inline comments.


================
Comment at: lib/Target/PowerPC/PPCInstrVSX.td:1450
+// be emitted with a VSX reg. So leave Emit = 0 here.
+def : InstAlias<"mfvrd $rA, $XT",
+                (MFVRD g8rc:$rA, vrrc:$XT), 0>;
----------------
hfinkel wrote:
> nemanjai wrote:
> > @hfinkel Do you think this is an acceptable way to get this support implemented? Or do you have a preferred suggestion? Maybe some custom handling of the register operand (or even the mnemonic itself) in the Asm parser/printer or something along those lines...
> > 
> > Once we decide how we want to approach this, we can add a test case.
> One of these should be mfvsrd?
The asm string that we want to match when parsing asm is mfvrd. However, doing so will produce an instruction with a VR input. So if we also use this alias for printing, we'll print $XT + 32. That's why the zero for the `Emit` flag.

In a way, this is a hack for the InstAlias class. We need to read the input and treat it as a different register class (with different numbering).


Repository:
  rL LLVM

https://reviews.llvm.org/D29133





More information about the llvm-commits mailing list