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

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 07:27:41 PDT 2026


================
@@ -1014,6 +1047,48 @@ bool AArch64InstPrinter::printSysAlias(const MCInst *MI,
         return false;
       }
     } break;
+    // GCS aliases.
+    case 7: {
+      if (!(STI.hasFeature(AArch64::FeatureAll) ||
----------------
CarolineConcatto wrote:

Maybe is me, but I get confused with these switches statements :
switch (Op1Val) {
defaults:
        return false;
case 0: {
        NeedsReg = false;
        if (Op2Val == 4) 
          Ins = "gcspushx";
       if (Op2Val == 5) 
          Ins = "gcspopcx";
      if (Op2Val == 6) 
          Ins = "gcspopx";
      if (Op2Val != 4 && Op2Val != 5 && Op2Val != 6 )
          return false;
}
  case 3: {
        NeedsReg = true;
        if (Op2Val == 0) 
          Ins = "gcspushm";
        if (Op2Val == 2) 
          Ins = "gcsss1";
       if (Op2Val != 0 && Op2Val != 2 )
          return false;
        }
    }
    break;

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


More information about the llvm-commits mailing list