================ @@ -1085,13 +1085,24 @@ ParseStatus SparcAsmParser::parseASITag(OperandVector &Operands) { SMLoc E = Parser.getTok().getEndLoc(); int64_t ASIVal = 0; - if (is64Bit() && (getLexer().getKind() == AsmToken::Hash)) { + switch (getLexer().getKind()) { + case AsmToken::LParen: + case AsmToken::Integer: + case AsmToken::Identifier: + case AsmToken::Plus: + case AsmToken::Minus: + case AsmToken::Tilde: ---------------- s-barannikov wrote:
I'd suggest to extract these cases into a helper function that returns true if the token can be a start of expression. Also, optionally, add a `parseExpression` method that returns NoMatch if the first token can't start an expression and Success/Failure if it can and expression parsing succeeded/failed. https://github.com/llvm/llvm-project/pull/96020 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits