Lines Matching refs:AsmToken
1355 SmallVectorImpl<AsmToken> &Tokens);
1358 SmallVectorImpl<AsmToken> &Tokens);
1361 SmallVectorImpl<AsmToken> &Tokens);
1363 unsigned &RegWidth, SmallVectorImpl<AsmToken> &Tokens);
1369 bool isRegister(const AsmToken &Token, const AsmToken &NextToken) const;
1579 bool ParseDirective(AsmToken DirectiveID) override;
1612 bool isOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const;
1613 bool isRegOrOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const;
1614 bool isNamedOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const;
1615 bool isOpcodeModifierWithVal(const AsmToken &Token, const AsmToken &NextToken) const;
1750 bool isId(const AsmToken &Token, const StringRef Id) const;
1751 bool isToken(const AsmToken::TokenKind Kind) const;
1755 bool trySkipId(const StringRef Id, const AsmToken::TokenKind Kind);
1756 bool trySkipToken(const AsmToken::TokenKind Kind);
1757 bool skipToken(const AsmToken::TokenKind Kind, const StringRef ErrMsg);
1761 void peekTokens(MutableArrayRef<AsmToken> Tokens);
1762 AsmToken::TokenKind getTokenKind() const;
1766 AsmToken peekToken(bool ShouldSkipSpace = true);
1767 AsmToken getToken() const;
2628 AMDGPUAsmParser::isRegister(const AsmToken &Token, in isRegister()
2629 const AsmToken &NextToken) const { in isRegister()
2632 if (Token.is(AsmToken::LBrac)) in isRegister()
2635 if (!Token.is(AsmToken::Identifier)) in isRegister()
2654 if (NextToken.is(AsmToken::LBrac)) in isRegister()
2714 if (!skipToken(AsmToken::LBrac, "missing register index")) in ParseRegRange()
2723 if (trySkipToken(AsmToken::Colon)) { in ParseRegRange()
2731 if (!skipToken(AsmToken::RBrac, "expected a closing square bracket")) in ParseRegRange()
2756 SmallVectorImpl<AsmToken> &Tokens) { in ParseSpecialReg()
2757 assert(isToken(AsmToken::Identifier)); in ParseSpecialReg()
2771 SmallVectorImpl<AsmToken> &Tokens) { in ParseRegularReg()
2772 assert(isToken(AsmToken::Identifier)); in ParseRegularReg()
2815 SmallVectorImpl<AsmToken> &Tokens) { in ParseRegList()
2819 if (!skipToken(AsmToken::LBrac, in ParseRegList()
2834 for (; trySkipToken(AsmToken::Comma); ) { in ParseRegList()
2856 if (!skipToken(AsmToken::RBrac, in ParseRegList()
2869 SmallVectorImpl<AsmToken> &Tokens) { in ParseAMDGPURegister()
2873 if (isToken(AsmToken::Identifier)) { in ParseAMDGPURegister()
2904 SmallVector<AsmToken, 1> Tokens; in ParseAMDGPURegister()
2994 if (!skipToken(AsmToken::LParen, "expected left paren after lit")) in parseImm()
2998 !skipToken(AsmToken::RParen, "expected closing parentheses")) in parseImm()
3006 bool IsReal = Tok.is(AsmToken::Real); in parseImm()
3010 if (!IsReal && Tok.is(AsmToken::Minus) && NextTok.is(AsmToken::Real)) { in parseImm()
3102 AMDGPUAsmParser::isNamedOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const { in isNamedOperandModifier()
3103 if (Token.is(AsmToken::Identifier) && NextToken.is(AsmToken::LParen)) { in isNamedOperandModifier()
3111 AMDGPUAsmParser::isOpcodeModifierWithVal(const AsmToken &Token, const AsmToken &NextToken) const { in isOpcodeModifierWithVal()
3112 return Token.is(AsmToken::Identifier) && NextToken.is(AsmToken::Colon); in isOpcodeModifierWithVal()
3116 AMDGPUAsmParser::isOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const { in isOperandModifier()
3117 return isNamedOperandModifier(Token, NextToken) || Token.is(AsmToken::Pipe); in isOperandModifier()
3121 AMDGPUAsmParser::isRegOrOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const { in isRegOrOperandModifier()
3141 AsmToken Tok = getToken(); in isModifier()
3142 AsmToken NextToken[2]; in isModifier()
3146 (Tok.is(AsmToken::Minus) && isRegOrOperandModifier(NextToken[0], NextToken[1])) || in isModifier()
3175 AsmToken NextToken[2]; in parseSP3NegModifier()
3178 if (isToken(AsmToken::Minus) && in parseSP3NegModifier()
3180 NextToken[0].is(AsmToken::Pipe) || in parseSP3NegModifier()
3198 if (isToken(AsmToken::Minus) && peekToken().is(AsmToken::Minus)) in parseRegOrImmWithFPInputMods()
3207 if (Neg && !skipToken(AsmToken::LParen, "expected left paren after neg")) in parseRegOrImmWithFPInputMods()
3211 if (Abs && !skipToken(AsmToken::LParen, "expected left paren after abs")) in parseRegOrImmWithFPInputMods()
3215 if (Lit && !skipToken(AsmToken::LParen, "expected left paren after lit")) in parseRegOrImmWithFPInputMods()
3219 SP3Abs = trySkipToken(AsmToken::Pipe); in parseRegOrImmWithFPInputMods()
3235 if (SP3Abs && !skipToken(AsmToken::Pipe, "expected vertical bar")) in parseRegOrImmWithFPInputMods()
3237 if (Abs && !skipToken(AsmToken::RParen, "expected closing parentheses")) in parseRegOrImmWithFPInputMods()
3239 if (Neg && !skipToken(AsmToken::RParen, "expected closing parentheses")) in parseRegOrImmWithFPInputMods()
3241 if (Lit && !skipToken(AsmToken::RParen, "expected closing parentheses")) in parseRegOrImmWithFPInputMods()
3262 if (Sext && !skipToken(AsmToken::LParen, "expected left paren after sext")) in parseRegOrImmWithIntInputMods()
3274 if (Sext && !skipToken(AsmToken::RParen, "expected closing parentheses")) in parseRegOrImmWithIntInputMods()
5161 if (!isToken(AsmToken::Integer) && !isToken(AsmToken::Identifier)) { in ParseAsAbsoluteExpression()
5272 while (trySkipToken(AsmToken::EndOfStatement)); in ParseDirectiveAMDHSAKernel()
5731 while(trySkipToken(AsmToken::EndOfStatement)); in ParseDirectiveAMDKernelCodeT()
5803 while (!isToken(AsmToken::Eof)) { in ParseToEndDirective()
5804 while (isToken(AsmToken::Space)) { in ParseToEndDirective()
5822 if (isToken(AsmToken::Eof) && !FoundEnd) { in ParseToEndDirective()
5860 if (!trySkipToken(AsmToken::Comma)) { in ParseDirectivePALMetadata()
5869 if (!trySkipToken(AsmToken::Comma)) in ParseDirectivePALMetadata()
5902 if (trySkipToken(AsmToken::Comma)) { in ParseDirectiveAMDGPULDS()
5927 bool AMDGPUAsmParser::ParseDirective(AsmToken DirectiveID) { in ParseDirective()
6041 if (Res.isSuccess() || Res.isFailure() || isToken(AsmToken::EndOfStatement)) in parseOperand()
6053 if (Res.isSuccess() || Res.isFailure() || isToken(AsmToken::EndOfStatement)) in parseOperand()
6058 if (Mode == OperandMode_NSA && trySkipToken(AsmToken::LBrac)) { in parseOperand()
6070 if (trySkipToken(AsmToken::RBrac)) in parseOperand()
6073 if (!skipToken(AsmToken::Comma, in parseOperand()
6134 while (!trySkipToken(AsmToken::EndOfStatement)) { in ParseInstruction()
6148 while (!trySkipToken(AsmToken::EndOfStatement)) { in ParseInstruction()
6155 trySkipToken(AsmToken::Comma); in ParseInstruction()
6178 if (!trySkipId(Prefix, AsmToken::Colon)) in parseIntWithPrefix()
6206 if (!trySkipId(Prefix, AsmToken::Colon)) in parseOperandArrayWithPrefix()
6209 if (!skipToken(AsmToken::LBrac, "expected a left square bracket")) in parseOperandArrayWithPrefix()
6228 if (trySkipToken(AsmToken::RBrac)) in parseOperandArrayWithPrefix()
6234 if (!skipToken(AsmToken::Comma, "expected a comma")) in parseOperandArrayWithPrefix()
6471 if (!trySkipId(Prefix, AsmToken::Colon)) in parseStringWithPrefix()
6550 !peekToken().is(AsmToken::Comma)) { in parseDfmtNfmt()
6551 trySkipToken(AsmToken::Comma); in parseDfmtNfmt()
6613 if (trySkipToken(AsmToken::Comma)) { in parseSymbolicSplitFormat()
6671 if (!trySkipId("format", AsmToken::Colon)) in parseSymbolicOrNumericFormat()
6674 if (trySkipToken(AsmToken::LBrac)) { in parseSymbolicOrNumericFormat()
6686 if (!skipToken(AsmToken::RBrac, "expected a closing square bracket")) in parseSymbolicOrNumericFormat()
6713 trySkipToken(AsmToken::Comma); in parseFORMAT()
6715 if (isToken(AsmToken::EndOfStatement)) { in parseFORMAT()
6726 trySkipToken(AsmToken::Comma); in parseFORMAT()
6741 if (isId("format") && peekToken().is(AsmToken::Colon)) in parseFORMAT()
6870 if (!skipToken(AsmToken::Identifier, "expected a counter name") || in parseCnt()
6871 !skipToken(AsmToken::LParen, "expected a left parenthesis")) in parseCnt()
6900 if (!skipToken(AsmToken::RParen, "expected a closing parenthesis")) in parseCnt()
6903 if (trySkipToken(AsmToken::Amp) || trySkipToken(AsmToken::Comma)) { in parseCnt()
6904 if (isToken(AsmToken::EndOfStatement)) { in parseCnt()
6918 if (isToken(AsmToken::Identifier) && peekToken().is(AsmToken::LParen)) { in parseSWaitCnt()
6919 while (!isToken(AsmToken::EndOfStatement)) { in parseSWaitCnt()
6935 if (!skipToken(AsmToken::Identifier, "expected a field name") || in parseDelay()
6936 !skipToken(AsmToken::LParen, "expected a left parenthesis")) in parseDelay()
6941 if (!skipToken(AsmToken::Identifier, "expected a value name") || in parseDelay()
6942 !skipToken(AsmToken::RParen, "expected a right parenthesis")) in parseDelay()
6998 if (isToken(AsmToken::Identifier) && peekToken().is(AsmToken::LParen)) { in parseSDelayALU()
7002 } while (trySkipToken(AsmToken::Pipe)); in parseSDelayALU()
7050 if (!skipToken(AsmToken::Identifier, "expected a counter name") || in parseDepCtr()
7051 !skipToken(AsmToken::LParen, "expected a left parenthesis")) in parseDepCtr()
7066 if (!skipToken(AsmToken::RParen, "expected a closing parenthesis")) in parseDepCtr()
7069 if (trySkipToken(AsmToken::Amp) || trySkipToken(AsmToken::Comma)) { in parseDepCtr()
7070 if (isToken(AsmToken::EndOfStatement)) { in parseDepCtr()
7087 if (isToken(AsmToken::Identifier) && peekToken().is(AsmToken::LParen)) { in parseDepCtr()
7089 while (!isToken(AsmToken::EndOfStatement)) { in parseDepCtr()
7116 if (isToken(AsmToken::Identifier) && in parseHwregBody()
7124 if (trySkipToken(AsmToken::RParen)) in parseHwregBody()
7128 if (!skipToken(AsmToken::Comma, "expected a comma or a closing parenthesis")) in parseHwregBody()
7135 if (!skipToken(AsmToken::Comma, "expected a comma")) in parseHwregBody()
7140 skipToken(AsmToken::RParen, "expected a closing parenthesis"); in parseHwregBody()
7181 if (trySkipId("hwreg", AsmToken::LParen)) { in parseHwreg()
7217 if (isToken(AsmToken::Identifier) && in parseSendMsgBody()
7225 if (trySkipToken(AsmToken::Comma)) { in parseSendMsgBody()
7228 if (isToken(AsmToken::Identifier) && in parseSendMsgBody()
7235 if (trySkipToken(AsmToken::Comma)) { in parseSendMsgBody()
7243 return skipToken(AsmToken::RParen, "expected a closing parenthesis"); in parseSendMsgBody()
7298 if (trySkipId("sendmsg", AsmToken::LParen)) { in parseSendMsg()
7415 AMDGPUAsmParser::isId(const AsmToken &Token, const StringRef Id) const { in isId()
7416 return Token.is(AsmToken::Identifier) && Token.getString() == Id; in isId()
7425 AMDGPUAsmParser::isToken(const AsmToken::TokenKind Kind) const { in isToken()
7430 return isToken(AsmToken::Identifier) ? getTokenStr() : StringRef(); in getId()
7444 if (isToken(AsmToken::Identifier)) { in trySkipId()
7455 AMDGPUAsmParser::trySkipId(const StringRef Id, const AsmToken::TokenKind Kind) { in trySkipId()
7465 AMDGPUAsmParser::trySkipToken(const AsmToken::TokenKind Kind) { in trySkipToken()
7474 AMDGPUAsmParser::skipToken(const AsmToken::TokenKind Kind, in skipToken()
7522 if (isToken(AsmToken::String)) { in parseString()
7534 if (isToken(AsmToken::Identifier)) { in parseId()
7545 AsmToken
7550 AsmToken AMDGPUAsmParser::peekToken(bool ShouldSkipSpace) { in peekToken()
7551 return isToken(AsmToken::EndOfStatement) in peekToken()
7557 AMDGPUAsmParser::peekTokens(MutableArrayRef<AsmToken> Tokens) { in peekTokens()
7561 Tokens[Idx] = AsmToken(AsmToken::Error, ""); in peekTokens()
7564 AsmToken::TokenKind
7664 if (!skipToken(AsmToken::Comma, "expected a comma")) { in parseSwizzleOperand()
7785 if (!skipToken(AsmToken::Comma, "expected a comma")) { in parseSwizzleBitmaskPerm()
7847 if (skipToken(AsmToken::LParen, "expected a left parentheses")) { in parseSwizzleMacro()
7866 return Ok && skipToken(AsmToken::RParen, "expected a closing parentheses"); in parseSwizzleMacro()
7879 if (skipToken(AsmToken::Colon, "expected a colon")) { in parseSwizzle()
7907 if (trySkipToken(AsmToken::RParen)) { in parseGPRIdxMacro()
7937 if (trySkipToken(AsmToken::RParen)) in parseGPRIdxMacro()
7939 if (!skipToken(AsmToken::Comma, in parseGPRIdxMacro()
7954 if (trySkipId("gpr_idx", AsmToken::LParen)) { in parseGPRIdxMode()
8513 if (isToken(AsmToken::Colon) && peekToken(false).is(AsmToken::Colon)) { in parseVOPD()
8520 if (isToken(AsmToken::Identifier) && !Parser.parseIdentifier(OpYName)) { in parseVOPD()
8627 if (isToken(AsmToken::Integer)) { in parseDimId()
8658 if (!trySkipId("dim", AsmToken::Colon)) in parseDim()
8678 if (!isGFX10Plus() || !trySkipId("dpp8", AsmToken::Colon)) in parseDPP8()
8685 if (!skipToken(AsmToken::LBrac, "expected an opening square bracket")) in parseDPP8()
8689 if (i > 0 && !skipToken(AsmToken::Comma, "expected a comma")) in parseDPP8()
8699 if (!skipToken(AsmToken::RBrac, "expected a closing square bracket")) in parseDPP8()
8739 if (!skipToken(AsmToken::LBrac, "expected an opening square bracket")) in parseDPPCtrlPerm()
8744 if (i > 0 && !skipToken(AsmToken::Comma, "expected a comma")) in parseDPPCtrlPerm()
8759 if (!skipToken(AsmToken::RBrac, "expected a closing square bracket")) in parseDPPCtrlPerm()
8816 if (!isToken(AsmToken::Identifier) || in parseDPPCtrl()
8831 if (skipToken(AsmToken::Colon, "expected a colon")) { in parseDPPCtrl()