[Lldb-commits] [lldb] [llvm] [AArch64][llvm] Tighten SYSP parsing; don't disassemble invalid encodings (PR #182410)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 1 08:05:44 PDT 2026
================
@@ -8731,22 +8698,33 @@ ParseStatus AArch64AsmParser::tryParseGPRSeqPair(OperandVector &Operands) {
MCRegister SecondReg;
Res = tryParseScalarRegister(SecondReg);
if (!Res.isSuccess())
- return Error(E, "expected second odd register of a consecutive same-size "
- "even/odd register pair");
+ return Error(E, IsXZRPair ? "expected second xzr in xzr/xzr register pair"
+ : SecondRegExpected);
+
+ // For SYSP, Rt == 31 denotes the optional-pair default. If the explicit
+ // pair starts with xzr, the derived second register must be xzr too.
+ if (IsXZRPair) {
+ if (!XRegClass.contains(SecondReg) || SecondReg != AArch64::XZR)
+ return Error(E, "expected second xzr in xzr/xzr register pair");
+ Operands.push_back(AArch64Operand::CreateReg(AArch64::XZR, RegKind::Scalar,
----------------
Lukacma wrote:
I agree with that, but you could just put xzr, xzr into SyspPairsClass class instead of creating XZR_XZR. Or am I missing smth here ?
https://github.com/llvm/llvm-project/pull/182410
More information about the lldb-commits
mailing list