[llvm] [PowerPC] Add a set of extended mnemonics that are missing from Power 10. (PR #73003)

Stefan Pintilie via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 18:58:18 PST 2023


================
@@ -3437,6 +3437,23 @@ def crnot : OutPatFrag<(ops node:$in),
 def       : Pat<(not i1:$in),
                 (crnot $in)>;
 
+// Pseudo-instructions for alternate assembly syntax (never used by codegen).
+// These are aliases that require C++ handling to convert to the target
+// instruction, while InstAliases can be handled directly by tblgen.
+class PPCAsmPseudo<string asm, dag iops>
+  : Instruction {
+  let Namespace = "PPC";
+  bit PPC64 = 0;  // Default value, override with isPPC64
+
+  let OutOperandList = (outs);
+  let InOperandList = iops;
+  let Pattern = [];
+  let AsmString = asm;
+  let isAsmParserOnly = 1;
+  let isPseudo = 1;
+  let hasNoSchedulingInfo = 1;
+}
+
----------------
stefanp-ibm wrote:

Yes. I moved that up because I needed it for this line:
```
  def PSUBI : PPCAsmPseudo<"psubi $RT, $RA, $SI",
```
so I  had to move it before `include "PPCInstrP10.td"`.

https://github.com/llvm/llvm-project/pull/73003


More information about the llvm-commits mailing list