File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
lib/Target/RISCV/AsmParser Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2079,9 +2079,6 @@ ParseStatus RISCVAsmParser::parseBareSymbol(OperandVector &Operands) {
20792079
20802080 SMLoc E = SMLoc::getFromPointer (S.getPointer () + Identifier.size ());
20812081
2082- if (Identifier.consume_back (" @plt" ))
2083- return Error (getLoc (), " '@plt' operand not valid for instruction" );
2084-
20852082 MCSymbol *Sym = getContext ().getOrCreateSymbol (Identifier);
20862083
20872084 if (Sym->isVariable ()) {
@@ -2129,8 +2126,9 @@ ParseStatus RISCVAsmParser::parseCallSymbol(OperandVector &Operands) {
21292126 Lex ();
21302127 Lex ();
21312128 StringRef PLT;
2129+ SMLoc Loc = getLoc ();
21322130 if (getParser ().parseIdentifier (PLT) || PLT != " plt" )
2133- return ParseStatus::Failure ;
2131+ return Error (Loc, " @ (except the deprecated/ignored @plt) is disallowed " ) ;
21342132 } else if (!getLexer ().peekTok ().is (AsmToken::EndOfStatement)) {
21352133 // Avoid parsing the register in `call rd, foo` as a call symbol.
21362134 return ParseStatus::NoMatch;
Original file line number Diff line number Diff line change @@ -10,3 +10,5 @@ call %lo(1234) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
1010call %hi(foo) # CHECK: : [[ @LINE ]] : 6 : error: operand must be a bare symbol name
1111call %lo(foo) # CHECK: : [[ @LINE ]] : 6 : error: operand must be a bare symbol name
1212call foo , bar # CHECK: : [[ @LINE ]] : 6 : error: operand must be a bare symbol name
13+ call foo@pls # CHECK: : [[ @LINE ]] : 10 : error: @ (except the deprecated/ignored @plt) is disallowed
14+ call foo@ 3 # CHECK: : [[ @LINE ]] : 10 : error: @ (except the deprecated/ignored @plt) is disallowed
Original file line number Diff line number Diff line change @@ -10,3 +10,4 @@ tail %hi(1234) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
1010tail %lo( 1234 ) # CHECK: : [[ @LINE ]] : 6 : error: operand must be a bare symbol name
1111tail %hi(foo) # CHECK: : [[ @LINE ]] : 6 : error: operand must be a bare symbol name
1212tail %lo(foo) # CHECK: : [[ @LINE ]] : 6 : error: operand must be a bare symbol name
13+ tail foo@pls # CHECK: : [[ @LINE ]] : 10 : error: @ (except the deprecated/ignored @plt) is disallowed
You can’t perform that action at this time.
0 commit comments