[PATCH] D144936: [SPARC][IAS] Recognize more SPARCv9 instructions/pseudoinstructions

Koakuma via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 18:55:13 PDT 2023


koakuma added inline comments.


================
Comment at: llvm/lib/Target/Sparc/SparcInstrInfo.td:1834-1838
+// Special case %fq as the register is also used in V8
+// (albeit with different instructions and encoding)
+// This allows us to reuse the register definition and
+// the "%fq" designation while giving it a different encoding.
+let Uses = [FQ], rs1 = 15, rs2 = 0 in
----------------
arsenm wrote:
> I'm confused by what this comment means, as you're defining a new instruction. Is the intent to define an assembler alias only?
Yeah, my intent is to define a `rdpr %fq, $rd` alias, but the encoding of `%fq` is different between v8 and v9 versions of the ISA, so I had to do that to convince the assembler to encode it properly when emitting code for v9.
Should I do it in a different way?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144936/new/

https://reviews.llvm.org/D144936



More information about the llvm-commits mailing list