[llvm] [RISCV] Improve assembler error message for Zcmp stack adjustment. (PR #129180)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 28 09:24:27 PST 2025
================
@@ -2771,12 +2766,25 @@ ParseStatus RISCVAsmParser::parseZcmpStackAdj(OperandVector &Operands,
----------------
topperc wrote:
I'm considering restructuring how push/pop are represented in MCInst and moving this check to validateInstruction. It's a bit odd that we're peeking at the parsed reglist operand while still in the parsing stage.
My thought is that we should parse this as a regular immediate and do the range check in validateInstruction. Simplify the InstPrinter by printing the immediate directly. Change RISCVFrameLowering to include StackAdjBase in the immediate when it creates a push/pop.
https://github.com/llvm/llvm-project/pull/129180
More information about the llvm-commits
mailing list