[lldb] [llvm] [AArch64][llvm] Tighten SYSP parsing; don't disassemble invalid encodings (PR #182410)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 30 07:29:24 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:
Why did you need to create an artificial one ? Couldn't you have just added (xzr, xzr) to XSeqPairs ?
https://github.com/llvm/llvm-project/pull/182410
More information about the llvm-commits
mailing list