[lldb] [llvm] [AArch64][llvm] Tighten SYSP parsing; don't disassemble invalid encodings (PR #182410)

Jonathan Thackray via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 09:05:28 PDT 2026


================
@@ -90,12 +90,27 @@ void AArch64InstPrinter::printInst(const MCInst *MI, uint64_t Address,
       return;
     }
 
-  if (Opcode == AArch64::SYSPxt || Opcode == AArch64::SYSPxt_XZR)
+  if (Opcode == AArch64::SYSPxt) {
     if (printSyspAlias(MI, STI, O)) {
       printAnnotation(O, Annot);
       return;
     }
 
+    // Preserve the historic SYSP short form for the XZR/XZR encoding, but
+    // only when aliases are enabled. In no-alias mode we must print the full
+    // canonical operand list.
+    if (PrintAliases && MI->getOperand(4).getReg() == AArch64::XZR) {
----------------
jthackray wrote:

It's because some tests check for:
```
  sysp #op1, cN, cM, #op2
```
rather than:
```
  sysp #op1, cN, cM, #op2, xzr, xzr
```
I believe running with `-M no-aliases` forces the second form.

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


More information about the llvm-commits mailing list