[llvm] [AArch64][llvm] Redefine some insns as an alias of `SYS` (PR #187004)

Jonathan Thackray via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 08:47:39 PDT 2026


================
@@ -988,6 +1026,38 @@ bool AArch64InstPrinter::printSysAlias(const MCInst *MI,
       Name = std::string(AT->Name);
     }
     break;
+    // GCS aliases.
+    case 7: {
+      if (!(STI.hasFeature(AArch64::FeatureAll) ||
+            STI.hasFeature(AArch64::FeatureGCS)))
+        return false;
+
+      RegSep = "\t";
+      Name = "";
+      if (Op1Val == 0) {
+        NeedsReg = false;
+        if (Op2Val == 4) {
+          Ins = "gcspushx";
+        } else if (Op2Val == 5) {
+          Ins = "gcspopcx";
+        } else if (Op2Val == 6) {
+          Ins = "gcspopx";
+        } else {
+          return false;
+        }
+      } else if (Op1Val == 3) {
+        NeedsReg = true;
+        if (Op2Val == 0) {
+          Ins = "gcspushm";
+        } else if (Op2Val == 2) {
+          Ins = "gcsss1";
+        } else {
+          return false;
+        }
+      } else {
+        return false;
+      }
----------------
jthackray wrote:

Good idea. Done.

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


More information about the llvm-commits mailing list